From 7916f2f880838041aa74ddc0f8922e7068341be8 Mon Sep 17 00:00:00 2001 From: sylvainmoindron <43030050+sylvainmoindron@users.noreply.github.com> Date: Sun, 2 Jun 2019 21:50:45 +0200 Subject: [PATCH 01/73] [kotlin-spring] add reactive behavior via Kotlin coroutines (#2934) * kotlin spring : add reactivity via kotlin's coroutines * add kotlin spring boot reactive samples * bug : fix spring version and import for coroutines * remove exception handler for reactive (webflux doesn't support it) * add spring milestone repository to maven pom * add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter * fix baseType for ArraySchema * regenerate samples * updating documentation --- bin/kotlin-springboot-petstore-all.sh | 4 + ...lin-springboot-petstore-server-reactive.sh | 35 ++++ .../kotlin-springboot-petstore-all.sh | 4 + ...lin-springboot-petstore-server-reactive.sh | 35 ++++ docs/generators/kotlin-spring.md | 3 +- .../openapitools/codegen/DefaultCodegen.java | 2 +- .../languages/KotlinSpringServerCodegen.java | 23 ++- .../main/resources/kotlin-spring/api.mustache | 12 +- .../kotlin-spring/bodyParams.mustache | 2 +- .../spring-boot/buildGradleKts.mustache | 20 +- .../libraries/spring-boot/pom.mustache | 53 ++++- .../spring-boot/settingsGradle.mustache | 14 ++ .../kotlin-spring/returnTypes.mustache | 2 +- .../resources/kotlin-spring/service.mustache | 6 +- .../kotlin-spring/serviceImpl.mustache | 5 +- .../codegen/java/JavaClientCodegenTest.java | 4 +- .../codegen/java/JavaModelTest.java | 10 +- .../spring/KotlinSpringServerCodegenTest.java | 6 + samples/client/petstore/R/docs/UserApi.md | 4 +- .../OpenAPIClient/docs/UserApi.md | 4 +- .../csharp/OpenAPIClient/docs/UserApi.md | 4 +- .../petstore/go/go-petstore/docs/UserApi.md | 4 +- .../java/google-api-client/docs/UserApi.md | 4 +- .../petstore/java/jersey1/docs/UserApi.md | 4 +- .../java/jersey2-java6/docs/UserApi.md | 4 +- .../java/jersey2-java8/docs/UserApi.md | 4 +- .../petstore/java/jersey2/docs/UserApi.md | 4 +- .../docs/UserApi.md | 4 +- .../petstore/java/okhttp-gson/docs/UserApi.md | 4 +- .../java/rest-assured/docs/UserApi.md | 4 +- .../petstore/java/resteasy/docs/UserApi.md | 4 +- .../java/resttemplate-withXml/docs/UserApi.md | 4 +- .../java/resttemplate/docs/UserApi.md | 4 +- .../java/retrofit2-play24/docs/UserApi.md | 4 +- .../java/retrofit2-play25/docs/UserApi.md | 4 +- .../java/retrofit2-play26/docs/UserApi.md | 4 +- .../petstore/java/retrofit2/docs/UserApi.md | 4 +- .../petstore/java/retrofit2rx/docs/UserApi.md | 4 +- .../java/retrofit2rx2/docs/UserApi.md | 4 +- .../petstore/java/vertx/docs/UserApi.md | 4 +- .../petstore/java/webclient/docs/UserApi.md | 4 +- .../petstore/javascript-es6/docs/UserApi.md | 4 +- .../javascript-es6/src/api/UserApi.js | 4 +- .../javascript-promise-es6/docs/UserApi.md | 4 +- .../javascript-promise-es6/src/api/UserApi.js | 8 +- .../javascript-promise/docs/UserApi.md | 4 +- .../javascript-promise/src/api/UserApi.js | 8 +- .../petstore/javascript/docs/UserApi.md | 4 +- .../petstore/javascript/src/api/UserApi.js | 4 +- .../petstore/kotlin-string/docs/UserApi.md | 4 +- .../kotlin-threetenbp/docs/UserApi.md | 4 +- .../client/petstore/kotlin/docs/UserApi.md | 4 +- .../php/OpenAPIClient-php/docs/Api/UserApi.md | 8 +- .../petstore/python-asyncio/docs/UserApi.md | 8 +- .../petstore/python-tornado/docs/UserApi.md | 8 +- .../client/petstore/python/docs/UserApi.md | 8 +- samples/client/petstore/ruby/docs/UserApi.md | 8 +- .../php/OpenAPIClient-php/docs/Api/UserApi.md | 8 +- .../client/petstore/python/docs/UserApi.md | 8 +- .../client/petstore/ruby/docs/UserApi.md | 8 +- .../.openapi-generator-ignore | 23 +++ .../.openapi-generator/VERSION | 1 + .../kotlin-springboot-reactive/README.md | 21 ++ .../build.gradle.kts | 55 ++++++ .../kotlin-springboot-reactive/pom.xml | 151 ++++++++++++++ .../settings.gradle | 15 ++ .../kotlin/org/openapitools/Application.kt | 14 ++ .../kotlin/org/openapitools/api/PetApi.kt | 186 ++++++++++++++++++ .../org/openapitools/api/PetApiService.kt | 23 +++ .../org/openapitools/api/PetApiServiceImpl.kt | 41 ++++ .../kotlin/org/openapitools/api/StoreApi.kt | 109 ++++++++++ .../org/openapitools/api/StoreApiService.kt | 14 ++ .../openapitools/api/StoreApiServiceImpl.kt | 24 +++ .../kotlin/org/openapitools/api/UserApi.kt | 172 ++++++++++++++++ .../org/openapitools/api/UserApiService.kt | 22 +++ .../openapitools/api/UserApiServiceImpl.kt | 40 ++++ .../kotlin/org/openapitools/model/Category.kt | 29 +++ .../org/openapitools/model/InlineObject.kt | 29 +++ .../org/openapitools/model/InlineObject1.kt | 29 +++ .../openapitools/model/ModelApiResponse.kt | 33 ++++ .../kotlin/org/openapitools/model/Order.kt | 60 ++++++ .../main/kotlin/org/openapitools/model/Pet.kt | 64 ++++++ .../main/kotlin/org/openapitools/model/Tag.kt | 29 +++ .../kotlin/org/openapitools/model/User.kt | 53 +++++ .../src/main/resources/application.yaml | 10 + .../.openapi-generator/VERSION | 2 +- .../kotlin-springboot/build.gradle.kts | 13 +- .../petstore/kotlin-springboot/pom.xml | 36 +++- .../kotlin-springboot/settings.gradle | 14 ++ .../kotlin/org/openapitools/api/PetApi.kt | 54 +++-- .../org/openapitools/api/PetApiService.kt | 17 +- .../org/openapitools/api/PetApiServiceImpl.kt | 9 +- .../kotlin/org/openapitools/api/StoreApi.kt | 31 ++- .../org/openapitools/api/StoreApiService.kt | 9 +- .../openapitools/api/StoreApiServiceImpl.kt | 1 - .../kotlin/org/openapitools/api/UserApi.kt | 45 +++-- .../org/openapitools/api/UserApiService.kt | 17 +- .../openapitools/api/UserApiServiceImpl.kt | 5 +- .../kotlin/org/openapitools/model/Category.kt | 9 +- .../org/openapitools/model/InlineObject.kt | 9 +- .../org/openapitools/model/InlineObject1.kt | 11 +- .../openapitools/model/ModelApiResponse.kt | 9 +- .../kotlin/org/openapitools/model/Order.kt | 9 +- .../main/kotlin/org/openapitools/model/Pet.kt | 9 +- .../main/kotlin/org/openapitools/model/Tag.kt | 9 +- .../kotlin/org/openapitools/model/User.kt | 9 +- .../src/main/openapi/openapi.yaml | 2 - .../jaxrs-spec/src/main/openapi/openapi.yaml | 2 - .../.openapi-generator-ignore | 23 +++ .../.openapi-generator/VERSION | 1 + .../kotlin-springboot-reactive/README.md | 21 ++ .../build.gradle.kts | 55 ++++++ .../kotlin-springboot-reactive/pom.xml | 151 ++++++++++++++ .../settings.gradle | 15 ++ .../kotlin/org/openapitools/Application.kt | 14 ++ .../kotlin/org/openapitools/api/PetApi.kt | 185 +++++++++++++++++ .../org/openapitools/api/PetApiService.kt | 23 +++ .../org/openapitools/api/PetApiServiceImpl.kt | 41 ++++ .../kotlin/org/openapitools/api/StoreApi.kt | 108 ++++++++++ .../org/openapitools/api/StoreApiService.kt | 14 ++ .../openapitools/api/StoreApiServiceImpl.kt | 24 +++ .../kotlin/org/openapitools/api/UserApi.kt | 162 +++++++++++++++ .../org/openapitools/api/UserApiService.kt | 22 +++ .../openapitools/api/UserApiServiceImpl.kt | 40 ++++ .../kotlin/org/openapitools/model/Category.kt | 29 +++ .../openapitools/model/ModelApiResponse.kt | 33 ++++ .../kotlin/org/openapitools/model/Order.kt | 60 ++++++ .../main/kotlin/org/openapitools/model/Pet.kt | 64 ++++++ .../main/kotlin/org/openapitools/model/Tag.kt | 29 +++ .../kotlin/org/openapitools/model/User.kt | 53 +++++ .../src/main/resources/application.yaml | 10 + .../kotlin-springboot/build.gradle.kts | 13 +- .../server/petstore/kotlin-springboot/pom.xml | 36 +++- .../kotlin-springboot/settings.gradle | 14 ++ .../kotlin/org/openapitools/api/PetApi.kt | 5 +- .../org/openapitools/api/PetApiService.kt | 17 +- .../kotlin/org/openapitools/api/StoreApi.kt | 5 +- .../org/openapitools/api/StoreApiService.kt | 9 +- .../kotlin/org/openapitools/api/UserApi.kt | 5 +- .../org/openapitools/api/UserApiService.kt | 17 +- .../Resources/docs/Api/UserApiInterface.md | 4 +- .../output/openapi-v3/docs/default_api.md | 4 +- .../docs/user_api.md | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../src/main/resources/openapi.yaml | 2 - 146 files changed, 3078 insertions(+), 268 deletions(-) create mode 100755 bin/kotlin-springboot-petstore-all.sh create mode 100755 bin/kotlin-springboot-petstore-server-reactive.sh create mode 100755 bin/openapi3/kotlin-springboot-petstore-all.sh create mode 100755 bin/openapi3/kotlin-springboot-petstore-server-reactive.sh create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator-ignore create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/README.md create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/build.gradle.kts create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/pom.xml create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/settings.gradle create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt create mode 100644 samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml create mode 100644 samples/server/petstore/kotlin-springboot-reactive/.openapi-generator-ignore create mode 100644 samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION create mode 100644 samples/server/petstore/kotlin-springboot-reactive/README.md create mode 100644 samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts create mode 100644 samples/server/petstore/kotlin-springboot-reactive/pom.xml create mode 100644 samples/server/petstore/kotlin-springboot-reactive/settings.gradle create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml diff --git a/bin/kotlin-springboot-petstore-all.sh b/bin/kotlin-springboot-petstore-all.sh new file mode 100755 index 00000000000..b0ba7a6e825 --- /dev/null +++ b/bin/kotlin-springboot-petstore-all.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./bin/kotlin-springboot-petstore-server.sh +./bin/kotlin-springboot-petstore-server-reactive.sh \ No newline at end of file diff --git a/bin/kotlin-springboot-petstore-server-reactive.sh b/bin/kotlin-springboot-petstore-server-reactive.sh new file mode 100755 index 00000000000..f5e72350b62 --- /dev/null +++ b/bin/kotlin-springboot-petstore-server-reactive.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=$(ls -ld "$SCRIPT") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=$(dirname "$SCRIPT")/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=$(dirname "$SCRIPT")/.. + APP_DIR=$(cd "${APP_DIR}"; pwd) +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true" + +echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot-reactive" +rm -rf samples/server/petstore/kotlin-springboot-reactive + +echo "Generating Kotling Spring Boot reactive server..." +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-springboot-petstore-all.sh b/bin/openapi3/kotlin-springboot-petstore-all.sh new file mode 100755 index 00000000000..7aa4f697bbd --- /dev/null +++ b/bin/openapi3/kotlin-springboot-petstore-all.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./bin/openapi3/kotlin-springboot-petstore-server.sh +./bin/openapi3/kotlin-springboot-petstore-server-reactive.sh diff --git a/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh new file mode 100755 index 00000000000..8c0d80c4e52 --- /dev/null +++ b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=$(ls -ld "$SCRIPT") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=$(dirname "$SCRIPT")/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=$(dirname "$SCRIPT")/.. + APP_DIR=$(cd "${APP_DIR}"; pwd) +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/openapi3/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true" + +echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot-reactive" +rm -rf samples/server/openapi3/petstore/kotlin-springboot-reactive + +echo "Generating Kotling Spring Boot server..." +java $JAVA_OPTS -jar $executable $ags diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 29f53a6c1ed..0c4898f8015 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -20,10 +20,11 @@ sidebar_label: kotlin-spring |serverPort|configuration the port in which the sever is to run on| |8080| |modelPackage|model package for generated code| |org.openapitools.model| |apiPackage|api package for generated code| |org.openapitools.api| -|exceptionHandler|generate default global exception handlers| |true| +|exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true| |swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false| |serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| |serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| |useBeanValidation|Use BeanValidation API annotations to validate data types| |true| +|reactive|use coroutines for reactive behavior| |false| |library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
|spring-boot| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 96cc4998100..0c826154494 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4707,7 +4707,7 @@ public class DefaultCodegen implements CodegenConfig { codegenParameter.items = codegenProperty.items; codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; codegenParameter.dataType = getTypeDeclaration(arraySchema); - codegenParameter.baseType = getSchemaType(arraySchema); + codegenParameter.baseType = getSchemaType(inner); codegenParameter.isContainer = Boolean.TRUE; codegenParameter.isListContainer = Boolean.TRUE; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index f1420915317..8ac3ea459a5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -60,6 +60,8 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen public static final String SWAGGER_ANNOTATIONS = "swaggerAnnotations"; public static final String SERVICE_INTERFACE = "serviceInterface"; public static final String SERVICE_IMPLEMENTATION = "serviceImplementation"; + public static final String REACTIVE = "reactive"; + private String basePackage; private String invokerPackage; @@ -72,6 +74,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen private boolean swaggerAnnotations = false; private boolean serviceInterface = false; private boolean serviceImplementation = false; + private boolean reactive = false; public KotlinSpringServerCodegen() { super(); @@ -140,7 +143,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen addOption(SERVER_PORT, "configuration the port in which the sever is to run on", serverPort); addOption(CodegenConstants.MODEL_PACKAGE, "model package for generated code", modelPackage); addOption(CodegenConstants.API_PACKAGE, "api package for generated code", apiPackage); - addSwitch(EXCEPTION_HANDLER, "generate default global exception handlers", exceptionHandler); + addSwitch(EXCEPTION_HANDLER, "generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )", exceptionHandler); addSwitch(GRADLE_BUILD_FILE, "generate a gradle build file using the Kotlin DSL", gradleBuildFile); addSwitch(SWAGGER_ANNOTATIONS, "generate swagger annotations to go alongside controllers and models", swaggerAnnotations); addSwitch(SERVICE_INTERFACE, "generate service interfaces to go alongside controllers. In most " + @@ -149,7 +152,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen addSwitch(SERVICE_IMPLEMENTATION, "generate stub service implementations that extends service " + "interfaces. If this is set to true service interfaces will also be generated", serviceImplementation); addSwitch(USE_BEANVALIDATION, "Use BeanValidation API annotations to validate data types", useBeanValidation); - + addSwitch(REACTIVE, "use coroutines for reactive behavior", reactive); supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application."); setLibrary(SPRING_BOOT); @@ -240,6 +243,14 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen this.useBeanValidation = useBeanValidation; } + public boolean isReactive() { + return reactive; + } + + public void setReactive(boolean reactive) { + this.reactive = reactive; + } + @Override public CodegenType getTag() { return CodegenType.SERVER; @@ -332,6 +343,14 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen } writePropertyBack(USE_BEANVALIDATION, useBeanValidation); + if (additionalProperties.containsKey(REACTIVE) && library.equals(SPRING_BOOT)) { + this.setReactive(convertPropertyToBoolean(REACTIVE)); + // spring webflux doesn't support @ControllerAdvice + this.setExceptionHandler(false); + } + writePropertyBack(REACTIVE, reactive); + writePropertyBack(EXCEPTION_HANDLER, exceptionHandler); + modelTemplateFiles.put("model.mustache", ".kt"); apiTemplateFiles.put("api.mustache", ".kt"); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index 83c84799b30..fcf43b083b8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -14,7 +14,7 @@ import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController {{#useBeanValidation}} import org.springframework.validation.annotation.Validated {{/useBeanValidation}} @@ -39,10 +40,13 @@ import javax.validation.constraints.Pattern import javax.validation.constraints.Size {{/useBeanValidation}} +{{#reactive}} +import kotlinx.coroutines.flow.Flow; +{{/reactive}} import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController {{#useBeanValidation}} @Validated {{/useBeanValidation}} @@ -68,12 +72,12 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}}]){{/swaggerAnnotations}} @RequestMapping( value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}} - produces = "{{{vendorExtensions.x-accepts}}}", {{/hasProduces}}{{#hasConsumes}} + produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}} consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}} produces = [{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}} consumes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}} method = [RequestMethod.{{httpMethod}}]) - fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> { + {{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> { return {{>returnValue}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache index c05599c7b02..9d51d6d8c04 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody {{paramName}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody {{paramName}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isListContainer}}{{>optionalDataType}}{{/isListContainer}}{{#isListContainer}}Flow<{{{baseType}}}>{{/isListContainer}}{{/reactive}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache index 571f0179fa5..7c5a1991b49 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE") + classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") } } @@ -23,18 +23,26 @@ tasks.withType { } plugins { - val kotlinVersion = "1.2.60" + val kotlinVersion = "1.3.30" id("org.jetbrains.kotlin.jvm") version kotlinVersion id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion - id("org.springframework.boot") version "2.0.3.RELEASE" + id("org.springframework.boot") version "2.2.0.M3" id("io.spring.dependency-management") version "1.0.5.RELEASE" } dependencies { + val kotlinxCoroutinesVersion="1.2.0" compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") compile("org.jetbrains.kotlin:kotlin-reflect") +{{^reactive}} compile("org.springframework.boot:spring-boot-starter-web") +{{/reactive}} +{{#reactive}} + compile("org.springframework.boot:spring-boot-starter-webflux") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinxCoroutinesVersion") +{{/reactive}} {{#swaggerAnnotations}} compile("io.swagger:swagger-annotations:1.5.21") {{/swaggerAnnotations}} @@ -47,3 +55,9 @@ dependencies { exclude(module = "junit") } } + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache index e552565e4a4..bd651585009 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache @@ -6,12 +6,13 @@ {{artifactId}} {{artifactVersion}} - 1.2.60 + 1.3.30 + 1.2.0 org.springframework.boot spring-boot-starter-parent - 2.0.3.RELEASE + 2.2.0.M3 ${project.basedir}/src/main/kotlin @@ -77,8 +78,26 @@ org.springframework.boot +{{^reactive}} spring-boot-starter-web +{{/reactive}} +{{#reactive}} + spring-boot-starter-webflux +{{/reactive}} +{{#reactive}} + + org.jetbrains.kotlinx + kotlinx-coroutines-core + ${kotlinx-coroutines.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-reactor + ${kotlinx-coroutines.version} + +{{/reactive}} + {{#swaggerAnnotations}} io.swagger @@ -116,4 +135,34 @@ test + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/settingsGradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/settingsGradle.mustache index b8fd6c4c41f..290868e2793 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/settingsGradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/settingsGradle.mustache @@ -1 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} rootProject.name = "{{artifactId}}" \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache index 67d79cc198c..498e0aab4fd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache @@ -1 +1 @@ -{{#isMapContainer}}{{#reactive}}Mono<{{/reactive}}Map{{/reactive}}>{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flux{{/reactive}}{{^reactive}}List{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{#reactive}}Mono<{{{returnType}}}>{{/reactive}}{{^reactive}}{{{returnType}}}{{/reactive}}{{/returnContainer}} \ No newline at end of file +{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flow{{/reactive}}{{^reactive}}List{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache index 12b073f7009..e9abca8eba2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache @@ -2,12 +2,14 @@ package {{package}} {{#imports}}import {{import}} {{/imports}} - +{{#reactive}} +import kotlinx.coroutines.flow.Flow; +{{/reactive}} {{#operations}} interface {{classname}}Service { {{#operation}} - fun {{operationId}}({{#allParams}}{{paramName}}: {{>optionalDataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}} + {{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{paramName}}: {{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isListContainer}}{{>optionalDataType}}{{/isListContainer}}{{#isListContainer}}Flow<{{{baseType}}}>{{/isListContainer}}{{/reactive}}{{/isBodyParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}} {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/serviceImpl.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/serviceImpl.mustache index 32e62866af2..b110e81378f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/serviceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/serviceImpl.mustache @@ -2,13 +2,16 @@ package {{package}} {{#imports}}import {{import}} {{/imports}} +{{#reactive}} +import kotlinx.coroutines.flow.Flow; +{{/reactive}} import org.springframework.stereotype.Service @Service {{#operations}} class {{classname}}ServiceImpl : {{classname}}Service { {{#operation}} - override fun {{operationId}}({{#allParams}}{{paramName}}: {{>optionalDataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}} { + override {{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{paramName}}: {{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isListContainer}}{{>optionalDataType}}{{/isListContainer}}{{#isListContainer}}Flow<{{{baseType}}}>{{/isListContainer}}{{/reactive}}{{/isBodyParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}} { TODO("Implement me") } {{/operation}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 68c556e5b09..1a3634effc4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -53,7 +53,7 @@ public class JavaClientCodegenTest { CodegenParameter codegenParameter1 = codegen.fromRequestBody(body1, new HashSet(), null); Assert.assertEquals(codegenParameter1.description, "A list of ids"); Assert.assertEquals(codegenParameter1.dataType, "List"); - Assert.assertEquals(codegenParameter1.baseType, "List"); + Assert.assertEquals(codegenParameter1.baseType, "String"); RequestBody body2 = new RequestBody(); body2.setDescription("A list of list of values"); @@ -73,7 +73,7 @@ public class JavaClientCodegenTest { CodegenParameter codegenParameter3 = codegen.fromRequestBody(body3, new HashSet(), null); Assert.assertEquals(codegenParameter3.description, "A list of points"); Assert.assertEquals(codegenParameter3.dataType, "List"); - Assert.assertEquals(codegenParameter3.baseType, "List"); + Assert.assertEquals(codegenParameter3.baseType, "Point"); } @Test diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java index 339fc73c11b..1f16ac4a759 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java @@ -1104,7 +1104,7 @@ public class JavaModelTest { .items(new Schema<>().$ref("#/components/schemas/Pet")); Operation operation = new Operation() .requestBody(new RequestBody() - .content(new Content().addMediaType("application/json", + .content(new Content().addMediaType("application/json", new MediaType().schema(testSchema)))) .responses( new ApiResponses().addApiResponse("204", new ApiResponse() @@ -1116,7 +1116,7 @@ public class JavaModelTest { Assert.assertEquals(co.bodyParams.size(), 1); CodegenParameter cp1 = co.bodyParams.get(0); - Assert.assertEquals(cp1.baseType, "List"); + Assert.assertEquals(cp1.baseType, "Pet"); Assert.assertEquals(cp1.dataType, "List"); Assert.assertTrue(cp1.isContainer); Assert.assertTrue(cp1.isListContainer); @@ -1138,7 +1138,7 @@ public class JavaModelTest { Operation operation = new Operation().responses( new ApiResponses().addApiResponse("200", new ApiResponse() .description("Ok response") - .content(new Content().addMediaType("application/json", + .content(new Content().addMediaType("application/json", new MediaType().schema(testSchema))))); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Pet", new ObjectSchema().addProperties("name", new StringSchema())); final DefaultCodegen codegen = new JavaClientCodegen(); @@ -1184,7 +1184,7 @@ public class JavaModelTest { .items(new Schema<>().$ref("#/components/schemas/Pet"))); Operation operation = new Operation() .requestBody(new RequestBody() - .content(new Content().addMediaType("application/json", + .content(new Content().addMediaType("application/json", new MediaType().schema(testSchema)))) .responses( new ApiResponses().addApiResponse("204", new ApiResponse() @@ -1222,7 +1222,7 @@ public class JavaModelTest { Operation operation = new Operation().responses( new ApiResponses().addApiResponse("200", new ApiResponse() .description("Ok response") - .content(new Content().addMediaType("application/json", + .content(new Content().addMediaType("application/json", new MediaType().schema(testSchema))))); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Pet", new ObjectSchema().addProperties("name", new StringSchema())); final DefaultCodegen codegen = new JavaClientCodegen(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index 87847e16cf7..c830cd29b96 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -47,6 +47,7 @@ public class KotlinSpringServerCodegenTest { codegen.setServiceInterface(true); codegen.setServiceImplementation(true); codegen.setUseBeanValidation(false); + codegen.setReactive(false); codegen.processOpts(); Assert.assertEquals(codegen.modelPackage(), "xx.yyyyyyyy.model"); @@ -69,6 +70,8 @@ public class KotlinSpringServerCodegenTest { Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION), true); Assert.assertFalse(codegen.getUseBeanValidation()); Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.USE_BEANVALIDATION), false); + Assert.assertFalse(codegen.isReactive()); + Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.REACTIVE), false); } @Test @@ -84,6 +87,7 @@ public class KotlinSpringServerCodegenTest { codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_INTERFACE, true); codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true); codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_BEANVALIDATION, false); + codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, false); codegen.processOpts(); final OpenAPI openAPI = new OpenAPI(); @@ -112,6 +116,8 @@ public class KotlinSpringServerCodegenTest { Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION), true); Assert.assertFalse(codegen.getUseBeanValidation()); Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.USE_BEANVALIDATION), false); + Assert.assertFalse(codegen.isReactive()); + Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.REACTIVE), false); } @Test diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md index 342a3b3b40d..6b0b6bbef47 100644 --- a/samples/client/petstore/R/docs/UserApi.md +++ b/samples/client/petstore/R/docs/UserApi.md @@ -73,7 +73,7 @@ api.instance$CreateUsersWithArrayInput(var.body) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](array.md)| List of user object | + **body** | [**User**](User.md)| List of user object | ### Return type @@ -110,7 +110,7 @@ api.instance$CreateUsersWithListInput(var.body) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](array.md)| List of user object | + **body** | [**User**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md index 9a535e16a82..aedbf750cfc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md @@ -115,7 +115,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -173,7 +173,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md index 8d41e64c6b0..729be604bdb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md @@ -128,7 +128,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -194,7 +194,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md index ea19e0e716f..3201e1771dc 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md @@ -59,7 +59,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](array.md)| List of user object | +**body** | [**[]User**](User.md)| List of user object | ### Return type @@ -90,7 +90,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](array.md)| List of user object | +**body** | [**[]User**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/google-api-client/docs/UserApi.md +++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/jersey1/docs/UserApi.md +++ b/samples/client/petstore/java/jersey1/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/jersey2/docs/UserApi.md b/samples/client/petstore/java/jersey2/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/jersey2/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md index ca29da916ac..7f906eed6d9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md @@ -114,7 +114,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -173,7 +173,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md index ca29da916ac..7f906eed6d9 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md @@ -114,7 +114,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -173,7 +173,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/rest-assured/docs/UserApi.md b/samples/client/petstore/java/rest-assured/docs/UserApi.md index 5b581cb9275..5f5a5dbd362 100644 --- a/samples/client/petstore/java/rest-assured/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured/docs/UserApi.md @@ -81,7 +81,7 @@ api.createUsersWithArrayInput() Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -121,7 +121,7 @@ api.createUsersWithListInput() Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/UserApi.md b/samples/client/petstore/java/resteasy/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/resteasy/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/UserApi.md b/samples/client/petstore/java/resttemplate/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/resttemplate/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md index 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### 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 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md index 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/retrofit2/docs/UserApi.md b/samples/client/petstore/java/retrofit2/docs/UserApi.md index 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md index 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md index 9ffe8a7c390..31354a3cf10 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/UserApi.md b/samples/client/petstore/java/vertx/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/vertx/docs/UserApi.md +++ b/samples/client/petstore/java/vertx/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/java/webclient/docs/UserApi.md b/samples/client/petstore/java/webclient/docs/UserApi.md index 9133d79c33c..3baa2c50ea9 100644 --- a/samples/client/petstore/java/webclient/docs/UserApi.md +++ b/samples/client/petstore/java/webclient/docs/UserApi.md @@ -91,7 +91,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/javascript-es6/docs/UserApi.md b/samples/client/petstore/javascript-es6/docs/UserApi.md index 11b1a96e510..121ddbda665 100644 --- a/samples/client/petstore/javascript-es6/docs/UserApi.md +++ b/samples/client/petstore/javascript-es6/docs/UserApi.md @@ -87,7 +87,7 @@ apiInstance.createUsersWithArrayInput(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type @@ -130,7 +130,7 @@ apiInstance.createUsersWithListInput(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/javascript-es6/src/api/UserApi.js b/samples/client/petstore/javascript-es6/src/api/UserApi.js index 9c6c64ff776..aba7b237e69 100644 --- a/samples/client/petstore/javascript-es6/src/api/UserApi.js +++ b/samples/client/petstore/javascript-es6/src/api/UserApi.js @@ -85,7 +85,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response */ createUsersWithArrayInput(body, callback) { @@ -125,7 +125,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response */ createUsersWithListInput(body, callback) { diff --git a/samples/client/petstore/javascript-promise-es6/docs/UserApi.md b/samples/client/petstore/javascript-promise-es6/docs/UserApi.md index 4b3539b38f3..47af6eedad6 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/UserApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/UserApi.md @@ -85,7 +85,7 @@ apiInstance.createUsersWithArrayInput(body).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type @@ -127,7 +127,7 @@ apiInstance.createUsersWithListInput(body).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/javascript-promise-es6/src/api/UserApi.js b/samples/client/petstore/javascript-promise-es6/src/api/UserApi.js index 5e3cde6ee0f..4921080e947 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/UserApi.js @@ -84,7 +84,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ createUsersWithArrayInputWithHttpInfo(body) { @@ -116,7 +116,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ createUsersWithArrayInput(body) { @@ -129,7 +129,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ createUsersWithListInputWithHttpInfo(body) { @@ -161,7 +161,7 @@ export default class UserApi { /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ createUsersWithListInput(body) { diff --git a/samples/client/petstore/javascript-promise/docs/UserApi.md b/samples/client/petstore/javascript-promise/docs/UserApi.md index f46f57e5987..aedc1280eab 100644 --- a/samples/client/petstore/javascript-promise/docs/UserApi.md +++ b/samples/client/petstore/javascript-promise/docs/UserApi.md @@ -87,7 +87,7 @@ apiInstance.createUsersWithArrayInput(body).then(function() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type @@ -130,7 +130,7 @@ apiInstance.createUsersWithListInput(body).then(function() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index eba3f7d152f..0dba65ff97c 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -99,7 +99,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ this.createUsersWithArrayInputWithHttpInfo = function(body) { @@ -133,7 +133,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ this.createUsersWithArrayInput = function(body) { @@ -146,7 +146,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ this.createUsersWithListInputWithHttpInfo = function(body) { @@ -180,7 +180,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ this.createUsersWithListInput = function(body) { diff --git a/samples/client/petstore/javascript/docs/UserApi.md b/samples/client/petstore/javascript/docs/UserApi.md index 55bc1a7aae9..d405c1b6d20 100644 --- a/samples/client/petstore/javascript/docs/UserApi.md +++ b/samples/client/petstore/javascript/docs/UserApi.md @@ -91,7 +91,7 @@ apiInstance.createUsersWithArrayInput(body, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type @@ -136,7 +136,7 @@ apiInstance.createUsersWithListInput(body, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](Array.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index 10211feaabd..bd4f5966d1f 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -100,7 +100,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response */ this.createUsersWithArrayInput = function(body, callback) { @@ -142,7 +142,7 @@ /** * Creates list of users with given input array - * @param {Array.} body List of user object + * @param {Array.} body List of user object * @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response */ this.createUsersWithListInput = function(body, callback) { diff --git a/samples/client/petstore/kotlin-string/docs/UserApi.md b/samples/client/petstore/kotlin-string/docs/UserApi.md index 9c6055a9146..0f55f06bc62 100644 --- a/samples/client/petstore/kotlin-string/docs/UserApi.md +++ b/samples/client/petstore/kotlin-string/docs/UserApi.md @@ -89,7 +89,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type @@ -133,7 +133,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/kotlin-threetenbp/docs/UserApi.md b/samples/client/petstore/kotlin-threetenbp/docs/UserApi.md index 9c6055a9146..0f55f06bc62 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/UserApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/UserApi.md @@ -89,7 +89,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type @@ -133,7 +133,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/kotlin/docs/UserApi.md b/samples/client/petstore/kotlin/docs/UserApi.md index 9c6055a9146..0f55f06bc62 100644 --- a/samples/client/petstore/kotlin/docs/UserApi.md +++ b/samples/client/petstore/kotlin/docs/UserApi.md @@ -89,7 +89,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type @@ -133,7 +133,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object | + **body** | [**kotlin.Array<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md index 375bf0ce9f9..7cb382f9c17 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md @@ -88,7 +88,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$body = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object +$body = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object try { $apiInstance->createUsersWithArrayInput($body); @@ -103,7 +103,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object | + **body** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type @@ -141,7 +141,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$body = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object +$body = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object try { $apiInstance->createUsersWithListInput($body); @@ -156,7 +156,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object | + **body** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/python-asyncio/docs/UserApi.md b/samples/client/petstore/python-asyncio/docs/UserApi.md index fdc2c30df9b..783bb991ce1 100644 --- a/samples/client/petstore/python-asyncio/docs/UserApi.md +++ b/samples/client/petstore/python-asyncio/docs/UserApi.md @@ -83,7 +83,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -96,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type @@ -134,7 +134,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/python-tornado/docs/UserApi.md b/samples/client/petstore/python-tornado/docs/UserApi.md index fdc2c30df9b..783bb991ce1 100644 --- a/samples/client/petstore/python-tornado/docs/UserApi.md +++ b/samples/client/petstore/python-tornado/docs/UserApi.md @@ -83,7 +83,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -96,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type @@ -134,7 +134,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/python/docs/UserApi.md b/samples/client/petstore/python/docs/UserApi.md index fdc2c30df9b..783bb991ce1 100644 --- a/samples/client/petstore/python/docs/UserApi.md +++ b/samples/client/petstore/python/docs/UserApi.md @@ -83,7 +83,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -96,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type @@ -134,7 +134,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -body = None # list[User] | List of user object +body = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](list.md)| List of user object | + **body** | [**list[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/ruby/docs/UserApi.md b/samples/client/petstore/ruby/docs/UserApi.md index 1fa8d487e97..49a57ef5849 100644 --- a/samples/client/petstore/ruby/docs/UserApi.md +++ b/samples/client/petstore/ruby/docs/UserApi.md @@ -74,7 +74,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -body = nil # Array | List of user object +body = [Petstore::User.new] # Array | List of user object begin #Creates list of users with given input array @@ -89,7 +89,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Array<User>**](Array.md)| List of user object | + **body** | [**Array<User>**](User.md)| List of user object | ### Return type @@ -118,7 +118,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -body = nil # Array | List of user object +body = [Petstore::User.new] # Array | List of user object begin #Creates list of users with given input array @@ -133,7 +133,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Array<User>**](Array.md)| List of user object | + **body** | [**Array<User>**](User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md index 74b4b6122ee..0784a164518 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md @@ -88,7 +88,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$user = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object +$user = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object try { $apiInstance->createUsersWithArrayInput($user); @@ -103,7 +103,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object | + **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type @@ -141,7 +141,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$user = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object +$user = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object try { $apiInstance->createUsersWithListInput($user); @@ -156,7 +156,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object | + **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/python/docs/UserApi.md b/samples/openapi3/client/petstore/python/docs/UserApi.md index f8a548bd65d..0003f885052 100644 --- a/samples/openapi3/client/petstore/python/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/UserApi.md @@ -83,7 +83,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -user = None # list[User] | List of user object +user = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -96,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**list[User]**](list.md)| List of user object | + **user** | [**list[User]**](User.md)| List of user object | ### Return type @@ -134,7 +134,7 @@ from pprint import pprint # create an instance of the API class api_instance = petstore_api.UserApi() -user = None # list[User] | List of user object +user = [petstore_api.User()] # list[User] | List of user object try: # Creates list of users with given input array @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**list[User]**](list.md)| List of user object | + **user** | [**list[User]**](User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/ruby/docs/UserApi.md b/samples/openapi3/client/petstore/ruby/docs/UserApi.md index e3e55065528..631a65ef1f1 100644 --- a/samples/openapi3/client/petstore/ruby/docs/UserApi.md +++ b/samples/openapi3/client/petstore/ruby/docs/UserApi.md @@ -74,7 +74,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -user = nil # Array | List of user object +user = [Petstore::User.new] # Array | List of user object begin #Creates list of users with given input array @@ -89,7 +89,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**Array<User>**](Array.md)| List of user object | + **user** | [**Array<User>**](User.md)| List of user object | ### Return type @@ -118,7 +118,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -user = nil # Array | List of user object +user = [Petstore::User.new] # Array | List of user object begin #Creates list of users with given input array @@ -133,7 +133,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**Array<User>**](Array.md)| List of user object | + **user** | [**Array<User>**](User.md)| List of user object | ### Return type diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator-ignore b/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION new file mode 100644 index 00000000000..06b5019af3f --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/README.md b/samples/server/openapi3/petstore/kotlin-springboot-reactive/README.md new file mode 100644 index 00000000000..b6865a08113 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/README.md @@ -0,0 +1,21 @@ +# openAPIPetstore + +This Kotlin based [Spring Boot](https://spring.io/projects/spring-boot) application has been generated using the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). + +## Getting Started + +This document assumes you have either maven or gradle available, either via the wrapper or otherwise. This does not come with a gradle / maven wrapper checked in. + +By default a [`pom.xml`](pom.xml) file will be generated. If you specified `gradleBuildFile=true` when generating this project, a `build.gradle.kts` will also be generated. Note this uses [Gradle Kotlin DSL](https://github.com/gradle/kotlin-dsl). + +To build the project using maven, run: +```bash +mvn package && java -jar target/openapi-spring-1.0.0.jar +``` + +To build the project using gradle, run: +```bash +gradle build && java -jar build/libs/openapi-spring-1.0.0.jar +``` + +If all builds successfully, the server should run on [http://localhost:8080/](http://localhost:8080/) diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/server/openapi3/petstore/kotlin-springboot-reactive/build.gradle.kts new file mode 100644 index 00000000000..f62d3f33c8d --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/build.gradle.kts @@ -0,0 +1,55 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +buildscript { + repositories { + jcenter() + mavenCentral() + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") + } +} + +group = "org.openapitools" +version = "1.0.0" + +repositories { + jcenter() + mavenCentral() +} + +tasks.withType { + kotlinOptions.jvmTarget = "1.8" +} + +plugins { + val kotlinVersion = "1.3.30" + id("org.jetbrains.kotlin.jvm") version kotlinVersion + id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion + id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion + id("org.springframework.boot") version "2.2.0.M3" + id("io.spring.dependency-management") version "1.0.5.RELEASE" +} + +dependencies { + val kotlinxCoroutinesVersion="1.2.0" + compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + compile("org.jetbrains.kotlin:kotlin-reflect") + compile("org.springframework.boot:spring-boot-starter-webflux") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinxCoroutinesVersion") + compile("io.swagger:swagger-annotations:1.5.21") + compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") + compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") + compile("com.fasterxml.jackson.module:jackson-module-kotlin") + + testCompile("org.springframework.boot:spring-boot-starter-test") { + exclude(module = "junit") + } +} + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/pom.xml b/samples/server/openapi3/petstore/kotlin-springboot-reactive/pom.xml new file mode 100644 index 00000000000..1932017d4bf --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/pom.xml @@ -0,0 +1,151 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 1.3.30 + 1.2.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.0.M3 + + + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/test/kotlin + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + spring + + 1.8 + + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlin.version} + + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + + org.springframework.boot + spring-boot-starter-webflux + + + org.jetbrains.kotlinx + kotlinx-coroutines-core + ${kotlinx-coroutines.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-reactor + ${kotlinx-coroutines.version} + + + + io.swagger + swagger-annotations + 1.5.21 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-kotlin + + + + javax.validation + validation-api + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/settings.gradle b/samples/server/openapi3/petstore/kotlin-springboot-reactive/settings.gradle new file mode 100644 index 00000000000..e9bd5d32d7c --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} +rootProject.name = "openapi-spring" \ No newline at end of file diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt new file mode 100644 index 00000000000..f2ee49d476b --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt @@ -0,0 +1,14 @@ +package org.openapitools + +import org.springframework.boot.runApplication +import org.springframework.context.annotation.ComponentScan +import org.springframework.boot.autoconfigure.SpringBootApplication + + +@SpringBootApplication +@ComponentScan(basePackages = ["org.openapitools", "org.openapitools.api", "org.openapitools.model"]) +class Application + +fun main(args: Array) { + runApplication(*args) +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt new file mode 100644 index 00000000000..29de43b1a02 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -0,0 +1,186 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "Pet", description = "The Pet API") +@RequestMapping("\${api.base-path:/v2}") +class PetApiController(@Autowired(required = true) val service: PetApiService) { + + @ApiOperation( + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 405, message = "Invalid input")]) + @RequestMapping( + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.POST]) + suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet +): ResponseEntity { + return ResponseEntity(service.addPet(pet), HttpStatus.OK) + } + + @ApiOperation( + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid pet value")]) + @RequestMapping( + value = ["/pet/{petId}"], + method = [RequestMethod.DELETE]) + suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? +): ResponseEntity { + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + } + + @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 = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) + @RequestMapping( + value = ["/pet/findByStatus"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List +): ResponseEntity> { + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + } + + @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 = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + @RequestMapping( + value = ["/pet/findByTags"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List +,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int? +): ResponseEntity> { + return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK) + } + + @ApiOperation( + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet::class, + authorizations = [Authorization(value = "api_key")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) + @RequestMapping( + value = ["/pet/{petId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long +): ResponseEntity { + return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + } + + @ApiOperation( + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) + @RequestMapping( + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.PUT]) + suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet +): ResponseEntity { + return ResponseEntity(service.updatePet(pet), HttpStatus.OK) + } + + @ApiOperation( + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 405, message = "Invalid input")]) + @RequestMapping( + value = ["/pet/{petId}"], + consumes = ["application/x-www-form-urlencoded"], + method = [RequestMethod.POST]) + suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? +): ResponseEntity { + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + } + + @ApiOperation( + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse::class, + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) + @RequestMapping( + value = ["/pet/{petId}/uploadImage"], + produces = ["application/json"], + consumes = ["multipart/form-data"], + method = [RequestMethod.POST]) + suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? +,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? +): ResponseEntity { + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt new file mode 100644 index 00000000000..2bd53b2a56d --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -0,0 +1,23 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import kotlinx.coroutines.flow.Flow; +interface PetApiService { + + suspend fun addPet(pet: Pet): Unit + + suspend fun deletePet(petId: Long, apiKey: String?): Unit + + fun findPetsByStatus(status: List): Flow + + fun findPetsByTags(tags: List, maxCount: Int?): Flow + + suspend fun getPetById(petId: Long): Pet + + suspend fun updatePet(pet: Pet): Unit + + suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + + suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt new file mode 100644 index 00000000000..009f039d860 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -0,0 +1,41 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class PetApiServiceImpl : PetApiService { + + override suspend fun addPet(pet: Pet): Unit { + TODO("Implement me") + } + + override suspend fun deletePet(petId: Long, apiKey: String?): Unit { + TODO("Implement me") + } + + override fun findPetsByStatus(status: List): Flow { + TODO("Implement me") + } + + override fun findPetsByTags(tags: List, maxCount: Int?): Flow { + TODO("Implement me") + } + + override suspend fun getPetById(petId: Long): Pet { + TODO("Implement me") + } + + override suspend fun updatePet(pet: Pet): Unit { + TODO("Implement me") + } + + override suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + TODO("Implement me") + } + + override suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + TODO("Implement me") + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt new file mode 100644 index 00000000000..2ee42a77233 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -0,0 +1,109 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "Store", description = "The Store API") +@RequestMapping("\${api.base-path:/v2}") +class StoreApiController(@Autowired(required = true) val service: StoreApiService) { + + @ApiOperation( + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + @RequestMapping( + value = ["/store/order/{orderId}"], + method = [RequestMethod.DELETE]) + suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String +): ResponseEntity { + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + } + + @ApiOperation( + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Int::class, + responseContainer = "Map", + authorizations = [Authorization(value = "api_key")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + @RequestMapping( + value = ["/store/inventory"], + produces = ["application/json"], + method = [RequestMethod.GET]) + suspend fun getInventory(): ResponseEntity> { + return ResponseEntity(service.getInventory(), HttpStatus.OK) + } + + @ApiOperation( + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + response = Order::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + @RequestMapping( + value = ["/store/order/{orderId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long +): ResponseEntity { + return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + } + + @ApiOperation( + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) + @RequestMapping( + value = ["/store/order"], + produces = ["application/xml", "application/json"], + consumes = ["application/json"], + method = [RequestMethod.POST]) + suspend fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order +): ResponseEntity { + return ResponseEntity(service.placeOrder(order), HttpStatus.OK) + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt new file mode 100644 index 00000000000..84dc2837054 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -0,0 +1,14 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import kotlinx.coroutines.flow.Flow; +interface StoreApiService { + + suspend fun deleteOrder(orderId: String): Unit + + suspend fun getInventory(): Map + + suspend fun getOrderById(orderId: Long): Order + + suspend fun placeOrder(order: Order): Order +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt new file mode 100644 index 00000000000..f29e7e08c2e --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -0,0 +1,24 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class StoreApiServiceImpl : StoreApiService { + + override suspend fun deleteOrder(orderId: String): Unit { + TODO("Implement me") + } + + override suspend fun getInventory(): Map { + TODO("Implement me") + } + + override suspend fun getOrderById(orderId: Long): Order { + TODO("Implement me") + } + + override suspend fun placeOrder(order: Order): Order { + TODO("Implement me") + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt new file mode 100644 index 00000000000..1aed45eebdd --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -0,0 +1,172 @@ +package org.openapitools.api + +import org.openapitools.model.User +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "User", description = "The User API") +@RequestMapping("\${api.base-path:/v2}") +class UserApiController(@Autowired(required = true) val service: UserApiService) { + + @ApiOperation( + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user"], + consumes = ["application/json"], + method = [RequestMethod.POST]) + suspend fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User +): ResponseEntity { + return ResponseEntity(service.createUser(user), HttpStatus.OK) + } + + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/createWithArray"], + consumes = ["application/json"], + method = [RequestMethod.POST]) + suspend fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow +): ResponseEntity { + return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK) + } + + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/createWithList"], + consumes = ["application/json"], + method = [RequestMethod.POST]) + suspend fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow +): ResponseEntity { + return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK) + } + + @ApiOperation( + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + method = [RequestMethod.DELETE]) + suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String +): ResponseEntity { + return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + } + + @ApiOperation( + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String +): ResponseEntity { + return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + } + + @ApiOperation( + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + @RequestMapping( + value = ["/user/login"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String +): ResponseEntity { + return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + } + + @ApiOperation( + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/logout"], + method = [RequestMethod.GET]) + suspend fun logoutUser(): ResponseEntity { + return ResponseEntity(service.logoutUser(), HttpStatus.OK) + } + + @ApiOperation( + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + consumes = ["application/json"], + method = [RequestMethod.PUT]) + suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String +,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User +): ResponseEntity { + return ResponseEntity(service.updateUser(username, user), HttpStatus.OK) + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt new file mode 100644 index 00000000000..999ae4f4074 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -0,0 +1,22 @@ +package org.openapitools.api + +import org.openapitools.model.User +import kotlinx.coroutines.flow.Flow; +interface UserApiService { + + suspend fun createUser(user: User): Unit + + suspend fun createUsersWithArrayInput(user: Flow): Unit + + suspend fun createUsersWithListInput(user: Flow): Unit + + suspend fun deleteUser(username: String): Unit + + suspend fun getUserByName(username: String): User + + suspend fun loginUser(username: String, password: String): String + + suspend fun logoutUser(): Unit + + suspend fun updateUser(username: String, user: User): Unit +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt new file mode 100644 index 00000000000..8872d309e4d --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -0,0 +1,40 @@ +package org.openapitools.api + +import org.openapitools.model.User +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class UserApiServiceImpl : UserApiService { + + override suspend fun createUser(user: User): Unit { + TODO("Implement me") + } + + override suspend fun createUsersWithArrayInput(user: Flow): Unit { + TODO("Implement me") + } + + override suspend fun createUsersWithListInput(user: Flow): Unit { + TODO("Implement me") + } + + override suspend fun deleteUser(username: String): Unit { + TODO("Implement me") + } + + override suspend fun getUserByName(username: String): User { + TODO("Implement me") + } + + override suspend fun loginUser(username: String, password: String): String { + TODO("Implement me") + } + + override suspend fun logoutUser(): Unit { + TODO("Implement me") + } + + override suspend fun updateUser(username: String, user: User): Unit { + TODO("Implement me") + } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt new file mode 100644 index 00000000000..e042a7f997c --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A category for a pet + * @param id + * @param name + */ +data class Category ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, +@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: String? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt new file mode 100644 index 00000000000..e998bc995ce --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * + * @param name Updated name of the pet + * @param status Updated status of the pet + */ +data class InlineObject ( + + @ApiModelProperty(example = "null", value = "Updated name of the pet") + @JsonProperty("name") val name: String? = null, + + @ApiModelProperty(example = "null", value = "Updated status of the pet") + @JsonProperty("status") val status: String? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt new file mode 100644 index 00000000000..d29578fd0c0 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + */ +data class InlineObject1 ( + + @ApiModelProperty(example = "null", value = "Additional data to pass to server") + @JsonProperty("additionalMetadata") val additionalMetadata: String? = null, + + @ApiModelProperty(example = "null", value = "file to upload") + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt new file mode 100644 index 00000000000..2f844a9c356 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -0,0 +1,33 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +data class ModelApiResponse ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: Int? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: String? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt new file mode 100644 index 00000000000..e20d850491f --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -0,0 +1,60 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +data class Order ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: Int? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: Boolean? = null +) { + + /** + * Order Status + * Values: placed,approved,delivered + */ + enum class Status(val value: String) { + + @JsonProperty("placed") placed("placed"), + + @JsonProperty("approved") approved("approved"), + + @JsonProperty("delivered") delivered("delivered"); + + } + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt new file mode 100644 index 00000000000..9e054ac22f7 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -0,0 +1,64 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import org.openapitools.model.Category +import org.openapitools.model.Tag +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A pet for sale in the pet store + * @param id + * @param category + * @param name + * @param photoUrls + * @param tags + * @param status pet status in the store + */ +data class Pet ( + + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: String, + + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: List, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: List? = null, + + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null +) { + + /** + * pet status in the store + * Values: available,pending,sold + */ + enum class Status(val value: String) { + + @JsonProperty("available") available("available"), + + @JsonProperty("pending") pending("pending"), + + @JsonProperty("sold") sold("sold"); + + } + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt new file mode 100644 index 00000000000..40ef1b9a86b --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A tag for a pet + * @param id + * @param name + */ +data class Tag ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: String? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt new file mode 100644 index 00000000000..95fe12aa467 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -0,0 +1,53 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +data class User ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: String? = null, + + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: Int? = null +) { + +} + diff --git a/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml new file mode 100644 index 00000000000..8e2ebcde976 --- /dev/null +++ b/samples/server/openapi3/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml @@ -0,0 +1,10 @@ +spring: + application: + name: openAPIPetstore + + jackson: + serialization: + WRITE_DATES_AS_TIMESTAMPS: false + +server: + port: 8080 diff --git a/samples/server/openapi3/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/openapi3/petstore/kotlin-springboot/.openapi-generator/VERSION index afa63656064..06b5019af3f 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/openapi3/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts b/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts index f7a2deac996..0192dfa9162 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts +++ b/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE") + classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") } } @@ -23,15 +23,16 @@ tasks.withType { } plugins { - val kotlinVersion = "1.2.60" + val kotlinVersion = "1.3.30" id("org.jetbrains.kotlin.jvm") version kotlinVersion id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion - id("org.springframework.boot") version "2.0.3.RELEASE" + id("org.springframework.boot") version "2.2.0.M3" id("io.spring.dependency-management") version "1.0.5.RELEASE" } dependencies { + val kotlinxCoroutinesVersion="1.2.0" compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") compile("org.jetbrains.kotlin:kotlin-reflect") compile("org.springframework.boot:spring-boot-starter-web") @@ -44,3 +45,9 @@ dependencies { exclude(module = "junit") } } + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } +} diff --git a/samples/server/openapi3/petstore/kotlin-springboot/pom.xml b/samples/server/openapi3/petstore/kotlin-springboot/pom.xml index 96ed05a21d5..45c650bae0f 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/pom.xml +++ b/samples/server/openapi3/petstore/kotlin-springboot/pom.xml @@ -6,12 +6,13 @@ openapi-spring 1.0.0 - 1.2.60 + 1.3.30 + 1.2.0 org.springframework.boot spring-boot-starter-parent - 2.0.3.RELEASE + 2.2.0.M3 ${project.basedir}/src/main/kotlin @@ -79,6 +80,7 @@ org.springframework.boot spring-boot-starter-web + io.swagger swagger-annotations @@ -106,4 +108,34 @@ validation-api + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + diff --git a/samples/server/openapi3/petstore/kotlin-springboot/settings.gradle b/samples/server/openapi3/petstore/kotlin-springboot/settings.gradle index f0dd035311e..e9bd5d32d7c 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/settings.gradle +++ b/samples/server/openapi3/petstore/kotlin-springboot/settings.gradle @@ -1 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} rootProject.name = "openapi-spring" \ No newline at end of file diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index 8f49e172090..21d677c730c 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -2,11 +2,17 @@ package org.openapitools.api import org.openapitools.model.ModelApiResponse import org.openapitools.model.Pet -import io.swagger.annotations.* +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -14,18 +20,24 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest -import org.springframework.web.multipart.MultipartFile import org.springframework.beans.factory.annotation.Autowired import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "Pet", description = "The Pet API") @RequestMapping("\${api.base-path:/v2}") @@ -42,7 +54,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet"], consumes = ["application/json", "application/xml"], method = [RequestMethod.POST]) - fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet): ResponseEntity { + fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet +): ResponseEntity { return ResponseEntity(service.addPet(pet), HttpStatus.OK) } @@ -56,7 +69,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @RequestMapping( value = ["/pet/{petId}"], method = [RequestMethod.DELETE]) - fun deletePet(@ApiParam(value = "Pet id to delete", required=true, defaultValue="null") @PathVariable("petId") petId: Long,@ApiParam(value = "" , defaultValue="null") @RequestHeader(value="api_key", required=false) apiKey: String): ResponseEntity { + fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? +): ResponseEntity { return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) } @@ -73,7 +88,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByStatus"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold", defaultValue = "null") @Valid @RequestParam(value = "status", required = true, defaultValue="null") status: List): ResponseEntity> { + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List +): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) } @@ -90,8 +106,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByTags"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true, defaultValue = "null") @Valid @RequestParam(value = "tags", required = true, defaultValue="null") tags: List): ResponseEntity> { - return ResponseEntity(service.findPetsByTags(tags), HttpStatus.OK) + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List +,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int? +): ResponseEntity> { + return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK) } @ApiOperation( @@ -106,7 +124,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getPetById(@ApiParam(value = "ID of pet to return", required=true, defaultValue="null") @PathVariable("petId") petId: Long): ResponseEntity { + fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long +): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.OK) } @@ -121,7 +140,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet"], consumes = ["application/json", "application/xml"], method = [RequestMethod.PUT]) - fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet): ResponseEntity { + fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet +): ResponseEntity { return ResponseEntity(service.updatePet(pet), HttpStatus.OK) } @@ -136,7 +156,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"], method = [RequestMethod.POST]) - fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true, defaultValue="null") @PathVariable("petId") petId: Long,@ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestParam(value="name", required=false) name: String ,@ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestParam(value="status", required=false) status: String ): ResponseEntity { + fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? +): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) } @@ -153,7 +176,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"], method = [RequestMethod.POST]) - fun uploadFile(@ApiParam(value = "ID of pet to update", required=true, defaultValue="null") @PathVariable("petId") petId: Long,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: MultipartFile): ResponseEntity { + fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? +,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? +): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index c2e81c4c66b..1ef6953cb76 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -2,22 +2,21 @@ package org.openapitools.api import org.openapitools.model.ModelApiResponse import org.openapitools.model.Pet - interface PetApiService { - fun addPet(pet: Pet): Unit + fun addPet(pet: Pet): Unit - fun deletePet(petId: Long,apiKey: String): Unit + fun deletePet(petId: Long, apiKey: String?): Unit - fun findPetsByStatus(status: List): List + fun findPetsByStatus(status: List): List - fun findPetsByTags(tags: List): List + fun findPetsByTags(tags: List, maxCount: Int?): List - fun getPetById(petId: Long): Pet + fun getPetById(petId: Long): Pet - fun updatePet(pet: Pet): Unit + fun updatePet(pet: Pet): Unit - fun updatePetWithForm(petId: Long,name: String,status: String): Unit + fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit - fun uploadFile(petId: Long,additionalMetadata: String,file: org.springframework.web.multipart.MultipartFile): ModelApiResponse + fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 86ae8e06320..2b9815beddd 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -3,7 +3,6 @@ package org.openapitools.api import org.openapitools.model.ModelApiResponse import org.openapitools.model.Pet import org.springframework.stereotype.Service - @Service class PetApiServiceImpl : PetApiService { @@ -11,7 +10,7 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun deletePet(petId: Long,apiKey: String): Unit { + override fun deletePet(petId: Long, apiKey: String?): Unit { TODO("Implement me") } @@ -19,7 +18,7 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun findPetsByTags(tags: List): List { + override fun findPetsByTags(tags: List, maxCount: Int?): List { TODO("Implement me") } @@ -31,11 +30,11 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun updatePetWithForm(petId: Long,name: String,status: String): Unit { + override fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { TODO("Implement me") } - override fun uploadFile(petId: Long,additionalMetadata: String,file: org.springframework.web.multipart.MultipartFile): ModelApiResponse { + override fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { TODO("Implement me") } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index 6931bd2500c..3f1615634b1 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,11 +1,17 @@ package org.openapitools.api import org.openapitools.model.Order -import io.swagger.annotations.* +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -13,18 +19,24 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest -import org.springframework.web.multipart.MultipartFile import org.springframework.beans.factory.annotation.Autowired import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "Store", description = "The Store API") @RequestMapping("\${api.base-path:/v2}") @@ -39,7 +51,8 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @RequestMapping( value = ["/store/order/{orderId}"], method = [RequestMethod.DELETE]) - fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true, defaultValue="null") @PathVariable("orderId") orderId: String): ResponseEntity { + fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String +): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) } @@ -71,7 +84,8 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = ["/store/order/{orderId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true, defaultValue="null") @PathVariable("orderId") orderId: Long): ResponseEntity { + fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long +): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) } @@ -87,7 +101,8 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic produces = ["application/xml", "application/json"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order): ResponseEntity { + fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order +): ResponseEntity { return ResponseEntity(service.placeOrder(order), HttpStatus.OK) } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 7767fa87a8a..ce32895d219 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -1,14 +1,13 @@ package org.openapitools.api import org.openapitools.model.Order - interface StoreApiService { - fun deleteOrder(orderId: String): Unit + fun deleteOrder(orderId: String): Unit - fun getInventory(): Map + fun getInventory(): Map - fun getOrderById(orderId: Long): Order + fun getOrderById(orderId: Long): Order - fun placeOrder(order: Order): Order + fun placeOrder(order: Order): Order } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt index 850853758fe..ab4e08e794c 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -2,7 +2,6 @@ package org.openapitools.api import org.openapitools.model.Order import org.springframework.stereotype.Service - @Service class StoreApiServiceImpl : StoreApiService { diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index 71d5afca249..42f3e260903 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,11 +1,17 @@ package org.openapitools.api import org.openapitools.model.User -import io.swagger.annotations.* +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -13,18 +19,24 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest -import org.springframework.web.multipart.MultipartFile import org.springframework.beans.factory.annotation.Autowired import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "User", description = "The User API") @RequestMapping("\${api.base-path:/v2}") @@ -41,7 +53,8 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User): ResponseEntity { + fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User +): ResponseEntity { return ResponseEntity(service.createUser(user), HttpStatus.OK) } @@ -56,7 +69,8 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/createWithArray"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List): ResponseEntity { + fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List +): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK) } @@ -71,7 +85,8 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/createWithList"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List): ResponseEntity { + fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List +): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK) } @@ -85,7 +100,8 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.DELETE]) - fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true, defaultValue="null") @PathVariable("username") username: String): ResponseEntity { + fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String +): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.OK) } @@ -100,7 +116,8 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true, defaultValue="null") @PathVariable("username") username: String): ResponseEntity { + fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String +): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.OK) } @@ -115,7 +132,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/login"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true, defaultValue = "null") @Valid @RequestParam(value = "username", required = true, defaultValue="null") username: String,@NotNull @ApiParam(value = "The password for login in clear text", required = true, defaultValue = "null") @Valid @RequestParam(value = "password", required = true, defaultValue="null") password: String): ResponseEntity { + fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String +): ResponseEntity { return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) } @@ -144,7 +163,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], consumes = ["application/json"], method = [RequestMethod.PUT]) - fun updateUser(@ApiParam(value = "name that need to be deleted", required=true, defaultValue="null") @PathVariable("username") username: String,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User): ResponseEntity { + fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String +,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User +): ResponseEntity { return ResponseEntity(service.updateUser(username, user), HttpStatus.OK) } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt index b8a3d7ebae1..538b00df9bb 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -1,22 +1,21 @@ package org.openapitools.api import org.openapitools.model.User - interface UserApiService { - fun createUser(user: User): Unit + fun createUser(user: User): Unit - fun createUsersWithArrayInput(user: List): Unit + fun createUsersWithArrayInput(user: List): Unit - fun createUsersWithListInput(user: List): Unit + fun createUsersWithListInput(user: List): Unit - fun deleteUser(username: String): Unit + fun deleteUser(username: String): Unit - fun getUserByName(username: String): User + fun getUserByName(username: String): User - fun loginUser(username: String,password: String): String + fun loginUser(username: String, password: String): String - fun logoutUser(): Unit + fun logoutUser(): Unit - fun updateUser(username: String,user: User): Unit + fun updateUser(username: String, user: User): Unit } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt index 62b365a6d82..c15ee34dbdb 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -2,7 +2,6 @@ package org.openapitools.api import org.openapitools.model.User import org.springframework.stereotype.Service - @Service class UserApiServiceImpl : UserApiService { @@ -26,7 +25,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun loginUser(username: String,password: String): String { + override fun loginUser(username: String, password: String): String { TODO("Implement me") } @@ -34,7 +33,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun updateUser(username: String,user: User): Unit { + override fun updateUser(username: String, user: User): Unit { TODO("Implement me") } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index 499ed4743e1..e042a7f997c 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt index 3a1526a0db7..e998bc995ce 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt index 4600798bc9a..d29578fd0c0 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** @@ -17,7 +22,7 @@ data class InlineObject1 ( @JsonProperty("additionalMetadata") val additionalMetadata: String? = null, @ApiModelProperty(example = "null", value = "file to upload") - @JsonProperty("file") val file: java.io.File? = null + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null ) { } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 17697fdfe8d..2f844a9c356 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index be8e2f33fb3..e20d850491f 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -3,8 +3,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonValue -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 80af728b7e4..9e054ac22f7 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -5,8 +5,13 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonValue import org.openapitools.model.Category import org.openapitools.model.Tag -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index 70c706d00a6..40ef1b9a86b 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 4cfaf098874..95fe12aa467 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -2,8 +2,13 @@ package org.openapitools.model import java.util.Objects import com.fasterxml.jackson.annotation.JsonProperty -import javax.validation.Valid -import javax.validation.constraints.* +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 8cf0da5c953..67ecc530a56 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1736,8 +1736,6 @@ components: type: object type: object List: - example: - 123-list: 123-list properties: 123-list: type: string diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 8cf0da5c953..67ecc530a56 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1736,8 +1736,6 @@ components: type: object type: object List: - example: - 123-list: 123-list properties: 123-list: type: string diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator-ignore b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION new file mode 100644 index 00000000000..06b5019af3f --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/README.md b/samples/server/petstore/kotlin-springboot-reactive/README.md new file mode 100644 index 00000000000..b6865a08113 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/README.md @@ -0,0 +1,21 @@ +# openAPIPetstore + +This Kotlin based [Spring Boot](https://spring.io/projects/spring-boot) application has been generated using the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). + +## Getting Started + +This document assumes you have either maven or gradle available, either via the wrapper or otherwise. This does not come with a gradle / maven wrapper checked in. + +By default a [`pom.xml`](pom.xml) file will be generated. If you specified `gradleBuildFile=true` when generating this project, a `build.gradle.kts` will also be generated. Note this uses [Gradle Kotlin DSL](https://github.com/gradle/kotlin-dsl). + +To build the project using maven, run: +```bash +mvn package && java -jar target/openapi-spring-1.0.0.jar +``` + +To build the project using gradle, run: +```bash +gradle build && java -jar build/libs/openapi-spring-1.0.0.jar +``` + +If all builds successfully, the server should run on [http://localhost:8080/](http://localhost:8080/) diff --git a/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts new file mode 100644 index 00000000000..f62d3f33c8d --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts @@ -0,0 +1,55 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +buildscript { + repositories { + jcenter() + mavenCentral() + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") + } +} + +group = "org.openapitools" +version = "1.0.0" + +repositories { + jcenter() + mavenCentral() +} + +tasks.withType { + kotlinOptions.jvmTarget = "1.8" +} + +plugins { + val kotlinVersion = "1.3.30" + id("org.jetbrains.kotlin.jvm") version kotlinVersion + id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion + id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion + id("org.springframework.boot") version "2.2.0.M3" + id("io.spring.dependency-management") version "1.0.5.RELEASE" +} + +dependencies { + val kotlinxCoroutinesVersion="1.2.0" + compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + compile("org.jetbrains.kotlin:kotlin-reflect") + compile("org.springframework.boot:spring-boot-starter-webflux") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") + compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinxCoroutinesVersion") + compile("io.swagger:swagger-annotations:1.5.21") + compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") + compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") + compile("com.fasterxml.jackson.module:jackson-module-kotlin") + + testCompile("org.springframework.boot:spring-boot-starter-test") { + exclude(module = "junit") + } +} + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/server/petstore/kotlin-springboot-reactive/pom.xml new file mode 100644 index 00000000000..1932017d4bf --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/pom.xml @@ -0,0 +1,151 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 1.3.30 + 1.2.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.0.M3 + + + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/test/kotlin + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + spring + + 1.8 + + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlin.version} + + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + + org.springframework.boot + spring-boot-starter-webflux + + + org.jetbrains.kotlinx + kotlinx-coroutines-core + ${kotlinx-coroutines.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-reactor + ${kotlinx-coroutines.version} + + + + io.swagger + swagger-annotations + 1.5.21 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-kotlin + + + + javax.validation + validation-api + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + diff --git a/samples/server/petstore/kotlin-springboot-reactive/settings.gradle b/samples/server/petstore/kotlin-springboot-reactive/settings.gradle new file mode 100644 index 00000000000..e9bd5d32d7c --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} +rootProject.name = "openapi-spring" \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt new file mode 100644 index 00000000000..f2ee49d476b --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/Application.kt @@ -0,0 +1,14 @@ +package org.openapitools + +import org.springframework.boot.runApplication +import org.springframework.context.annotation.ComponentScan +import org.springframework.boot.autoconfigure.SpringBootApplication + + +@SpringBootApplication +@ComponentScan(basePackages = ["org.openapitools", "org.openapitools.api", "org.openapitools.model"]) +class Application + +fun main(args: Array) { + runApplication(*args) +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt new file mode 100644 index 00000000000..380c94d5acb --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -0,0 +1,185 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "Pet", description = "The Pet API") +@RequestMapping("\${api.base-path:/v2}") +class PetApiController(@Autowired(required = true) val service: PetApiService) { + + @ApiOperation( + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 405, message = "Invalid input")]) + @RequestMapping( + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.POST]) + suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet +): ResponseEntity { + return ResponseEntity(service.addPet(body), HttpStatus.OK) + } + + @ApiOperation( + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid pet value")]) + @RequestMapping( + value = ["/pet/{petId}"], + method = [RequestMethod.DELETE]) + suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? +): ResponseEntity { + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + } + + @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 = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) + @RequestMapping( + value = ["/pet/findByStatus"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List +): ResponseEntity> { + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + } + + @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 = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + @RequestMapping( + value = ["/pet/findByTags"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List +): ResponseEntity> { + return ResponseEntity(service.findPetsByTags(tags), HttpStatus.OK) + } + + @ApiOperation( + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet::class, + authorizations = [Authorization(value = "api_key")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) + @RequestMapping( + value = ["/pet/{petId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long +): ResponseEntity { + return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + } + + @ApiOperation( + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) + @RequestMapping( + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.PUT]) + suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet +): ResponseEntity { + return ResponseEntity(service.updatePet(body), HttpStatus.OK) + } + + @ApiOperation( + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 405, message = "Invalid input")]) + @RequestMapping( + value = ["/pet/{petId}"], + consumes = ["application/x-www-form-urlencoded"], + method = [RequestMethod.POST]) + suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? +): ResponseEntity { + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + } + + @ApiOperation( + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse::class, + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) + @RequestMapping( + value = ["/pet/{petId}/uploadImage"], + produces = ["application/json"], + consumes = ["multipart/form-data"], + method = [RequestMethod.POST]) + suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? +,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? +): ResponseEntity { + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt new file mode 100644 index 00000000000..613d30d3b1f --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -0,0 +1,23 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import kotlinx.coroutines.flow.Flow; +interface PetApiService { + + suspend fun addPet(body: Pet): Unit + + suspend fun deletePet(petId: Long, apiKey: String?): Unit + + fun findPetsByStatus(status: List): Flow + + fun findPetsByTags(tags: List): Flow + + suspend fun getPetById(petId: Long): Pet + + suspend fun updatePet(body: Pet): Unit + + suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + + suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt new file mode 100644 index 00000000000..56dee71b00c --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -0,0 +1,41 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class PetApiServiceImpl : PetApiService { + + override suspend fun addPet(body: Pet): Unit { + TODO("Implement me") + } + + override suspend fun deletePet(petId: Long, apiKey: String?): Unit { + TODO("Implement me") + } + + override fun findPetsByStatus(status: List): Flow { + TODO("Implement me") + } + + override fun findPetsByTags(tags: List): Flow { + TODO("Implement me") + } + + override suspend fun getPetById(petId: Long): Pet { + TODO("Implement me") + } + + override suspend fun updatePet(body: Pet): Unit { + TODO("Implement me") + } + + override suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + TODO("Implement me") + } + + override suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + TODO("Implement me") + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt new file mode 100644 index 00000000000..50840e05720 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -0,0 +1,108 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "Store", description = "The Store API") +@RequestMapping("\${api.base-path:/v2}") +class StoreApiController(@Autowired(required = true) val service: StoreApiService) { + + @ApiOperation( + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + @RequestMapping( + value = ["/store/order/{orderId}"], + method = [RequestMethod.DELETE]) + suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String +): ResponseEntity { + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + } + + @ApiOperation( + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Int::class, + responseContainer = "Map", + authorizations = [Authorization(value = "api_key")]) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + @RequestMapping( + value = ["/store/inventory"], + produces = ["application/json"], + method = [RequestMethod.GET]) + suspend fun getInventory(): ResponseEntity> { + return ResponseEntity(service.getInventory(), HttpStatus.OK) + } + + @ApiOperation( + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + response = Order::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + @RequestMapping( + value = ["/store/order/{orderId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long +): ResponseEntity { + return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + } + + @ApiOperation( + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) + @RequestMapping( + value = ["/store/order"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.POST]) + suspend fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody body: Order +): ResponseEntity { + return ResponseEntity(service.placeOrder(body), HttpStatus.OK) + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt new file mode 100644 index 00000000000..8c9ab08812f --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -0,0 +1,14 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import kotlinx.coroutines.flow.Flow; +interface StoreApiService { + + suspend fun deleteOrder(orderId: String): Unit + + suspend fun getInventory(): Map + + suspend fun getOrderById(orderId: Long): Order + + suspend fun placeOrder(body: Order): Order +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt new file mode 100644 index 00000000000..58657034b10 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -0,0 +1,24 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class StoreApiServiceImpl : StoreApiService { + + override suspend fun deleteOrder(orderId: String): Unit { + TODO("Implement me") + } + + override suspend fun getInventory(): Map { + TODO("Implement me") + } + + override suspend fun getOrderById(orderId: Long): Order { + TODO("Implement me") + } + + override suspend fun placeOrder(body: Order): Order { + TODO("Implement me") + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt new file mode 100644 index 00000000000..841b48df912 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -0,0 +1,162 @@ +package org.openapitools.api + +import org.openapitools.model.User +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import io.swagger.annotations.ApiResponse +import io.swagger.annotations.ApiResponses +import io.swagger.annotations.Authorization +import io.swagger.annotations.AuthorizationScope +import org.springframework.http.HttpStatus +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity + +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestHeader +import org.springframework.web.bind.annotation.RequestMethod +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.validation.annotation.Validated +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.beans.factory.annotation.Autowired + +import javax.validation.Valid +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size + +import kotlinx.coroutines.flow.Flow; +import kotlin.collections.List +import kotlin.collections.Map + +@RestController +@Validated +@Api(value = "User", description = "The User API") +@RequestMapping("\${api.base-path:/v2}") +class UserApiController(@Autowired(required = true) val service: UserApiService) { + + @ApiOperation( + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.") + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user"], + method = [RequestMethod.POST]) + suspend fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody body: User +): ResponseEntity { + return ResponseEntity(service.createUser(body), HttpStatus.OK) + } + + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "") + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/createWithArray"], + method = [RequestMethod.POST]) + suspend fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: Flow +): ResponseEntity { + return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.OK) + } + + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "") + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/createWithList"], + method = [RequestMethod.POST]) + suspend fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: Flow +): ResponseEntity { + return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.OK) + } + + @ApiOperation( + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.") + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + method = [RequestMethod.DELETE]) + suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String +): ResponseEntity { + return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + } + + @ApiOperation( + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String +): ResponseEntity { + return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + } + + @ApiOperation( + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String::class) + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + @RequestMapping( + value = ["/user/login"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String +): ResponseEntity { + return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + } + + @ApiOperation( + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "") + @ApiResponses( + value = [ApiResponse(code = 200, message = "successful operation")]) + @RequestMapping( + value = ["/user/logout"], + method = [RequestMethod.GET]) + suspend fun logoutUser(): ResponseEntity { + return ResponseEntity(service.logoutUser(), HttpStatus.OK) + } + + @ApiOperation( + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.") + @ApiResponses( + value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) + @RequestMapping( + value = ["/user/{username}"], + method = [RequestMethod.PUT]) + suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String +,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User +): ResponseEntity { + return ResponseEntity(service.updateUser(username, body), HttpStatus.OK) + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt new file mode 100644 index 00000000000..219580e9f06 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -0,0 +1,22 @@ +package org.openapitools.api + +import org.openapitools.model.User +import kotlinx.coroutines.flow.Flow; +interface UserApiService { + + suspend fun createUser(body: User): Unit + + suspend fun createUsersWithArrayInput(body: Flow): Unit + + suspend fun createUsersWithListInput(body: Flow): Unit + + suspend fun deleteUser(username: String): Unit + + suspend fun getUserByName(username: String): User + + suspend fun loginUser(username: String, password: String): String + + suspend fun logoutUser(): Unit + + suspend fun updateUser(username: String, body: User): Unit +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt new file mode 100644 index 00000000000..d26e1a675ee --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -0,0 +1,40 @@ +package org.openapitools.api + +import org.openapitools.model.User +import kotlinx.coroutines.flow.Flow; +import org.springframework.stereotype.Service +@Service +class UserApiServiceImpl : UserApiService { + + override suspend fun createUser(body: User): Unit { + TODO("Implement me") + } + + override suspend fun createUsersWithArrayInput(body: Flow): Unit { + TODO("Implement me") + } + + override suspend fun createUsersWithListInput(body: Flow): Unit { + TODO("Implement me") + } + + override suspend fun deleteUser(username: String): Unit { + TODO("Implement me") + } + + override suspend fun getUserByName(username: String): User { + TODO("Implement me") + } + + override suspend fun loginUser(username: String, password: String): String { + TODO("Implement me") + } + + override suspend fun logoutUser(): Unit { + TODO("Implement me") + } + + override suspend fun updateUser(username: String, body: User): Unit { + TODO("Implement me") + } +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt new file mode 100644 index 00000000000..1a1dbf7223c --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A category for a pet + * @param id + * @param name + */ +data class Category ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt new file mode 100644 index 00000000000..2f844a9c356 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -0,0 +1,33 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +data class ModelApiResponse ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: Int? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt new file mode 100644 index 00000000000..e20d850491f --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -0,0 +1,60 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +data class Order ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: Int? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: Boolean? = null +) { + + /** + * Order Status + * Values: placed,approved,delivered + */ + enum class Status(val value: String) { + + @JsonProperty("placed") placed("placed"), + + @JsonProperty("approved") approved("approved"), + + @JsonProperty("delivered") delivered("delivered"); + + } + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt new file mode 100644 index 00000000000..9e054ac22f7 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -0,0 +1,64 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import org.openapitools.model.Category +import org.openapitools.model.Tag +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A pet for sale in the pet store + * @param id + * @param category + * @param name + * @param photoUrls + * @param tags + * @param status pet status in the store + */ +data class Pet ( + + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: String, + + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: List, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: List? = null, + + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null +) { + + /** + * pet status in the store + * Values: available,pending,sold + */ + enum class Status(val value: String) { + + @JsonProperty("available") available("available"), + + @JsonProperty("pending") pending("pending"), + + @JsonProperty("sold") sold("sold"); + + } + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt new file mode 100644 index 00000000000..40ef1b9a86b --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -0,0 +1,29 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A tag for a pet + * @param id + * @param name + */ +data class Tag ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt new file mode 100644 index 00000000000..95fe12aa467 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -0,0 +1,53 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import io.swagger.annotations.ApiModelProperty + +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +data class User ( + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: Long? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: String? = null, + + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: String? = null, + + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: Int? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml b/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml new file mode 100644 index 00000000000..8e2ebcde976 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/application.yaml @@ -0,0 +1,10 @@ +spring: + application: + name: openAPIPetstore + + jackson: + serialization: + WRITE_DATES_AS_TIMESTAMPS: false + +server: + port: 8080 diff --git a/samples/server/petstore/kotlin-springboot/build.gradle.kts b/samples/server/petstore/kotlin-springboot/build.gradle.kts index 29ca3edef7e..26f4601e570 100644 --- a/samples/server/petstore/kotlin-springboot/build.gradle.kts +++ b/samples/server/petstore/kotlin-springboot/build.gradle.kts @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE") + classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") } } @@ -23,15 +23,16 @@ tasks.withType { } plugins { - val kotlinVersion = "1.2.60" + val kotlinVersion = "1.3.30" id("org.jetbrains.kotlin.jvm") version kotlinVersion id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion - id("org.springframework.boot") version "2.0.3.RELEASE" + id("org.springframework.boot") version "2.2.0.M3" id("io.spring.dependency-management") version "1.0.5.RELEASE" } dependencies { + val kotlinxCoroutinesVersion="1.2.0" compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") compile("org.jetbrains.kotlin:kotlin-reflect") compile("org.springframework.boot:spring-boot-starter-web") @@ -45,3 +46,9 @@ dependencies { exclude(module = "junit") } } + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } +} diff --git a/samples/server/petstore/kotlin-springboot/pom.xml b/samples/server/petstore/kotlin-springboot/pom.xml index 71876ce723f..10720393bf0 100644 --- a/samples/server/petstore/kotlin-springboot/pom.xml +++ b/samples/server/petstore/kotlin-springboot/pom.xml @@ -6,12 +6,13 @@ openapi-spring 1.0.0 - 1.2.60 + 1.3.30 + 1.2.0 org.springframework.boot spring-boot-starter-parent - 2.0.3.RELEASE + 2.2.0.M3 ${project.basedir}/src/main/kotlin @@ -79,6 +80,7 @@ org.springframework.boot spring-boot-starter-web + io.swagger swagger-annotations @@ -112,4 +114,34 @@ test + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + diff --git a/samples/server/petstore/kotlin-springboot/settings.gradle b/samples/server/petstore/kotlin-springboot/settings.gradle index f0dd035311e..e9bd5d32d7c 100644 --- a/samples/server/petstore/kotlin-springboot/settings.gradle +++ b/samples/server/petstore/kotlin-springboot/settings.gradle @@ -1 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} rootProject.name = "openapi-spring" \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index 2f70853c857..b62a21f79cf 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -12,7 +12,7 @@ import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -36,7 +37,7 @@ import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "Pet", description = "The Pet API") @RequestMapping("\${api.base-path:/v2}") diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index 741a97d8603..8e5d3cfd6e1 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -2,22 +2,21 @@ package org.openapitools.api import org.openapitools.model.ModelApiResponse import org.openapitools.model.Pet - interface PetApiService { - fun addPet(body: Pet): Unit + fun addPet(body: Pet): Unit - fun deletePet(petId: Long, apiKey: String?): Unit + fun deletePet(petId: Long, apiKey: String?): Unit - fun findPetsByStatus(status: List): List + fun findPetsByStatus(status: List): List - fun findPetsByTags(tags: List): List + fun findPetsByTags(tags: List): List - fun getPetById(petId: Long): Pet + fun getPetById(petId: Long): Pet - fun updatePet(body: Pet): Unit + fun updatePet(body: Pet): Unit - fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit - fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse + fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index ed467c5700e..b33120544b9 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -11,7 +11,7 @@ import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -35,7 +36,7 @@ import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "Store", description = "The Store API") @RequestMapping("\${api.base-path:/v2}") diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt index cf479e2c8a7..8ddca95e7d5 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -1,14 +1,13 @@ package org.openapitools.api import org.openapitools.model.Order - interface StoreApiService { - fun deleteOrder(orderId: String): Unit + fun deleteOrder(orderId: String): Unit - fun getInventory(): Map + fun getInventory(): Map - fun getOrderById(orderId: Long): Order + fun getOrderById(orderId: Long): Order - fun placeOrder(body: Order): Order + fun placeOrder(body: Order): Order } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index bab2a54b117..a785944a279 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -11,7 +11,7 @@ import io.swagger.annotations.AuthorizationScope import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.stereotype.Controller + import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestPart import org.springframework.web.bind.annotation.RequestParam @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestHeader import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -35,7 +36,7 @@ import javax.validation.constraints.Size import kotlin.collections.List import kotlin.collections.Map -@Controller +@RestController @Validated @Api(value = "User", description = "The User API") @RequestMapping("\${api.base-path:/v2}") diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt index de61cf72c43..f7286538c60 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -1,22 +1,21 @@ package org.openapitools.api import org.openapitools.model.User - interface UserApiService { - fun createUser(body: User): Unit + fun createUser(body: User): Unit - fun createUsersWithArrayInput(body: List): Unit + fun createUsersWithArrayInput(body: List): Unit - fun createUsersWithListInput(body: List): Unit + fun createUsersWithListInput(body: List): Unit - fun deleteUser(username: String): Unit + fun deleteUser(username: String): Unit - fun getUserByName(username: String): User + fun getUserByName(username: String): User - fun loginUser(username: String, password: String): String + fun loginUser(username: String, password: String): String - fun logoutUser(): Unit + fun logoutUser(): Unit - fun updateUser(username: String, body: User): Unit + fun updateUser(username: String, body: User): Unit } diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/UserApiInterface.md b/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/UserApiInterface.md index b0b43a35b5d..571e9dcbf29 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/UserApiInterface.md +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/UserApiInterface.md @@ -115,7 +115,7 @@ class UserApi implements UserApiInterface Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object | + **body** | [**OpenAPI\Server\Model\User**](../Model/User.md)| List of user object | ### Return type @@ -167,7 +167,7 @@ class UserApi implements UserApiInterface Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object | + **body** | [**OpenAPI\Server\Model\User**](../Model/User.md)| List of user object | ### Return type diff --git a/samples/server/petstore/rust-server/output/openapi-v3/docs/default_api.md b/samples/server/petstore/rust-server/output/openapi-v3/docs/default_api.md index 0ec3e5c9f1f..b8652374c9d 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/docs/default_api.md +++ b/samples/server/petstore/rust-server/output/openapi-v3/docs/default_api.md @@ -116,7 +116,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **string** | [**array**](array.md)| | + **string** | [**string**](string.md)| | ### Return type @@ -148,7 +148,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **string** | [**array**](array.md)| | + **string** | [**string**](string.md)| | ### Return type diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/user_api.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/user_api.md index 9698e5b23d9..908faa76175 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/user_api.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/user_api.md @@ -49,7 +49,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**array**](array.md)| List of user object | + **body** | [**User**](User.md)| List of user object | ### Return type @@ -74,7 +74,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**array**](array.md)| List of user object | + **body** | [**User**](User.md)| List of user object | ### Return type diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index f0ef5dafb59..d2abe3e1f6e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -50,7 +50,7 @@ public interface UserApi { @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping(value = "/user/createWithArray", method = RequestMethod.POST) - default Mono> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody Flux body, ServerWebExchange exchange) { + default Mono> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody Flux body, ServerWebExchange exchange) { return getDelegate().createUsersWithArrayInput(body, exchange); } @@ -60,7 +60,7 @@ public interface UserApi { @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping(value = "/user/createWithList", method = RequestMethod.POST) - default Mono> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody Flux body, ServerWebExchange exchange) { + default Mono> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody Flux body, ServerWebExchange exchange) { return getDelegate().createUsersWithListInput(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index a56614beabd..156ba16a769 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -41,7 +41,7 @@ public interface UserApiDelegate { /** * @see UserApi#createUsersWithArrayInput */ - default Mono> createUsersWithArrayInput(Flux body, + default Mono> createUsersWithArrayInput(Flux body, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); @@ -52,7 +52,7 @@ public interface UserApiDelegate { /** * @see UserApi#createUsersWithListInput */ - default Mono> createUsersWithListInput(Flux body, + default Mono> createUsersWithListInput(Flux body, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 8cf0da5c953..67ecc530a56 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1736,8 +1736,6 @@ components: type: object type: object List: - example: - 123-list: 123-list properties: 123-list: type: string From 740325f885f3d4949343cea9e84e4462ce0c37a8 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 2 Jun 2019 19:35:49 -0400 Subject: [PATCH 02/73] Updates sample generated content (#3068) Generates samples to match with code introduced in #2934. --- .../petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md index 9a535e16a82..aedbf750cfc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md @@ -115,7 +115,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -173,7 +173,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type From ded0bd6801588e58660233a04384bf0c0f9536a7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Jun 2019 11:41:38 +0800 Subject: [PATCH 03/73] Update CI badges to 4.1.x (#3069) Update CI badges to 4.1.x --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a079e9c6014..b43c267dee3 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.1`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.2`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) -[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/4.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) -[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/4.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) -[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=4.0.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) -[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=4.0.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) +[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.1.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/4.1.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/4.1.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) +[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=4.1.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) +[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=4.1.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) [`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) From 25dce23d8118c374ce5a992c93e1fb059f00f0a9 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 3 Jun 2019 13:07:55 +0530 Subject: [PATCH 04/73] fix(java-jersey2): Fixing javadocs warnings (#3040) * edit fix(java-jersey2): Fixing javadocs warnings * fix(java-jersey): Updating pet project --- .../resources/Java/libraries/jersey2/ApiClient.mustache | 2 ++ .../main/resources/Java/libraries/jersey2/api.mustache | 2 -- .../src/main/java/org/openapitools/client/ApiClient.java | 2 ++ .../main/java/org/openapitools/client/api/FakeApi.java | 8 ++++++++ .../src/main/java/org/openapitools/client/api/PetApi.java | 4 ++++ .../main/java/org/openapitools/client/api/StoreApi.java | 1 + .../main/java/org/openapitools/client/api/UserApi.java | 6 ++++++ .../src/main/java/org/openapitools/client/ApiClient.java | 2 ++ .../main/java/org/openapitools/client/api/FakeApi.java | 8 ++++++++ .../src/main/java/org/openapitools/client/api/PetApi.java | 4 ++++ .../main/java/org/openapitools/client/api/StoreApi.java | 1 + .../main/java/org/openapitools/client/api/UserApi.java | 6 ++++++ .../src/main/java/org/openapitools/client/ApiClient.java | 2 ++ .../main/java/org/openapitools/client/api/FakeApi.java | 8 ++++++++ .../src/main/java/org/openapitools/client/api/PetApi.java | 4 ++++ .../main/java/org/openapitools/client/api/StoreApi.java | 1 + .../main/java/org/openapitools/client/api/UserApi.java | 6 ++++++ 17 files changed, 65 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 9b19457b04c..1007a857ca0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -808,6 +808,8 @@ public class ApiClient { * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters */ protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { for (String authName : authNames) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index a275689bba5..9c218e35bfa 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -75,9 +75,7 @@ public class {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - {{#returnType}} * @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> - {{/returnType}} * @throws ApiException if fails to make API call {{#isDeprecated}} * @deprecated diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java index 89c2a8f51dd..2c65b8884f0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java @@ -784,6 +784,8 @@ public class ApiClient { * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters */ protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { for (String authName : authNames) { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index 7ee000303b9..f6d6a10a153 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -58,6 +58,7 @@ public class FakeApi { * creates an XmlItem * this route creates an XmlItem * @param xmlItem XmlItem Body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -297,6 +298,7 @@ public class FakeApi { * * For this test, the body for this request much reference a schema named `File`. * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -350,6 +352,7 @@ public class FakeApi { * * @param query (required) * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -485,6 +488,7 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -593,6 +597,7 @@ if (paramCallback != null) * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -661,6 +666,7 @@ if (enumFormString != null) * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -730,6 +736,7 @@ if (booleanGroup != null) * test inline additionalProperties * * @param param request body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -783,6 +790,7 @@ if (booleanGroup != null) * * @param param field1 (required) * @param param2 field2 (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index dad8fa34339..a78d6e3919c 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -52,6 +52,7 @@ public class PetApi { * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -105,6 +106,7 @@ public class PetApi { * * @param petId Pet id to delete (required) * @param apiKey (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -322,6 +324,7 @@ public class PetApi { * Update an existing pet * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -377,6 +380,7 @@ public class PetApi { * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java index 91aaa01157d..97d237b70c1 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java @@ -50,6 +50,7 @@ public class StoreApi { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java index a91765dfdb9..079174b7c57 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java @@ -50,6 +50,7 @@ public class UserApi { * Create user * This can only be done by the logged in user. * @param body Created user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -101,6 +102,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -152,6 +154,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -203,6 +206,7 @@ public class UserApi { * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -367,6 +371,7 @@ public class UserApi { /** * Logs out current logged in user session * + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -415,6 +420,7 @@ public class UserApi { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index 81c14285e6b..4a03feb3b8f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -787,6 +787,8 @@ public class ApiClient { * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters */ protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { for (String authName : authNames) { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 7ed375ab181..d8c1e0e73ff 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -58,6 +58,7 @@ public class FakeApi { * creates an XmlItem * this route creates an XmlItem * @param xmlItem XmlItem Body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -297,6 +298,7 @@ public class FakeApi { * * For this test, the body for this request much reference a schema named `File`. * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -350,6 +352,7 @@ public class FakeApi { * * @param query (required) * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -485,6 +488,7 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -593,6 +597,7 @@ if (paramCallback != null) * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -661,6 +666,7 @@ if (enumFormString != null) * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -730,6 +736,7 @@ if (booleanGroup != null) * test inline additionalProperties * * @param param request body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -783,6 +790,7 @@ if (booleanGroup != null) * * @param param field1 (required) * @param param2 field2 (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index dad8fa34339..a78d6e3919c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -52,6 +52,7 @@ public class PetApi { * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -105,6 +106,7 @@ public class PetApi { * * @param petId Pet id to delete (required) * @param apiKey (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -322,6 +324,7 @@ public class PetApi { * Update an existing pet * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -377,6 +380,7 @@ public class PetApi { * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 91aaa01157d..97d237b70c1 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -50,6 +50,7 @@ public class StoreApi { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index a91765dfdb9..079174b7c57 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -50,6 +50,7 @@ public class UserApi { * Create user * This can only be done by the logged in user. * @param body Created user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -101,6 +102,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -152,6 +154,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -203,6 +206,7 @@ public class UserApi { * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -367,6 +371,7 @@ public class UserApi { /** * Logs out current logged in user session * + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -415,6 +420,7 @@ public class UserApi { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java index 81c14285e6b..4a03feb3b8f 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java @@ -787,6 +787,8 @@ public class ApiClient { * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters */ protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { for (String authName : authNames) { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index 7ee000303b9..f6d6a10a153 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -58,6 +58,7 @@ public class FakeApi { * creates an XmlItem * this route creates an XmlItem * @param xmlItem XmlItem Body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -297,6 +298,7 @@ public class FakeApi { * * For this test, the body for this request much reference a schema named `File`. * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -350,6 +352,7 @@ public class FakeApi { * * @param query (required) * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -485,6 +488,7 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -593,6 +597,7 @@ if (paramCallback != null) * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -661,6 +666,7 @@ if (enumFormString != null) * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -730,6 +736,7 @@ if (booleanGroup != null) * test inline additionalProperties * * @param param request body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -783,6 +790,7 @@ if (booleanGroup != null) * * @param param field1 (required) * @param param2 field2 (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index dad8fa34339..a78d6e3919c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -52,6 +52,7 @@ public class PetApi { * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -105,6 +106,7 @@ public class PetApi { * * @param petId Pet id to delete (required) * @param apiKey (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -322,6 +324,7 @@ public class PetApi { * Update an existing pet * * @param body Pet object that needs to be added to the store (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -377,6 +380,7 @@ public class PetApi { * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java index 91aaa01157d..97d237b70c1 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -50,6 +50,7 @@ public class StoreApi { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java index a91765dfdb9..079174b7c57 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java @@ -50,6 +50,7 @@ public class UserApi { * Create user * This can only be done by the logged in user. * @param body Created user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -101,6 +102,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -152,6 +154,7 @@ public class UserApi { * Creates list of users with given input array * * @param body List of user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -203,6 +206,7 @@ public class UserApi { * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -367,6 +371,7 @@ public class UserApi { /** * Logs out current logged in user session * + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -415,6 +420,7 @@ public class UserApi { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { From b5121745a868c5b74bfd0c37c5b156ddbad93165 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferrai Date: Mon, 3 Jun 2019 10:38:31 +0300 Subject: [PATCH 05/73] [JavaScript] Remove default parameters syntax, as it's an ES6 feature (#2848) * Remove default parameters in JS client, as it's an ES6 feature * update js petstore samples --- .../src/main/resources/Javascript/ApiClient.mustache | 3 ++- samples/client/petstore/javascript-promise/src/ApiClient.js | 3 ++- samples/client/petstore/javascript/src/ApiClient.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache index 6fb2e025160..64c0fab0fd5 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache @@ -651,7 +651,8 @@ ]; }; - exports.getBasePathFromSettings = function(index, variables={}) { + exports.getBasePathFromSettings = function(index, variables) { + var variables = variables || {}; var servers = this.hostSettings(); // check array index out of bound diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 18c0ddcc5c5..4fef040e2b5 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -598,7 +598,8 @@ ]; }; - exports.getBasePathFromSettings = function(index, variables={}) { + exports.getBasePathFromSettings = function(index, variables) { + var variables = variables || {}; var servers = this.hostSettings(); // check array index out of bound diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index 615bd7a772e..b952b5cb910 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -609,7 +609,8 @@ ]; }; - exports.getBasePathFromSettings = function(index, variables={}) { + exports.getBasePathFromSettings = function(index, variables) { + var variables = variables || {}; var servers = this.hostSettings(); // check array index out of bound From 6b7c5edbce6947c343308a71877df3f287a053ac Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 3 Jun 2019 13:10:22 +0530 Subject: [PATCH 06/73] feat(java-okhttpgson): Making API response headers case insensitive (#3029) * feat(java-okhttpgson): Making API response headers case insensitive * feat(java-okhttpgson): Adding documentation * feat(java-okhttpgson): Removing tabs * feat(java-okhttpgson): Removing tabs --- docs/generators/java.md | 1 + .../codegen/languages/JavaClientCodegen.java | 12 +++ .../okhttp-gson/ApiResponse.mustache | 12 ++- .../okhttp-gson/apiException.mustache | 96 +++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache diff --git a/docs/generators/java.md b/docs/generators/java.md index fefac1ff1d1..7785ee892e9 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -54,4 +54,5 @@ sidebar_label: java |useRuntimeException|Use RuntimeException instead of Exception| |false| |feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive in okhttp-gson library| |false| |library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x
**feign**
HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.8.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.8.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.8.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x
**rest-assured**
HTTP client: rest-assured : 3.x. JSON processing: Gson 2.x. Only for Java8
|okhttp-gson| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index 35c8a83aaa2..a5a3b3dd40d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -54,6 +54,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String PARCELABLE_MODEL = "parcelableModel"; public static final String USE_RUNTIME_EXCEPTION = "useRuntimeException"; public static final String USE_REFLECTION_EQUALS_HASHCODE = "useReflectionEqualsHashCode"; + public static final String CASE_INSENSITIVE_RESPONSE_HEADERS = "caseInsensitiveResponseHeaders"; public static final String PLAY_24 = "play24"; public static final String PLAY_25 = "play25"; @@ -90,6 +91,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen protected boolean useGzipFeature = false; protected boolean useRuntimeException = false; protected boolean useReflectionEqualsHashCode = false; + protected boolean caseInsensitiveResponseHeaders = false; protected String authFolder; public JavaClientCodegen() { @@ -122,6 +124,8 @@ public class JavaClientCodegen extends AbstractJavaCodegen cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception")); cliOptions.add(CliOption.newBoolean(FEIGN_VERSION, "Version of OpenFeign: '10.x', '9.x' (default)")); cliOptions.add(CliOption.newBoolean(USE_REFLECTION_EQUALS_HASHCODE, "Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.")); + cliOptions.add(CliOption.newBoolean(CASE_INSENSITIVE_RESPONSE_HEADERS, "Make API response's headers case-insensitive in " + OKHTTP_GSON + " library")); + supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead."); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x"); @@ -232,6 +236,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen this.setUseReflectionEqualsHashCode(convertPropertyToBooleanAndWriteBack(USE_REFLECTION_EQUALS_HASHCODE)); } + if (additionalProperties.containsKey(CASE_INSENSITIVE_RESPONSE_HEADERS)) { + this.setUseReflectionEqualsHashCode(convertPropertyToBooleanAndWriteBack(CASE_INSENSITIVE_RESPONSE_HEADERS)); + } + final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/"); final String apiFolder = (sourceFolder + '/' + apiPackage).replace(".", "/"); authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/"); @@ -659,6 +667,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen this.useReflectionEqualsHashCode = useReflectionEqualsHashCode; } + public void setCaseInsensitiveResponseHeaders(final Boolean caseInsensitiveResponseHeaders) { + this.caseInsensitiveResponseHeaders = caseInsensitiveResponseHeaders; + } + final private static Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)application\\/json(;.*)?"); final private static Pattern JSON_VENDOR_MIME_PATTERN = Pattern.compile("(?i)application\\/vnd.(.*)+json(;.*)?"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiResponse.mustache index 3909393697c..1f3f3a31981 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiResponse.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiResponse.mustache @@ -4,6 +4,10 @@ package {{invokerPackage}}; import java.util.List; import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} /** * API response returned by API call. @@ -30,7 +34,13 @@ public class ApiResponse { */ public ApiResponse(int statusCode, Map> headers, T data) { this.statusCode = statusCode; - this.headers = headers; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; this.data = data; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache new file mode 100644 index 00000000000..e8952456591 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache @@ -0,0 +1,96 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +{{>generatedAnnotation}} +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} From 8d9eb5ba5494cf7234c3419263747e840168f0b9 Mon Sep 17 00:00:00 2001 From: Michael Cristina Date: Mon, 3 Jun 2019 02:41:21 -0500 Subject: [PATCH 07/73] refactor(golang): Use http provided constants for http methods (#3028) * refactor(golang): Use http constants for methods * regenerate samples * fix: Only import strings when needed * regenerate samples * Only import fmt and strings when needed * regenerate samples --- .../codegen/languages/AbstractGoCodegen.java | 3 +- .../src/main/resources/go/api.mustache | 3 +- .../.openapi-generator/VERSION | 2 +- .../petstore/go/go-petstore-withXml/README.md | 48 +++- .../go/go-petstore-withXml/api/openapi.yaml | 41 ++- .../go-petstore-withXml/api_another_fake.go | 3 +- .../go/go-petstore-withXml/api_fake.go | 27 +- .../api_fake_classname_tags123.go | 3 +- .../go/go-petstore-withXml/api_pet.go | 20 +- .../go/go-petstore-withXml/api_store.go | 10 +- .../go/go-petstore-withXml/api_user.go | 18 +- .../petstore/go/go-petstore-withXml/client.go | 9 +- .../docs/AdditionalPropertiesAnyType.md | 11 + .../docs/AdditionalPropertiesArray.md | 11 + .../docs/AdditionalPropertiesBoolean.md | 11 + .../docs/AdditionalPropertiesClass.md | 14 +- .../docs/AdditionalPropertiesInteger.md | 11 + .../docs/AdditionalPropertiesNumber.md | 11 + .../docs/AdditionalPropertiesObject.md | 11 + .../docs/AdditionalPropertiesString.md | 11 + .../go/go-petstore-withXml/docs/Animal.md | 1 + .../docs/AnotherFakeApi.md | 17 +- .../go-petstore-withXml/docs/ApiResponse.md | 1 + .../docs/ArrayOfArrayOfNumberOnly.md | 1 + .../docs/ArrayOfNumberOnly.md | 1 + .../go/go-petstore-withXml/docs/ArrayTest.md | 1 + .../docs/Capitalization.md | 1 + .../go/go-petstore-withXml/docs/Cat.md | 1 + .../go/go-petstore-withXml/docs/CatAllOf.md | 11 + .../go/go-petstore-withXml/docs/Category.md | 1 + .../go/go-petstore-withXml/docs/ClassModel.md | 1 + .../go/go-petstore-withXml/docs/Client.md | 1 + .../go/go-petstore-withXml/docs/Dog.md | 1 + .../go/go-petstore-withXml/docs/DogAllOf.md | 11 + .../go/go-petstore-withXml/docs/EnumArrays.md | 1 + .../go/go-petstore-withXml/docs/EnumClass.md | 1 + .../go/go-petstore-withXml/docs/EnumTest.md | 1 + .../go/go-petstore-withXml/docs/FakeApi.md | 239 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 17 +- .../go/go-petstore-withXml/docs/File.md | 1 + .../docs/FileSchemaTestClass.md | 1 + .../go/go-petstore-withXml/docs/FormatTest.md | 1 + .../docs/HasOnlyReadOnly.md | 1 + .../go/go-petstore-withXml/docs/List.md | 1 + .../go/go-petstore-withXml/docs/MapTest.md | 1 + ...dPropertiesAndAdditionalPropertiesClass.md | 1 + .../docs/Model200Response.md | 1 + .../go/go-petstore-withXml/docs/Name.md | 1 + .../go/go-petstore-withXml/docs/NumberOnly.md | 1 + .../go/go-petstore-withXml/docs/Order.md | 1 + .../docs/OuterComposite.md | 1 + .../go/go-petstore-withXml/docs/OuterEnum.md | 1 + .../go/go-petstore-withXml/docs/Pet.md | 1 + .../go/go-petstore-withXml/docs/PetApi.md | 163 ++++++++---- .../go-petstore-withXml/docs/ReadOnlyFirst.md | 1 + .../go/go-petstore-withXml/docs/Return.md | 1 + .../docs/SpecialModelName.md | 1 + .../go/go-petstore-withXml/docs/StoreApi.md | 64 +++-- .../go/go-petstore-withXml/docs/Tag.md | 1 + .../docs/TypeHolderDefault.md | 1 + .../docs/TypeHolderExample.md | 1 + .../go/go-petstore-withXml/docs/User.md | 1 + .../go/go-petstore-withXml/docs/UserApi.md | 136 ++++++---- .../go/go-petstore-withXml/docs/XmlItem.md | 1 + .../petstore/go/go-petstore-withXml/go.mod | 6 + .../petstore/go/go-petstore-withXml/go.sum | 11 + .../model_additional_properties_any_type.go | 15 ++ .../model_additional_properties_array.go | 15 ++ .../model_additional_properties_boolean.go | 15 ++ .../model_additional_properties_class.go | 13 +- .../model_additional_properties_integer.go | 15 ++ .../model_additional_properties_number.go | 15 ++ .../model_additional_properties_object.go | 15 ++ .../model_additional_properties_string.go | 15 ++ .../go-petstore-withXml/model_cat_all_of.go | 15 ++ .../go-petstore-withXml/model_dog_all_of.go | 15 ++ .../go/go-petstore/api_another_fake.go | 3 +- .../petstore/go/go-petstore/api_fake.go | 27 +- .../go-petstore/api_fake_classname_tags123.go | 3 +- .../client/petstore/go/go-petstore/api_pet.go | 20 +- .../petstore/go/go-petstore/api_store.go | 10 +- .../petstore/go/go-petstore/api_user.go | 18 +- 82 files changed, 885 insertions(+), 333 deletions(-) create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md create mode 100644 samples/client/petstore/go/go-petstore-withXml/go.mod create mode 100644 samples/client/petstore/go/go-petstore-withXml/go.sum create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go create mode 100644 samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 56ea40ef9ab..4392dcff5df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -361,10 +361,11 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege iterator.remove(); } - // this will only import "fmt" if there are items in pathParams + // this will only import "fmt" and "strings" if there are items in pathParams for (CodegenOperation operation : operations) { if (operation.pathParams != null && operation.pathParams.size() > 0) { imports.add(createMapping("import", "fmt")); + imports.add(createMapping("import", "strings")); break; //just need to import once } } diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index fe72ace87e7..1a6a8f04343 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -7,7 +7,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" {{#imports}} "{{import}}" {{/imports}} ) @@ -66,7 +65,7 @@ type {{{nickname}}}Opts struct { {{/hasOptionalParams}} func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("{{httpMethod}}") + localVarHttpMethod = http.Method{{httpMethod}} localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION index afa63656064..06b5019af3f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index b063933c1d5..a0aa0040ef3 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -12,7 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation Install the following dependencies: -``` + +```shell go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context @@ -20,6 +21,7 @@ go get github.com/antihax/optional ``` Put the package under your project folder and add the following in import: + ```golang import "./petstore" ``` @@ -70,7 +72,14 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) + - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) + - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) + - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) + - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) + - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [Animal](docs/Animal.md) - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -78,10 +87,12 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) @@ -111,40 +122,56 @@ Class | Method | HTTP request | Description ## Documentation For Authorization + + ## api_key -- **Type**: API key + +- **Type**: API key Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. }) r, err := client.Service.Operation(auth, args) ``` + + ## api_key_query -- **Type**: API key + +- **Type**: API key Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. }) r, err := client.Service.Operation(auth, args) ``` + + ## http_basic_test + - **Type**: HTTP basic authentication Example + ```golang auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", + UserName: "username", + Password: "password", }) r, err := client.Service.Operation(auth, args) ``` + + ## petstore_auth + + - **Type**: OAuth - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog @@ -153,12 +180,14 @@ r, err := client.Service.Operation(auth, args) - **read:pets**: read your pets Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") r, err := client.Service.Operation(auth, args) ``` Or via OAuth2 module to automatically refresh tokens and perform user authentication. + ```golang import "golang.org/x/oauth2" @@ -169,6 +198,7 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) r, err := client.Service.Operation(auth, args) ``` + ## Author diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 7212ef07c27..5a020a1d0ab 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -32,6 +32,9 @@ paths: description: Pet object that needs to be added to the store required: true responses: + 200: + content: {} + description: successful operation 405: content: {} description: Invalid input @@ -56,6 +59,9 @@ paths: description: Pet object that needs to be added to the store required: true responses: + 200: + content: {} + description: successful operation 400: content: {} description: Invalid ID supplied @@ -120,7 +126,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -173,6 +180,9 @@ paths: format: int64 type: integer responses: + 200: + content: {} + description: successful operation 400: content: {} description: Invalid pet value @@ -332,7 +342,8 @@ paths: x-codegen-request-body-name: body /store/order/{order_id}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted @@ -352,7 +363,8 @@ paths: tags: - store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -1072,7 +1084,8 @@ paths: x-codegen-request-body-name: body /fake/body-with-file-schema: put: - description: For this test, the body for this request much reference a schema named `File`. + description: For this test, the body for this request much reference a schema + named `File`. operationId: testBodyWithFileSchema requestBody: content: @@ -1350,17 +1363,11 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object + - $ref: '#/components/schemas/Dog_allOf' Cat: allOf: - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object + - $ref: '#/components/schemas/Cat_allOf' Animal: discriminator: propertyName: className @@ -2009,6 +2016,14 @@ components: xml: namespace: http://a.com/schema prefix: pre + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean securitySchemes: petstore_auth: flows: @@ -2028,4 +2043,4 @@ components: type: apiKey http_basic_test: scheme: basic - type: http \ No newline at end of file + type: http diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go index 7396effd641..c6d1c262556 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go @@ -15,7 +15,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -34,7 +33,7 @@ To test special tags and operation ID starting with number */ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index dcc48da6937..b943fc4be88 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -15,7 +15,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "github.com/antihax/optional" "os" ) @@ -35,7 +34,7 @@ this route creates an XmlItem */ func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -110,7 +109,7 @@ type FakeOuterBooleanSerializeOpts struct { func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -208,7 +207,7 @@ type FakeOuterCompositeSerializeOpts struct { func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -310,7 +309,7 @@ type FakeOuterNumberSerializeOpts struct { func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -408,7 +407,7 @@ type FakeOuterStringSerializeOpts struct { func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -499,7 +498,7 @@ For this test, the body for this request much reference a schema named `Fil */ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -567,7 +566,7 @@ FakeApiService */ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -637,7 +636,7 @@ To test \"client\" model */ func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -753,7 +752,7 @@ type TestEndpointParametersOpts struct { func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -897,7 +896,7 @@ type TestEnumParametersOpts struct { func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1000,7 +999,7 @@ type TestGroupParametersOpts struct { func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1077,7 +1076,7 @@ FakeApiService test inline additionalProperties */ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1145,7 +1144,7 @@ FakeApiService test json serialization of form data */ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go index 82217020bb2..dd7a0babfed 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go @@ -15,7 +15,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -34,7 +33,7 @@ To test class name in snake case */ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 7f09af3a7b1..6b159c5001a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -15,8 +15,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" "github.com/antihax/optional" "os" ) @@ -35,7 +35,7 @@ PetApiService Add a new pet to the store */ func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -109,7 +109,7 @@ type DeletePetOpts struct { func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -180,7 +180,7 @@ Multiple status values can be provided with comma separated strings */ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -268,7 +268,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 */ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -356,7 +356,7 @@ Returns a single pet */ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -454,7 +454,7 @@ PetApiService Update an existing pet */ func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -530,7 +530,7 @@ type UpdatePetWithFormOpts struct { func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -612,7 +612,7 @@ type UploadFileOpts struct { func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -725,7 +725,7 @@ type UploadFileWithRequiredFileOpts struct { func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go index 50ca891a257..ae780c2998e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_store.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go @@ -15,8 +15,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -34,7 +34,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or */ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -101,7 +101,7 @@ Returns a map of status codes to quantities */ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -200,7 +200,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val */ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -293,7 +293,7 @@ StoreApiService Place an order for a pet */ func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go index 29be65f0856..be573458c73 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go @@ -15,8 +15,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -34,7 +34,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -101,7 +101,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -168,7 +168,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -236,7 +236,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -303,7 +303,7 @@ UserApiService Get user by user name */ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -391,7 +391,7 @@ UserApiService Logs user into the system */ func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -477,7 +477,7 @@ UserApiService Logs out current logged in user session */ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -544,7 +544,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index 87152ec107b..973bad121ed 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -230,10 +230,11 @@ func (c *APIClient) prepareRequest( if err != nil { return nil, err } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) w.Close() @@ -329,6 +330,10 @@ func (c *APIClient) prepareRequest( } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } if xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md new file mode 100644 index 00000000000..eadec3142ce --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesAnyType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md new file mode 100644 index 00000000000..0c37598aeb2 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesArray + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md new file mode 100644 index 00000000000..7190fe8429b --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesBoolean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md index 0c8ba7085b3..877a5d45a31 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md @@ -1,10 +1,20 @@ # AdditionalPropertiesClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapProperty** | **map[string]string** | | [optional] -**MapOfMapProperty** | [**map[string]map[string]string**](map.md) | | [optional] +**MapString** | **map[string]string** | | [optional] +**MapNumber** | **map[string]float32** | | [optional] +**MapInteger** | **map[string]int32** | | [optional] +**MapBoolean** | **map[string]bool** | | [optional] +**MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional] +**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] +**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | [**map[string]interface{}**](.md) | | [optional] +**Anytype2** | [**map[string]interface{}**](.md) | | [optional] +**Anytype3** | [**map[string]interface{}**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md new file mode 100644 index 00000000000..34e6fca8fb0 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesInteger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md new file mode 100644 index 00000000000..6d41fd2315c --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md new file mode 100644 index 00000000000..b856de693b1 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md new file mode 100644 index 00000000000..69ad2065685 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesString + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md index d7113331a60..02d23377da6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md @@ -1,6 +1,7 @@ # Animal ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md index 6d996803c95..0b9deb0c58a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md @@ -7,7 +7,9 @@ Method | HTTP request | Description [**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags -# **Call123TestSpecialTags** + +## Call123TestSpecialTags + > Client Call123TestSpecialTags(ctx, body) To test special tags @@ -15,10 +17,11 @@ To test special tags and operation ID starting with number ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Client**](Client.md)| client model | ### Return type @@ -30,8 +33,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md index f9b16338ecd..41d28fb578c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md @@ -1,6 +1,7 @@ # ApiResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | **int32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md index a53147b6270..555213013b2 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md @@ -1,6 +1,7 @@ # ArrayOfArrayOfNumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md index 19031e76d20..56618756dd7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md @@ -1,6 +1,7 @@ # ArrayOfNumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayNumber** | **[]float32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md index a46d1acf665..0da0bc52d2d 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md @@ -1,6 +1,7 @@ # ArrayTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayOfString** | **[]string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md index ac65ee37dba..426b8eabd9b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md @@ -1,6 +1,7 @@ # Capitalization ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SmallCamel** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md index b51d5fd2b95..1ef1f095e94 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md @@ -1,6 +1,7 @@ # Cat ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md new file mode 100644 index 00000000000..c978cee0417 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md @@ -0,0 +1,11 @@ +# CatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md index 1440215d225..01e8344bd06 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md @@ -1,6 +1,7 @@ # Category ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md index 8d7a7284393..0b925cebb1f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md @@ -1,6 +1,7 @@ # ClassModel ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Class** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md index fdf5fd9a69d..551da852eec 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md @@ -1,6 +1,7 @@ # Client ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Client** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md index 13c0aa28e6b..ff35dd5cdca 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md @@ -1,6 +1,7 @@ # Dog ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md new file mode 100644 index 00000000000..b87153e9265 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md @@ -0,0 +1,11 @@ +# DogAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Breed** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md index 9eca8b29032..3021f881830 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md @@ -1,6 +1,7 @@ # EnumArrays ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **JustSymbol** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md index 67f017becd0..c6932388c06 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md @@ -1,6 +1,7 @@ # EnumClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md index 85eab0e1d40..eeec09b66b4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md @@ -1,6 +1,7 @@ # EnumTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumString** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md index e6d0dec3fe1..b7927f181e4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md @@ -19,7 +19,9 @@ Method | HTTP request | Description [**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -# **CreateXmlItem** + +## CreateXmlItem + > CreateXmlItem(ctx, xmlItem) creates an XmlItem @@ -27,10 +29,11 @@ this route creates an XmlItem ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | ### Return type @@ -42,12 +45,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - - **Accept**: Not defined +- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterBooleanSerialize -# **FakeOuterBooleanSerialize** > bool FakeOuterBooleanSerialize(ctx, optional) @@ -55,14 +62,17 @@ Test serialization of outer boolean types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.Bool**| Input boolean as post body | @@ -77,12 +87,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: */* +- **Content-Type**: Not defined +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterCompositeSerialize -# **FakeOuterCompositeSerialize** > OuterComposite FakeOuterCompositeSerialize(ctx, optional) @@ -90,14 +104,17 @@ Test serialization of object with outer number type ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body | @@ -112,12 +129,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: */* +- **Content-Type**: Not defined +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterNumberSerialize -# **FakeOuterNumberSerialize** > float32 FakeOuterNumberSerialize(ctx, optional) @@ -125,14 +146,17 @@ Test serialization of outer number types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.Float32**| Input number as post body | @@ -147,12 +171,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: */* +- **Content-Type**: Not defined +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterStringSerialize -# **FakeOuterStringSerialize** > string FakeOuterStringSerialize(ctx, optional) @@ -160,14 +188,17 @@ Test serialization of outer string types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.String**| Input string as post body | @@ -182,12 +213,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: */* +- **Content-Type**: Not defined +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithFileSchema -# **TestBodyWithFileSchema** > TestBodyWithFileSchema(ctx, body) @@ -195,10 +230,11 @@ For this test, the body for this request much reference a schema named `File`. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -210,22 +246,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithQueryParams -# **TestBodyWithQueryParams** > TestBodyWithQueryParams(ctx, query, body) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **query** | **string**| | - **body** | [**User**](User.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**query** | **string**| | +**body** | [**User**](User.md)| | ### Return type @@ -237,12 +278,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestClientModel -# **TestClientModel** > Client TestClientModel(ctx, body) To test \"client\" model @@ -250,10 +295,11 @@ To test \"client\" model ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Client**](Client.md)| client model | ### Return type @@ -265,12 +311,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEndpointParameters -# **TestEndpointParameters** > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -278,18 +328,21 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **number** | **float32**| None | - **double** | **float64**| None | - **patternWithoutDelimiter** | **string**| None | - **byte_** | **string**| None | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**number** | **float32**| None | +**double** | **float64**| None | +**patternWithoutDelimiter** | **string**| None | +**byte_** | **string**| None | **optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -317,12 +370,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEnumParameters -# **TestEnumParameters** > TestEnumParameters(ctx, optional) To test enum parameters @@ -330,14 +387,17 @@ To test enum parameters ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestEnumParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) | @@ -359,12 +419,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestGroupParameters -# **TestGroupParameters** > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) Fake endpoint to test group parameters (optional) @@ -372,17 +436,20 @@ Fake endpoint to test group parameters (optional) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **requiredStringGroup** | **int32**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **int64**| Required Integer in group parameters | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**requiredStringGroup** | **int32**| Required String in group parameters | +**requiredBooleanGroup** | **bool**| Required Boolean in group parameters | +**requiredInt64Group** | **int64**| Required Integer in group parameters | **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestGroupParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -402,21 +469,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestInlineAdditionalProperties -# **TestInlineAdditionalProperties** > TestInlineAdditionalProperties(ctx, param) test inline additionalProperties ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **param** | [**map[string]string**](string.md)| request body | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**param** | [**map[string]string**](string.md)| request body | ### Return type @@ -428,22 +500,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestJsonFormData -# **TestJsonFormData** > TestJsonFormData(ctx, param, param2) test json serialization of form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **param** | **string**| field1 | - **param2** | **string**| field2 | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**param** | **string**| field1 | +**param2** | **string**| field2 | ### Return type @@ -455,8 +532,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md index d9311e369db..b3cbcc2c06e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md @@ -7,7 +7,9 @@ Method | HTTP request | Description [**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case -# **TestClassname** + +## TestClassname + > Client TestClassname(ctx, body) To test class name in snake case @@ -15,10 +17,11 @@ To test class name in snake case ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Client**](Client.md)| client model | ### Return type @@ -30,8 +33,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/File.md b/samples/client/petstore/go/go-petstore-withXml/docs/File.md index e7f7d80e05d..a113b0312cd 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/File.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/File.md @@ -1,6 +1,7 @@ # File ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SourceURI** | **string** | Test capitalization | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md index 69cbfa2c189..ae51414dd6c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md @@ -1,6 +1,7 @@ # FileSchemaTestClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **File** | [**File**](File.md) | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md index 5f70da85aa2..ee089a03cd7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md @@ -1,6 +1,7 @@ # FormatTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Integer** | **int32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md index c259e8b325a..9e2f4957359 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md @@ -1,6 +1,7 @@ # HasOnlyReadOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Bar** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/List.md b/samples/client/petstore/go/go-petstore-withXml/docs/List.md index 3255fa27868..bba2e529906 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/List.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/List.md @@ -1,6 +1,7 @@ # List ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Var123List** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md index 49381ec4b85..6645e044658 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md @@ -1,6 +1,7 @@ # MapTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 0e5f61f6273..a2ce1068b27 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -1,6 +1,7 @@ # MixedPropertiesAndAdditionalPropertiesClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Uuid** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md index c5abac20d86..27b93bd1549 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md @@ -1,6 +1,7 @@ # Model200Response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md index fccddf63899..453e54d9851 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md @@ -1,6 +1,7 @@ # Name ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md index 4d2ea1b0413..604cf37eede 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md @@ -1,6 +1,7 @@ # NumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **JustNumber** | **float32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md index befa9151a18..eeef0971005 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md @@ -1,6 +1,7 @@ # Order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md index 30732cf10bf..df9bce1bd90 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md @@ -1,6 +1,7 @@ # OuterComposite ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MyNumber** | **float32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md index 06d413b0168..c97466159c5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md @@ -1,6 +1,7 @@ # OuterEnum ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md index 049c82eb5a0..c48104c6397 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md @@ -1,6 +1,7 @@ # Pet ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index e1fffc03512..de48d4b6763 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -15,16 +15,19 @@ Method | HTTP request | Description [**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -# **AddPet** + +## AddPet + > AddPet(ctx, body) Add a new pet to the store ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -36,26 +39,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePet -# **DeletePet** > DeletePet(ctx, petId, optional) Deletes a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| Pet id to delete | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a DeletePetOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -71,12 +81,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FindPetsByStatus -# **FindPetsByStatus** > []Pet FindPetsByStatus(ctx, status) Finds Pets by status @@ -84,10 +98,11 @@ Multiple status values can be provided with comma separated strings ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **status** | [**[]string**](string.md)| Status values that need to be considered for filter | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**status** | [**[]string**](string.md)| Status values that need to be considered for filter | ### Return type @@ -99,12 +114,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FindPetsByTags -# **FindPetsByTags** > []Pet FindPetsByTags(ctx, tags) Finds Pets by tags @@ -112,10 +131,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **tags** | [**[]string**](string.md)| Tags to filter by | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tags** | [**[]string**](string.md)| Tags to filter by | ### Return type @@ -127,12 +147,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPetById -# **GetPetById** > Pet GetPetById(ctx, petId) Find pet by ID @@ -140,10 +164,11 @@ Returns a single pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to return | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to return | ### Return type @@ -155,21 +180,26 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePet -# **UpdatePet** > UpdatePet(ctx, body) Update an existing pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -181,26 +211,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePetWithForm -# **UpdatePetWithForm** > UpdatePetWithForm(ctx, petId, optional) Updates a pet in the store with form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet that needs to be updated | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -217,26 +254,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFile -# **UploadFile** > ApiResponse UploadFile(ctx, petId, optional) uploads an image ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to update | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UploadFileOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -253,27 +297,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFileWithRequiredFile -# **UploadFileWithRequiredFile** > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) uploads an image (required) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to update | - **requiredFile** | ***os.File*****os.File**| file to upload | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | +**requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -290,8 +341,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md index b3546db3cc8..3fee799f295 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md @@ -1,6 +1,7 @@ # ReadOnlyFirst ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Bar** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md index bcf50e4e5cd..11be0b27c50 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md @@ -1,6 +1,7 @@ # Return ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Return** | **int32** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md index 7b2dfb654c0..96d7a28a409 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md @@ -1,6 +1,7 @@ # SpecialModelName ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md index 88d762e0302..083ed777590 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md @@ -10,7 +10,9 @@ Method | HTTP request | Description [**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet -# **DeleteOrder** + +## DeleteOrder + > DeleteOrder(ctx, orderId) Delete purchase order by ID @@ -18,10 +20,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orderId** | **string**| ID of the order that needs to be deleted | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string**| ID of the order that needs to be deleted | ### Return type @@ -33,18 +36,23 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetInventory -# **GetInventory** > map[string]int32 GetInventory(ctx, ) Returns pet inventories by status Returns a map of status codes to quantities ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -57,12 +65,16 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrderById -# **GetOrderById** > Order GetOrderById(ctx, orderId) Find purchase order by ID @@ -70,10 +82,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orderId** | **int64**| ID of pet that needs to be fetched | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **int64**| ID of pet that needs to be fetched | ### Return type @@ -85,21 +98,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PlaceOrder -# **PlaceOrder** > Order PlaceOrder(ctx, body) Place an order for a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Order**](Order.md)| order placed for purchasing the pet | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -111,8 +129,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md index acacb4f54a7..d6b3cc117b5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md @@ -1,6 +1,7 @@ # Tag ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md index 080c12a02f4..1b9f077c303 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md @@ -1,6 +1,7 @@ # TypeHolderDefault ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | [default to what] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md index 231c2a18722..abe85f9799d 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md @@ -1,6 +1,7 @@ # TypeHolderExample ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/User.md b/samples/client/petstore/go/go-petstore-withXml/docs/User.md index 87e1456c8a8..7675d7ff701 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/User.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/User.md @@ -1,6 +1,7 @@ # User ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md index e57a67b7547..ea19e0e716f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md @@ -14,7 +14,9 @@ Method | HTTP request | Description [**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user -# **CreateUser** + +## CreateUser + > CreateUser(ctx, body) Create user @@ -22,10 +24,11 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**User**](User.md)| Created user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**User**](User.md)| Created user object | ### Return type @@ -37,21 +40,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithArrayInput -# **CreateUsersWithArrayInput** > CreateUsersWithArrayInput(ctx, body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**[]User**](array.md)| List of user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**[]User**](array.md)| List of user object | ### Return type @@ -63,21 +71,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithListInput -# **CreateUsersWithListInput** > CreateUsersWithListInput(ctx, body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**[]User**](array.md)| List of user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**body** | [**[]User**](array.md)| List of user object | ### Return type @@ -89,12 +102,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser -# **DeleteUser** > DeleteUser(ctx, username) Delete user @@ -102,10 +119,11 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The name that needs to be deleted | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be deleted | ### Return type @@ -117,21 +135,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserByName -# **GetUserByName** > User GetUserByName(ctx, username) Get user by user name ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -143,22 +166,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LoginUser -# **LoginUser** > string LoginUser(ctx, username, password) Logs user into the system ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The user name for login | +**password** | **string**| The password for login in clear text | ### Return type @@ -170,16 +198,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LogoutUser -# **LogoutUser** > LogoutUser(ctx, ) Logs out current logged in user session ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -192,12 +225,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser -# **UpdateUser** > UpdateUser(ctx, username, body) Updated user @@ -205,11 +242,12 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| name that need to be deleted | +**body** | [**User**](User.md)| Updated user object | ### Return type @@ -221,8 +259,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md index 573fac8e2d5..8a9c2dc0b50 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md @@ -1,6 +1,7 @@ # XmlItem ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AttributeString** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/go.mod b/samples/client/petstore/go/go-petstore-withXml/go.mod new file mode 100644 index 00000000000..199809ed706 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/go.mod @@ -0,0 +1,6 @@ +module github.com/GIT_USER_ID/GIT_REPO_ID + +require ( + github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a +) diff --git a/samples/client/petstore/go/go-petstore-withXml/go.sum b/samples/client/petstore/go/go-petstore-withXml/go.sum new file mode 100644 index 00000000000..e3c16fef3ac --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go new file mode 100644 index 00000000000..6977ea451be --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesAnyType struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go new file mode 100644 index 00000000000..ef3055a02b3 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesArray struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go new file mode 100644 index 00000000000..6cd68b36627 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesBoolean struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index afa3de3d955..363a62f7a3e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -11,6 +11,15 @@ package petstore type AdditionalPropertiesClass struct { - MapProperty map[string]string `json:"map_property,omitempty" xml:"map_property"` - MapOfMapProperty map[string]map[string]string `json:"map_of_map_property,omitempty" xml:"map_of_map_property"` + MapString map[string]string `json:"map_string,omitempty" xml:"map_string"` + MapNumber map[string]float32 `json:"map_number,omitempty" xml:"map_number"` + MapInteger map[string]int32 `json:"map_integer,omitempty" xml:"map_integer"` + MapBoolean map[string]bool `json:"map_boolean,omitempty" xml:"map_boolean"` + MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty" xml:"map_array_integer"` + MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` + MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` + MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` + Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` + Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` + Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` } diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go new file mode 100644 index 00000000000..7878ce4a066 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesInteger struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go new file mode 100644 index 00000000000..f95c1a6e3d6 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesNumber struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go new file mode 100644 index 00000000000..e69e5153748 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesObject struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go new file mode 100644 index 00000000000..7fb9acc4f2a --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type AdditionalPropertiesString struct { + Name string `json:"name,omitempty" xml:"name"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go new file mode 100644 index 00000000000..c01d44785e9 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type CatAllOf struct { + Declawed bool `json:"declawed,omitempty" xml:"declawed"` +} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go new file mode 100644 index 00000000000..a679641f749 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +type DogAllOf struct { + Breed string `json:"breed,omitempty" xml:"breed"` +} diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index eaf9bfd49af..152bf5be285 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -33,7 +32,7 @@ To test special tags and operation ID starting with number */ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 90af0bcb03f..27c3ae978ba 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "github.com/antihax/optional" "os" ) @@ -34,7 +33,7 @@ this route creates an XmlItem */ func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -109,7 +108,7 @@ type FakeOuterBooleanSerializeOpts struct { func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -207,7 +206,7 @@ type FakeOuterCompositeSerializeOpts struct { func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -309,7 +308,7 @@ type FakeOuterNumberSerializeOpts struct { func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -407,7 +406,7 @@ type FakeOuterStringSerializeOpts struct { func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -498,7 +497,7 @@ For this test, the body for this request much reference a schema named `Fil */ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -566,7 +565,7 @@ FakeApiService */ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -636,7 +635,7 @@ To test \"client\" model */ func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -752,7 +751,7 @@ type TestEndpointParametersOpts struct { func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -896,7 +895,7 @@ type TestEnumParametersOpts struct { func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -999,7 +998,7 @@ type TestGroupParametersOpts struct { func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1076,7 +1075,7 @@ FakeApiService test inline additionalProperties */ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1144,7 +1143,7 @@ FakeApiService test json serialization of form data */ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go index 784a54e5e7c..6c04d55739a 100644 --- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -33,7 +32,7 @@ To test class name in snake case */ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index e3cbb84b587..243d16197f0 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" "github.com/antihax/optional" "os" ) @@ -34,7 +34,7 @@ PetApiService Add a new pet to the store */ func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -108,7 +108,7 @@ type DeletePetOpts struct { func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -179,7 +179,7 @@ Multiple status values can be provided with comma separated strings */ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -267,7 +267,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 */ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -355,7 +355,7 @@ Returns a single pet */ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -453,7 +453,7 @@ PetApiService Update an existing pet */ func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -529,7 +529,7 @@ type UpdatePetWithFormOpts struct { func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -611,7 +611,7 @@ type UploadFileOpts struct { func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -724,7 +724,7 @@ type UploadFileWithRequiredFileOpts struct { func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index 2b195275dbc..3211860d49c 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -33,7 +33,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or */ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -100,7 +100,7 @@ Returns a map of status codes to quantities */ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -199,7 +199,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val */ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -292,7 +292,7 @@ StoreApiService Place an order for a pet */ func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go index 2e349b1d29d..6a7d2b1195a 100644 --- a/samples/client/petstore/go/go-petstore/api_user.go +++ b/samples/client/petstore/go/go-petstore/api_user.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -33,7 +33,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -100,7 +100,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -167,7 +167,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -235,7 +235,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -302,7 +302,7 @@ UserApiService Get user by user name */ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -390,7 +390,7 @@ UserApiService Logs user into the system */ func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -476,7 +476,7 @@ UserApiService Logs out current logged in user session */ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -543,7 +543,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string From 1eca97f738a1e1c5388e311611b09bb9f3cc25b3 Mon Sep 17 00:00:00 2001 From: Matthias Preu <5973515+mpreu@users.noreply.github.com> Date: Mon, 3 Jun 2019 09:41:45 +0200 Subject: [PATCH 08/73] Fix wrong include path in api-header template (#3062) Change local json.hpp include path to correct value. Update samples. --- .../cpp-pistache-server/api-header.mustache | 2 +- .../cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-pistache/model/Inline_object.cpp | 101 ++++++++++++++++++ .../cpp-pistache/model/Inline_object.h | 73 +++++++++++++ .../cpp-pistache/model/Inline_object_1.cpp | 100 +++++++++++++++++ .../cpp-pistache/model/Inline_object_1.h | 73 +++++++++++++ 6 files changed, 349 insertions(+), 2 deletions(-) create mode 100644 samples/server/petstore/cpp-pistache/model/Inline_object.cpp create mode 100644 samples/server/petstore/cpp-pistache/model/Inline_object.h create mode 100644 samples/server/petstore/cpp-pistache/model/Inline_object_1.cpp create mode 100644 samples/server/petstore/cpp-pistache/model/Inline_object_1.h diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-header.mustache index 85b84385b73..b8858070611 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-header.mustache @@ -13,7 +13,7 @@ #include #include #include -{{^hasModelImport}}#include "json.hpp"{{/hasModelImport}} +{{^hasModelImport}}#include {{/hasModelImport}} {{#imports}}{{{import}}} {{/imports}} diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 06b5019af3f..d96260ba335 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/model/Inline_object.cpp b/samples/server/petstore/cpp-pistache/model/Inline_object.cpp new file mode 100644 index 00000000000..ebb31303908 --- /dev/null +++ b/samples/server/petstore/cpp-pistache/model/Inline_object.cpp @@ -0,0 +1,101 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +#include "Inline_object.h" + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +Inline_object::Inline_object() +{ + m_Name = ""; + m_NameIsSet = false; + m_Status = ""; + m_StatusIsSet = false; + +} + +Inline_object::~Inline_object() +{ +} + +void Inline_object::validate() +{ + // TODO: implement validation +} + +void to_json(nlohmann::json& j, const Inline_object& o) +{ + j = nlohmann::json(); + if(o.nameIsSet()) + j["name"] = o.m_Name; + if(o.statusIsSet()) + j["status"] = o.m_Status; +} + +void from_json(const nlohmann::json& j, Inline_object& o) +{ + if(j.contains("name")) + { + j.at("name").get_to(o.m_Name); + o.m_NameIsSet = true; + } + if(j.contains("status")) + { + j.at("status").get_to(o.m_Status); + o.m_StatusIsSet = true; + } +} + +std::string Inline_object::getName() const +{ + return m_Name; +} +void Inline_object::setName(std::string const& value) +{ + m_Name = value; + m_NameIsSet = true; +} +bool Inline_object::nameIsSet() const +{ + return m_NameIsSet; +} +void Inline_object::unsetName() +{ + m_NameIsSet = false; +} +std::string Inline_object::getStatus() const +{ + return m_Status; +} +void Inline_object::setStatus(std::string const& value) +{ + m_Status = value; + m_StatusIsSet = true; +} +bool Inline_object::statusIsSet() const +{ + return m_StatusIsSet; +} +void Inline_object::unsetStatus() +{ + m_StatusIsSet = false; +} + +} +} +} +} + diff --git a/samples/server/petstore/cpp-pistache/model/Inline_object.h b/samples/server/petstore/cpp-pistache/model/Inline_object.h new file mode 100644 index 00000000000..f407884cd88 --- /dev/null +++ b/samples/server/petstore/cpp-pistache/model/Inline_object.h @@ -0,0 +1,73 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +/* + * Inline_object.h + * + * + */ + +#ifndef Inline_object_H_ +#define Inline_object_H_ + + +#include +#include + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +/// +/// +/// +class Inline_object +{ +public: + Inline_object(); + virtual ~Inline_object(); + + void validate(); + + ///////////////////////////////////////////// + /// Inline_object members + + /// + /// Updated name of the pet + /// + std::string getName() const; + void setName(std::string const& value); + bool nameIsSet() const; + void unsetName(); + /// + /// Updated status of the pet + /// + std::string getStatus() const; + void setStatus(std::string const& value); + bool statusIsSet() const; + void unsetStatus(); + + friend void to_json(nlohmann::json& j, const Inline_object& o); + friend void from_json(const nlohmann::json& j, Inline_object& o); +protected: + std::string m_Name; + bool m_NameIsSet; + std::string m_Status; + bool m_StatusIsSet; +}; + +} +} +} +} + +#endif /* Inline_object_H_ */ diff --git a/samples/server/petstore/cpp-pistache/model/Inline_object_1.cpp b/samples/server/petstore/cpp-pistache/model/Inline_object_1.cpp new file mode 100644 index 00000000000..d5ffe1fef88 --- /dev/null +++ b/samples/server/petstore/cpp-pistache/model/Inline_object_1.cpp @@ -0,0 +1,100 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +#include "Inline_object_1.h" + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +Inline_object_1::Inline_object_1() +{ + m_AdditionalMetadata = ""; + m_AdditionalMetadataIsSet = false; + m_fileIsSet = false; + +} + +Inline_object_1::~Inline_object_1() +{ +} + +void Inline_object_1::validate() +{ + // TODO: implement validation +} + +void to_json(nlohmann::json& j, const Inline_object_1& o) +{ + j = nlohmann::json(); + if(o.additionalMetadataIsSet()) + j["additionalMetadata"] = o.m_AdditionalMetadata; + if(o.fileIsSet()) + j["file"] = o.m_file; +} + +void from_json(const nlohmann::json& j, Inline_object_1& o) +{ + if(j.contains("additionalMetadata")) + { + j.at("additionalMetadata").get_to(o.m_AdditionalMetadata); + o.m_AdditionalMetadataIsSet = true; + } + if(j.contains("file")) + { + j.at("file").get_to(o.m_file); + o.m_fileIsSet = true; + } +} + +std::string Inline_object_1::getAdditionalMetadata() const +{ + return m_AdditionalMetadata; +} +void Inline_object_1::setAdditionalMetadata(std::string const& value) +{ + m_AdditionalMetadata = value; + m_AdditionalMetadataIsSet = true; +} +bool Inline_object_1::additionalMetadataIsSet() const +{ + return m_AdditionalMetadataIsSet; +} +void Inline_object_1::unsetAdditionalMetadata() +{ + m_AdditionalMetadataIsSet = false; +} +std::string Inline_object_1::getFile() const +{ + return m_file; +} +void Inline_object_1::setFile(std::string const& value) +{ + m_file = value; + m_fileIsSet = true; +} +bool Inline_object_1::fileIsSet() const +{ + return m_fileIsSet; +} +void Inline_object_1::unsetfile() +{ + m_fileIsSet = false; +} + +} +} +} +} + diff --git a/samples/server/petstore/cpp-pistache/model/Inline_object_1.h b/samples/server/petstore/cpp-pistache/model/Inline_object_1.h new file mode 100644 index 00000000000..a5d90b1754e --- /dev/null +++ b/samples/server/petstore/cpp-pistache/model/Inline_object_1.h @@ -0,0 +1,73 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +/* + * Inline_object_1.h + * + * + */ + +#ifndef Inline_object_1_H_ +#define Inline_object_1_H_ + + +#include +#include + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +/// +/// +/// +class Inline_object_1 +{ +public: + Inline_object_1(); + virtual ~Inline_object_1(); + + void validate(); + + ///////////////////////////////////////////// + /// Inline_object_1 members + + /// + /// Additional data to pass to server + /// + std::string getAdditionalMetadata() const; + void setAdditionalMetadata(std::string const& value); + bool additionalMetadataIsSet() const; + void unsetAdditionalMetadata(); + /// + /// file to upload + /// + std::string getFile() const; + void setFile(std::string const& value); + bool fileIsSet() const; + void unsetfile(); + + friend void to_json(nlohmann::json& j, const Inline_object_1& o); + friend void from_json(const nlohmann::json& j, Inline_object_1& o); +protected: + std::string m_AdditionalMetadata; + bool m_AdditionalMetadataIsSet; + std::string m_file; + bool m_fileIsSet; +}; + +} +} +} +} + +#endif /* Inline_object_1_H_ */ From 6ff0512b31e082c20c075b318f28b8327286624c Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 3 Jun 2019 13:12:41 +0530 Subject: [PATCH 09/73] [Java][jersey2]: Documentation changes and making example snippet compilable (#3056) * feat(java-jersey2): Adding http response headers and making example compilable * feat(java-jersey2): Updating pet project * feat(java-jersey2): Removing uncessary lines from Readme * feat(java-jersey2): Updating pet projects * feat(java-jersey2): Updating pet projects --- .../src/main/resources/Java/README.mustache | 13 +- .../src/main/resources/Java/api_doc.mustache | 84 +-- .../Java/libraries/jersey2/api.mustache | 18 + .../Java/libraries/jersey2/pom.mustache | 9 + .../google-api-client/docs/AnotherFakeApi.md | 37 +- .../java/google-api-client/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/google-api-client/docs/PetApi.md | 469 +++++++++------ .../java/google-api-client/docs/StoreApi.md | 165 ++++-- .../java/google-api-client/docs/UserApi.md | 291 +++++++--- .../java/jersey1/docs/AnotherFakeApi.md | 37 +- .../petstore/java/jersey1/docs/FakeApi.md | 536 ++++++++++++------ .../jersey1/docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/jersey1/docs/PetApi.md | 469 +++++++++------ .../petstore/java/jersey1/docs/StoreApi.md | 165 ++++-- .../petstore/java/jersey1/docs/UserApi.md | 291 +++++++--- .../java/jersey2-java6/docs/AnotherFakeApi.md | 37 +- .../java/jersey2-java6/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/jersey2-java6/docs/PetApi.md | 469 +++++++++------ .../java/jersey2-java6/docs/StoreApi.md | 165 ++++-- .../java/jersey2-java6/docs/UserApi.md | 291 +++++++--- .../petstore/java/jersey2-java6/pom.xml | 9 + .../client/api/AnotherFakeApi.java | 10 + .../org/openapitools/client/api/FakeApi.java | 134 +++++ .../client/api/FakeClassnameTags123Api.java | 10 + .../org/openapitools/client/api/PetApi.java | 108 ++++ .../org/openapitools/client/api/StoreApi.java | 48 ++ .../org/openapitools/client/api/UserApi.java | 90 +++ .../java/jersey2-java8/docs/AnotherFakeApi.md | 37 +- .../java/jersey2-java8/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/jersey2-java8/docs/PetApi.md | 469 +++++++++------ .../java/jersey2-java8/docs/StoreApi.md | 165 ++++-- .../java/jersey2-java8/docs/UserApi.md | 291 +++++++--- .../petstore/java/jersey2-java8/pom.xml | 9 + .../client/api/AnotherFakeApi.java | 10 + .../org/openapitools/client/api/FakeApi.java | 134 +++++ .../client/api/FakeClassnameTags123Api.java | 10 + .../org/openapitools/client/api/PetApi.java | 108 ++++ .../org/openapitools/client/api/StoreApi.java | 48 ++ .../org/openapitools/client/api/UserApi.java | 90 +++ .../java/jersey2/docs/AnotherFakeApi.md | 37 +- .../petstore/java/jersey2/docs/FakeApi.md | 536 ++++++++++++------ .../jersey2/docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/jersey2/docs/PetApi.md | 469 +++++++++------ .../petstore/java/jersey2/docs/StoreApi.md | 165 ++++-- .../petstore/java/jersey2/docs/UserApi.md | 291 +++++++--- samples/client/petstore/java/jersey2/pom.xml | 9 + .../client/api/AnotherFakeApi.java | 10 + .../org/openapitools/client/api/FakeApi.java | 134 +++++ .../client/api/FakeClassnameTags123Api.java | 10 + .../org/openapitools/client/api/PetApi.java | 108 ++++ .../org/openapitools/client/api/StoreApi.java | 48 ++ .../org/openapitools/client/api/UserApi.java | 90 +++ .../java/resteasy/docs/AnotherFakeApi.md | 37 +- .../petstore/java/resteasy/docs/FakeApi.md | 536 ++++++++++++------ .../resteasy/docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/resteasy/docs/PetApi.md | 469 +++++++++------ .../petstore/java/resteasy/docs/StoreApi.md | 165 ++++-- .../petstore/java/resteasy/docs/UserApi.md | 291 +++++++--- .../docs/AnotherFakeApi.md | 37 +- .../java/resttemplate-withXml/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/resttemplate-withXml/docs/PetApi.md | 469 +++++++++------ .../resttemplate-withXml/docs/StoreApi.md | 165 ++++-- .../java/resttemplate-withXml/docs/UserApi.md | 291 +++++++--- .../java/resttemplate/docs/AnotherFakeApi.md | 37 +- .../java/resttemplate/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/resttemplate/docs/PetApi.md | 469 +++++++++------ .../java/resttemplate/docs/StoreApi.md | 165 ++++-- .../java/resttemplate/docs/UserApi.md | 291 +++++++--- .../retrofit2-play24/docs/AnotherFakeApi.md | 37 +- .../java/retrofit2-play24/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/retrofit2-play24/docs/PetApi.md | 469 +++++++++------ .../java/retrofit2-play24/docs/StoreApi.md | 165 ++++-- .../java/retrofit2-play24/docs/UserApi.md | 291 +++++++--- .../retrofit2-play25/docs/AnotherFakeApi.md | 37 +- .../java/retrofit2-play25/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/retrofit2-play25/docs/PetApi.md | 469 +++++++++------ .../java/retrofit2-play25/docs/StoreApi.md | 165 ++++-- .../java/retrofit2-play25/docs/UserApi.md | 291 +++++++--- .../retrofit2-play26/docs/AnotherFakeApi.md | 37 +- .../java/retrofit2-play26/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../java/retrofit2-play26/docs/PetApi.md | 469 +++++++++------ .../java/retrofit2-play26/docs/StoreApi.md | 165 ++++-- .../java/retrofit2-play26/docs/UserApi.md | 291 +++++++--- .../java/retrofit2/docs/AnotherFakeApi.md | 37 +- .../petstore/java/retrofit2/docs/FakeApi.md | 536 ++++++++++++------ .../retrofit2/docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/retrofit2/docs/PetApi.md | 469 +++++++++------ .../petstore/java/retrofit2/docs/StoreApi.md | 165 ++++-- .../petstore/java/retrofit2/docs/UserApi.md | 291 +++++++--- .../java/retrofit2rx/docs/AnotherFakeApi.md | 37 +- .../petstore/java/retrofit2rx/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/retrofit2rx/docs/PetApi.md | 469 +++++++++------ .../java/retrofit2rx/docs/StoreApi.md | 165 ++++-- .../petstore/java/retrofit2rx/docs/UserApi.md | 291 +++++++--- .../java/retrofit2rx2/docs/AnotherFakeApi.md | 37 +- .../java/retrofit2rx2/docs/FakeApi.md | 536 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/retrofit2rx2/docs/PetApi.md | 469 +++++++++------ .../java/retrofit2rx2/docs/StoreApi.md | 165 ++++-- .../java/retrofit2rx2/docs/UserApi.md | 291 +++++++--- .../java/vertx/docs/AnotherFakeApi.md | 37 +- .../petstore/java/vertx/docs/FakeApi.md | 536 ++++++++++++------ .../vertx/docs/FakeClassnameTags123Api.md | 54 +- .../client/petstore/java/vertx/docs/PetApi.md | 469 +++++++++------ .../petstore/java/vertx/docs/StoreApi.md | 165 ++++-- .../petstore/java/vertx/docs/UserApi.md | 291 +++++++--- .../java/webclient/docs/AnotherFakeApi.md | 37 +- .../petstore/java/webclient/docs/FakeApi.md | 536 ++++++++++++------ .../webclient/docs/FakeClassnameTags123Api.md | 54 +- .../petstore/java/webclient/docs/PetApi.md | 469 +++++++++------ .../petstore/java/webclient/docs/StoreApi.md | 165 ++++-- .../petstore/java/webclient/docs/UserApi.md | 291 +++++++--- 121 files changed, 18496 insertions(+), 7687 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/README.mustache b/modules/openapi-generator/src/main/resources/Java/README.mustache index 1a487fc280a..ff0026651fe 100644 --- a/modules/openapi-generator/src/main/resources/Java/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/README.mustache @@ -84,14 +84,12 @@ import {{{invokerPackage}}}.auth.*; import {{{modelPackage}}}.*; import {{{package}}}.{{{classname}}}; -import java.io.File; -import java.util.*; - public class {{{classname}}}Example { public static void main(String[] args) { - {{#hasAuthMethods}}ApiClient defaultClient = Configuration.getDefaultApiClient(); - {{#authMethods}}{{#isBasic}} + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); @@ -107,7 +105,7 @@ public class {{{classname}}}Example { {{/authMethods}} {{/hasAuthMethods}} - {{{classname}}} apiInstance = new {{{classname}}}(); + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); {{#allParams}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} @@ -116,6 +114,9 @@ public class {{{classname}}}Example { System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache index bffe140b315..3a9d2886266 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache @@ -23,41 +23,50 @@ Method | HTTP request | Description ### Example ```java -// Import classes:{{#hasAuthMethods}} -//import {{{invokerPackage}}}.ApiClient;{{/hasAuthMethods}} -//import {{{invokerPackage}}}.ApiException;{{#hasAuthMethods}} -//import {{{invokerPackage}}}.Configuration; -//import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} -//import {{{package}}}.{{{classname}}}; +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}}; -{{#hasAuthMethods}} -ApiClient defaultClient = Configuration.getDefaultApiClient(); -{{#authMethods}}{{#isBasic}} -// Configure HTTP basic authorization: {{{name}}} -HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); -{{{name}}}.setUsername("YOUR USERNAME"); -{{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} -// Configure API key authorization: {{{name}}} -ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); -{{{name}}}.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} -// Configure OAuth2 access token for authorization: {{{name}}} -OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); -{{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} -{{{classname}}} apiInstance = new {{{classname}}}(); -{{#allParams}} -{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} -try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - System.out.println(result);{{/returnType}} -} catch (ApiException e) { - System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); - e.printStackTrace(); + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -82,5 +91,14 @@ Name | Type | Description | Notes - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index 9c218e35bfa..19c079e3229 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -50,6 +50,15 @@ public class {{classname}} { * @return {{returnType}} {{/returnType}} * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -77,6 +86,15 @@ public class {{classname}} { {{/allParams}} * @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ {{/responses.0}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 3c0af2dac5f..0d60744b9e0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -170,6 +170,15 @@ jar + + + + http.response.details + a + Http Response Details: + + + diff --git a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/google-api-client/docs/PetApi.md +++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/StoreApi.md b/samples/client/petstore/java/google-api-client/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/google-api-client/docs/StoreApi.md +++ b/samples/client/petstore/java/google-api-client/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/google-api-client/docs/UserApi.md +++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/jersey1/docs/PetApi.md +++ b/samples/client/petstore/java/jersey1/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/jersey1/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/jersey1/docs/UserApi.md +++ b/samples/client/petstore/java/jersey1/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index 5c04d212a43..cb62cae054d 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -151,6 +151,15 @@ jar + + + + http.response.details + a + Http Response Details: + + + diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 5f60e6433d1..227f00969d0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -41,6 +41,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index f6d6a10a153..70b4c329d61 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -48,6 +48,11 @@ public class FakeApi { * this route creates an XmlItem * @param xmlItem XmlItem Body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void createXmlItem(XmlItem xmlItem) throws ApiException { @@ -60,6 +65,11 @@ public class FakeApi { * @param xmlItem XmlItem Body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { Object localVarPostBody = xmlItem; @@ -101,6 +111,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return Boolean * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); @@ -112,6 +127,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return ApiResponse<Boolean> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { Object localVarPostBody = body; @@ -148,6 +168,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); @@ -159,6 +184,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return ApiResponse<OuterComposite> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { Object localVarPostBody = body; @@ -195,6 +225,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return BigDecimal * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); @@ -206,6 +241,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return ApiResponse<BigDecimal> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { Object localVarPostBody = body; @@ -242,6 +282,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); @@ -253,6 +298,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { Object localVarPostBody = body; @@ -288,6 +338,11 @@ public class FakeApi { * For this test, the body for this request much reference a schema named `File`. * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { @@ -300,6 +355,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { Object localVarPostBody = body; @@ -341,6 +401,11 @@ public class FakeApi { * @param query (required) * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithQueryParams(String query, User body) throws ApiException { @@ -354,6 +419,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { Object localVarPostBody = body; @@ -401,6 +471,11 @@ public class FakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); @@ -412,6 +487,11 @@ public class FakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; @@ -465,6 +545,12 @@ public class FakeApi { * @param password None (optional) * @param paramCallback None (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -490,6 +576,12 @@ public class FakeApi { * @param paramCallback None (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { Object localVarPostBody = new Object(); @@ -580,6 +672,12 @@ if (paramCallback != null) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -599,6 +697,12 @@ if (paramCallback != null) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = new Object(); @@ -651,6 +755,11 @@ if (enumFormString != null) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -668,6 +777,11 @@ if (enumFormString != null) * @param int64Group Integer in group parameters (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = new Object(); @@ -726,6 +840,11 @@ if (booleanGroup != null) * * @param param request body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testInlineAdditionalProperties(Map param) throws ApiException { @@ -738,6 +857,11 @@ if (booleanGroup != null) * @param param request body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { Object localVarPostBody = param; @@ -779,6 +903,11 @@ if (booleanGroup != null) * @param param field1 (required) * @param param2 field2 (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testJsonFormData(String param, String param2) throws ApiException { @@ -792,6 +921,11 @@ if (booleanGroup != null) * @param param2 field2 (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 0bb82d50ca0..1d2ba11a21d 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -41,6 +41,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index a78d6e3919c..22a80aefe3a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -42,6 +42,12 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public void addPet(Pet body) throws ApiException { @@ -54,6 +60,12 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -95,6 +107,12 @@ public class PetApi { * @param petId Pet id to delete (required) * @param apiKey (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public void deletePet(Long petId, String apiKey) throws ApiException { @@ -108,6 +126,12 @@ public class PetApi { * @param apiKey (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { Object localVarPostBody = new Object(); @@ -152,6 +176,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); @@ -163,6 +193,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { Object localVarPostBody = new Object(); @@ -205,6 +241,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -218,6 +260,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -262,6 +310,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return Pet * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); @@ -273,6 +328,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return ApiResponse<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { Object localVarPostBody = new Object(); @@ -314,6 +376,14 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public void updatePet(Pet body) throws ApiException { @@ -326,6 +396,14 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -368,6 +446,11 @@ public class PetApi { * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { @@ -382,6 +465,11 @@ public class PetApi { * @param status Updated status of the pet (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { Object localVarPostBody = new Object(); @@ -430,6 +518,11 @@ if (status != null) * @param file file to upload (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); @@ -443,6 +536,11 @@ if (status != null) * @param file file to upload (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = new Object(); @@ -491,6 +589,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); @@ -504,6 +607,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java index 97d237b70c1..84c59b439eb 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java @@ -40,6 +40,12 @@ public class StoreApi { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public void deleteOrder(String orderId) throws ApiException { @@ -52,6 +58,12 @@ public class StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -93,6 +105,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return Map<String, Integer> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); @@ -103,6 +120,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return ApiResponse<Map<String, Integer>> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -139,6 +161,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); @@ -150,6 +179,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -192,6 +228,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); @@ -203,6 +245,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java index 079174b7c57..1573bbde1ca 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java @@ -40,6 +40,11 @@ public class UserApi { * This can only be done by the logged in user. * @param body Created user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUser(User body) throws ApiException { @@ -52,6 +57,11 @@ public class UserApi { * @param body Created user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { Object localVarPostBody = body; @@ -92,6 +102,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithArrayInput(List body) throws ApiException { @@ -104,6 +119,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -144,6 +164,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithListInput(List body) throws ApiException { @@ -156,6 +181,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -196,6 +226,12 @@ public class UserApi { * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void deleteUser(String username) throws ApiException { @@ -208,6 +244,12 @@ public class UserApi { * @param username The name that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -250,6 +292,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); @@ -261,6 +310,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return ApiResponse<User> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -304,6 +360,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); @@ -316,6 +378,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { Object localVarPostBody = new Object(); @@ -362,6 +430,11 @@ public class UserApi { * Logs out current logged in user session * * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void logoutUser() throws ApiException { @@ -373,6 +446,11 @@ public class UserApi { * * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse logoutUserWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -409,6 +487,12 @@ public class UserApi { * @param username name that need to be deleted (required) * @param body Updated user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public void updateUser(String username, User body) throws ApiException { @@ -422,6 +506,12 @@ public class UserApi { * @param body Updated user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index 5accccfcede..4b7a25668c2 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -151,6 +151,15 @@ jar + + + + http.response.details + a + Http Response Details: + + + diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 5f60e6433d1..227f00969d0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -41,6 +41,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index d8c1e0e73ff..ec5b45d4ec3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -48,6 +48,11 @@ public class FakeApi { * this route creates an XmlItem * @param xmlItem XmlItem Body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void createXmlItem(XmlItem xmlItem) throws ApiException { @@ -60,6 +65,11 @@ public class FakeApi { * @param xmlItem XmlItem Body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { Object localVarPostBody = xmlItem; @@ -101,6 +111,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return Boolean * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); @@ -112,6 +127,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return ApiResponse<Boolean> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { Object localVarPostBody = body; @@ -148,6 +168,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); @@ -159,6 +184,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return ApiResponse<OuterComposite> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { Object localVarPostBody = body; @@ -195,6 +225,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return BigDecimal * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); @@ -206,6 +241,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return ApiResponse<BigDecimal> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { Object localVarPostBody = body; @@ -242,6 +282,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); @@ -253,6 +298,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { Object localVarPostBody = body; @@ -288,6 +338,11 @@ public class FakeApi { * For this test, the body for this request much reference a schema named `File`. * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { @@ -300,6 +355,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { Object localVarPostBody = body; @@ -341,6 +401,11 @@ public class FakeApi { * @param query (required) * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithQueryParams(String query, User body) throws ApiException { @@ -354,6 +419,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { Object localVarPostBody = body; @@ -401,6 +471,11 @@ public class FakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); @@ -412,6 +487,11 @@ public class FakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; @@ -465,6 +545,12 @@ public class FakeApi { * @param password None (optional) * @param paramCallback None (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -490,6 +576,12 @@ public class FakeApi { * @param paramCallback None (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { Object localVarPostBody = new Object(); @@ -580,6 +672,12 @@ if (paramCallback != null) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -599,6 +697,12 @@ if (paramCallback != null) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = new Object(); @@ -651,6 +755,11 @@ if (enumFormString != null) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -668,6 +777,11 @@ if (enumFormString != null) * @param int64Group Integer in group parameters (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = new Object(); @@ -726,6 +840,11 @@ if (booleanGroup != null) * * @param param request body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testInlineAdditionalProperties(Map param) throws ApiException { @@ -738,6 +857,11 @@ if (booleanGroup != null) * @param param request body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { Object localVarPostBody = param; @@ -779,6 +903,11 @@ if (booleanGroup != null) * @param param field1 (required) * @param param2 field2 (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testJsonFormData(String param, String param2) throws ApiException { @@ -792,6 +921,11 @@ if (booleanGroup != null) * @param param2 field2 (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 0bb82d50ca0..1d2ba11a21d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -41,6 +41,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index a78d6e3919c..22a80aefe3a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -42,6 +42,12 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public void addPet(Pet body) throws ApiException { @@ -54,6 +60,12 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -95,6 +107,12 @@ public class PetApi { * @param petId Pet id to delete (required) * @param apiKey (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public void deletePet(Long petId, String apiKey) throws ApiException { @@ -108,6 +126,12 @@ public class PetApi { * @param apiKey (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { Object localVarPostBody = new Object(); @@ -152,6 +176,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); @@ -163,6 +193,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { Object localVarPostBody = new Object(); @@ -205,6 +241,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -218,6 +260,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -262,6 +310,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return Pet * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); @@ -273,6 +328,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return ApiResponse<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { Object localVarPostBody = new Object(); @@ -314,6 +376,14 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public void updatePet(Pet body) throws ApiException { @@ -326,6 +396,14 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -368,6 +446,11 @@ public class PetApi { * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { @@ -382,6 +465,11 @@ public class PetApi { * @param status Updated status of the pet (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { Object localVarPostBody = new Object(); @@ -430,6 +518,11 @@ if (status != null) * @param file file to upload (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); @@ -443,6 +536,11 @@ if (status != null) * @param file file to upload (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = new Object(); @@ -491,6 +589,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); @@ -504,6 +607,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 97d237b70c1..84c59b439eb 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -40,6 +40,12 @@ public class StoreApi { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public void deleteOrder(String orderId) throws ApiException { @@ -52,6 +58,12 @@ public class StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -93,6 +105,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return Map<String, Integer> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); @@ -103,6 +120,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return ApiResponse<Map<String, Integer>> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -139,6 +161,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); @@ -150,6 +179,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -192,6 +228,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); @@ -203,6 +245,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index 079174b7c57..1573bbde1ca 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -40,6 +40,11 @@ public class UserApi { * This can only be done by the logged in user. * @param body Created user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUser(User body) throws ApiException { @@ -52,6 +57,11 @@ public class UserApi { * @param body Created user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { Object localVarPostBody = body; @@ -92,6 +102,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithArrayInput(List body) throws ApiException { @@ -104,6 +119,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -144,6 +164,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithListInput(List body) throws ApiException { @@ -156,6 +181,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -196,6 +226,12 @@ public class UserApi { * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void deleteUser(String username) throws ApiException { @@ -208,6 +244,12 @@ public class UserApi { * @param username The name that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -250,6 +292,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); @@ -261,6 +310,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return ApiResponse<User> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -304,6 +360,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); @@ -316,6 +378,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { Object localVarPostBody = new Object(); @@ -362,6 +430,11 @@ public class UserApi { * Logs out current logged in user session * * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void logoutUser() throws ApiException { @@ -373,6 +446,11 @@ public class UserApi { * * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse logoutUserWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -409,6 +487,12 @@ public class UserApi { * @param username name that need to be deleted (required) * @param body Updated user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public void updateUser(String username, User body) throws ApiException { @@ -422,6 +506,12 @@ public class UserApi { * @param body Updated user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/jersey2/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/jersey2/docs/StoreApi.md b/samples/client/petstore/java/jersey2/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/jersey2/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/jersey2/docs/UserApi.md b/samples/client/petstore/java/jersey2/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/jersey2/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index bb1a916c1e4..aa2e548a6c0 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -151,6 +151,15 @@ jar + + + + http.response.details + a + Http Response Details: + + + diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 5f60e6433d1..227f00969d0 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -41,6 +41,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class AnotherFakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index f6d6a10a153..70b4c329d61 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -48,6 +48,11 @@ public class FakeApi { * this route creates an XmlItem * @param xmlItem XmlItem Body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void createXmlItem(XmlItem xmlItem) throws ApiException { @@ -60,6 +65,11 @@ public class FakeApi { * @param xmlItem XmlItem Body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { Object localVarPostBody = xmlItem; @@ -101,6 +111,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return Boolean * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); @@ -112,6 +127,11 @@ public class FakeApi { * @param body Input boolean as post body (optional) * @return ApiResponse<Boolean> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output boolean -
*/ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { Object localVarPostBody = body; @@ -148,6 +168,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); @@ -159,6 +184,11 @@ public class FakeApi { * @param body Input composite as post body (optional) * @return ApiResponse<OuterComposite> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output composite -
*/ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { Object localVarPostBody = body; @@ -195,6 +225,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return BigDecimal * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); @@ -206,6 +241,11 @@ public class FakeApi { * @param body Input number as post body (optional) * @return ApiResponse<BigDecimal> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output number -
*/ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { Object localVarPostBody = body; @@ -242,6 +282,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); @@ -253,6 +298,11 @@ public class FakeApi { * @param body Input string as post body (optional) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Output string -
*/ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { Object localVarPostBody = body; @@ -288,6 +338,11 @@ public class FakeApi { * For this test, the body for this request much reference a schema named `File`. * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { @@ -300,6 +355,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { Object localVarPostBody = body; @@ -341,6 +401,11 @@ public class FakeApi { * @param query (required) * @param body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithQueryParams(String query, User body) throws ApiException { @@ -354,6 +419,11 @@ public class FakeApi { * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
*/ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { Object localVarPostBody = body; @@ -401,6 +471,11 @@ public class FakeApi { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); @@ -412,6 +487,11 @@ public class FakeApi { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; @@ -465,6 +545,12 @@ public class FakeApi { * @param password None (optional) * @param paramCallback None (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -490,6 +576,12 @@ public class FakeApi { * @param paramCallback None (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { Object localVarPostBody = new Object(); @@ -580,6 +672,12 @@ if (paramCallback != null) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -599,6 +697,12 @@ if (paramCallback != null) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = new Object(); @@ -651,6 +755,11 @@ if (enumFormString != null) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { @@ -668,6 +777,11 @@ if (enumFormString != null) * @param int64Group Integer in group parameters (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
400 Someting wrong -
*/ public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = new Object(); @@ -726,6 +840,11 @@ if (booleanGroup != null) * * @param param request body (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testInlineAdditionalProperties(Map param) throws ApiException { @@ -738,6 +857,11 @@ if (booleanGroup != null) * @param param request body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { Object localVarPostBody = param; @@ -779,6 +903,11 @@ if (booleanGroup != null) * @param param field1 (required) * @param param2 field2 (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testJsonFormData(String param, String param2) throws ApiException { @@ -792,6 +921,11 @@ if (booleanGroup != null) * @param param2 field2 (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 0bb82d50ca0..1d2ba11a21d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -41,6 +41,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return Client * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); @@ -52,6 +57,11 @@ public class FakeClassnameTags123Api { * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index a78d6e3919c..22a80aefe3a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -42,6 +42,12 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public void addPet(Pet body) throws ApiException { @@ -54,6 +60,12 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
*/ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -95,6 +107,12 @@ public class PetApi { * @param petId Pet id to delete (required) * @param apiKey (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public void deletePet(Long petId, String apiKey) throws ApiException { @@ -108,6 +126,12 @@ public class PetApi { * @param apiKey (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid pet value -
*/ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { Object localVarPostBody = new Object(); @@ -152,6 +176,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); @@ -163,6 +193,12 @@ public class PetApi { * @param status Status values that need to be considered for filter (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { Object localVarPostBody = new Object(); @@ -205,6 +241,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return List<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -218,6 +260,12 @@ public class PetApi { * @param tags Tags to filter by (required) * @return ApiResponse<List<Pet>> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -262,6 +310,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return Pet * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); @@ -273,6 +328,13 @@ public class PetApi { * @param petId ID of pet to return (required) * @return ApiResponse<Pet> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { Object localVarPostBody = new Object(); @@ -314,6 +376,14 @@ public class PetApi { * * @param body Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public void updatePet(Pet body) throws ApiException { @@ -326,6 +396,14 @@ public class PetApi { * @param body Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { Object localVarPostBody = body; @@ -368,6 +446,11 @@ public class PetApi { * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { @@ -382,6 +465,11 @@ public class PetApi { * @param status Updated status of the pet (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
*/ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { Object localVarPostBody = new Object(); @@ -430,6 +518,11 @@ if (status != null) * @param file file to upload (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); @@ -443,6 +536,11 @@ if (status != null) * @param file file to upload (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = new Object(); @@ -491,6 +589,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); @@ -504,6 +607,11 @@ if (file != null) * @param additionalMetadata Additional data to pass to server (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { Object localVarPostBody = new Object(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java index 97d237b70c1..84c59b439eb 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -40,6 +40,12 @@ public class StoreApi { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public void deleteOrder(String orderId) throws ApiException { @@ -52,6 +58,12 @@ public class StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -93,6 +105,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return Map<String, Integer> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); @@ -103,6 +120,11 @@ public class StoreApi { * Returns a map of status codes to quantities * @return ApiResponse<Map<String, Integer>> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -139,6 +161,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); @@ -150,6 +179,13 @@ public class StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { Object localVarPostBody = new Object(); @@ -192,6 +228,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); @@ -203,6 +245,12 @@ public class StoreApi { * @param body order placed for purchasing the pet (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java index 079174b7c57..1573bbde1ca 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java @@ -40,6 +40,11 @@ public class UserApi { * This can only be done by the logged in user. * @param body Created user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUser(User body) throws ApiException { @@ -52,6 +57,11 @@ public class UserApi { * @param body Created user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { Object localVarPostBody = body; @@ -92,6 +102,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithArrayInput(List body) throws ApiException { @@ -104,6 +119,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -144,6 +164,11 @@ public class UserApi { * * @param body List of user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithListInput(List body) throws ApiException { @@ -156,6 +181,11 @@ public class UserApi { * @param body List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; @@ -196,6 +226,12 @@ public class UserApi { * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public void deleteUser(String username) throws ApiException { @@ -208,6 +244,12 @@ public class UserApi { * @param username The name that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -250,6 +292,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); @@ -261,6 +310,13 @@ public class UserApi { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return ApiResponse<User> * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { Object localVarPostBody = new Object(); @@ -304,6 +360,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return String * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); @@ -316,6 +378,12 @@ public class UserApi { * @param password The password for login in clear text (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { Object localVarPostBody = new Object(); @@ -362,6 +430,11 @@ public class UserApi { * Logs out current logged in user session * * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public void logoutUser() throws ApiException { @@ -373,6 +446,11 @@ public class UserApi { * * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse logoutUserWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); @@ -409,6 +487,12 @@ public class UserApi { * @param username name that need to be deleted (required) * @param body Updated user object (required) * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public void updateUser(String username, User body) throws ApiException { @@ -422,6 +506,12 @@ public class UserApi { * @param body Updated user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { Object localVarPostBody = body; diff --git a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resteasy/docs/StoreApi.md b/samples/client/petstore/java/resteasy/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/resteasy/docs/StoreApi.md +++ b/samples/client/petstore/java/resteasy/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/resteasy/docs/UserApi.md b/samples/client/petstore/java/resteasy/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/resteasy/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/StoreApi.md b/samples/client/petstore/java/resttemplate/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/resttemplate/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/UserApi.md b/samples/client/petstore/java/resttemplate/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/resttemplate/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2-play24/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2/docs/UserApi.md b/samples/client/petstore/java/retrofit2/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md index a81702b6468..f58ecd4216a 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index b42dba573e4..29d71d3620d 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md index 6e70e829bad..4f4dac58589 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index 9c417f61ce0..088c67ee214 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md index 1e91aca0818..ebefe2ffdd4 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md index 31354a3cf10..bdf473df90d 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 78f37fcbc8b..9224b4d80d5 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -AsyncFile binary = new AsyncFile(); // AsyncFile | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + AsyncFile binary = new AsyncFile(); // AsyncFile | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index 1430e4af1d9..6b8fb662c80 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -AsyncFile file = new AsyncFile(); // AsyncFile | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + AsyncFile file = new AsyncFile(); // AsyncFile | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -AsyncFile requiredFile = new AsyncFile(); // AsyncFile | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + AsyncFile requiredFile = new AsyncFile(); // AsyncFile | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/vertx/docs/StoreApi.md b/samples/client/petstore/java/vertx/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/vertx/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/vertx/docs/UserApi.md b/samples/client/petstore/java/vertx/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/vertx/docs/UserApi.md +++ b/samples/client/petstore/java/vertx/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md b/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md index 707f9eda8ca..059616ec6ba 100644 --- a/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/webclient/docs/AnotherFakeApi.md @@ -20,18 +20,30 @@ To test special tags and operation ID starting with number ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -AnotherFakeApi apiInstance = new AnotherFakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - e.printStackTrace(); + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -55,3 +67,8 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 2ae7e52932f..9a2e4770201 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -32,17 +32,29 @@ this route creates an XmlItem ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body -try { - apiInstance.createXmlItem(xmlItem); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + try { + apiInstance.createXmlItem(xmlItem); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -66,6 +78,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## fakeOuterBooleanSerialize @@ -79,18 +96,30 @@ Test serialization of outer boolean types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Boolean body = true; // Boolean | Input boolean as post body -try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Boolean body = true; // Boolean | Input boolean as post body + try { + Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -114,6 +143,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + ## fakeOuterCompositeSerialize @@ -127,18 +161,30 @@ Test serialization of object with outer number type ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body -try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + try { + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -162,6 +208,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + ## fakeOuterNumberSerialize @@ -175,18 +226,30 @@ Test serialization of outer number types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body -try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body + try { + BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -210,6 +273,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + ## fakeOuterStringSerialize @@ -223,18 +291,30 @@ Test serialization of outer string types ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String body = "body_example"; // String | Input string as post body -try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String body = "body_example"; // String | Input string as post body + try { + String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -258,6 +338,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + ## testBodyWithFileSchema @@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | -try { - apiInstance.testBodyWithFileSchema(body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -305,6 +402,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testBodyWithQueryParams @@ -316,18 +418,30 @@ No authorization required ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String query = "query_example"; // String | -User body = new User(); // User | -try { - apiInstance.testBodyWithQueryParams(query, body); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String query = "query_example"; // String | + User body = new User(); // User | + try { + apiInstance.testBodyWithQueryParams(query, body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -352,6 +466,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + ## testClientModel @@ -365,18 +484,30 @@ To test \"client\" model ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClientModel(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClientModel(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -400,6 +531,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testEndpointParameters @@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP basic authorization: http_basic_test + HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); + http_basic_test.setUsername("YOUR USERNAME"); + http_basic_test.setPassword("YOUR PASSWORD"); -// Configure HTTP basic authorization: http_basic_test -HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); -http_basic_test.setUsername("YOUR USERNAME"); -http_basic_test.setPassword("YOUR PASSWORD"); - -FakeApi apiInstance = new FakeApi(); -BigDecimal number = new BigDecimal(); // BigDecimal | None -Double _double = 3.4D; // Double | None -String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = null; // byte[] | None -Integer integer = 56; // Integer | None -Integer int32 = 56; // Integer | None -Long int64 = 56L; // Long | None -Float _float = 3.4F; // Float | None -String string = "string_example"; // String | None -File binary = new File("/path/to/file"); // File | None -LocalDate date = new LocalDate(); // LocalDate | None -OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None -String password = "password_example"; // String | None -String paramCallback = "paramCallback_example"; // String | None -try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + BigDecimal number = new BigDecimal(); // BigDecimal | None + Double _double = 3.4D; // Double | None + String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None + byte[] _byte = null; // byte[] | None + Integer integer = 56; // Integer | None + Integer int32 = 56; // Integer | None + Long int64 = 56L; // Long | None + Float _float = 3.4F; // Float | None + String string = "string_example"; // String | None + File binary = new File("/path/to/file"); // File | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None + String password = "password_example"; // String | None + String paramCallback = "paramCallback_example"; // String | None + try { + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -482,6 +627,12 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## testEnumParameters @@ -495,24 +646,36 @@ To test enum parameters ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) -String enumHeaderString = "-efg"; // String | Header parameter enum test (string) -List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) -String enumQueryString = "-efg"; // String | Query parameter enum test (string) -Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) -Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) -List enumFormStringArray = "$"; // List | Form parameter enum test (string array) -String enumFormString = "-efg"; // String | Form parameter enum test (string) -try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) + try { + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEnumParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -543,6 +706,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + ## testGroupParameters @@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional) ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Integer requiredStringGroup = 56; // Integer | Required String in group parameters -Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters -Long requiredInt64Group = 56L; // Long | Required Integer in group parameters -Integer stringGroup = 56; // Integer | String in group parameters -Boolean booleanGroup = true; // Boolean | Boolean in group parameters -Long int64Group = 56L; // Long | Integer in group parameters -try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Integer requiredStringGroup = 56; // Integer | Required String in group parameters + Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters + Long requiredInt64Group = 56L; // Long | Required Integer in group parameters + Integer stringGroup = 56; // Integer | String in group parameters + Boolean booleanGroup = true; // Boolean | Boolean in group parameters + Long int64Group = 56L; // Long | Integer in group parameters + try { + apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -600,6 +781,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + ## testInlineAdditionalProperties @@ -611,17 +797,29 @@ test inline additionalProperties ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -Map param = new HashMap(); // Map | request body -try { - apiInstance.testInlineAdditionalProperties(param); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + Map param = new HashMap(); // Map | request body + try { + apiInstance.testInlineAdditionalProperties(param); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -645,6 +843,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## testJsonFormData @@ -656,18 +859,30 @@ test json serialization of form data ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.FakeApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -FakeApi apiInstance = new FakeApi(); -String param = "param_example"; // String | field1 -String param2 = "param2_example"; // String | field2 -try { - apiInstance.testJsonFormData(param, param2); -} catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - e.printStackTrace(); + FakeApi apiInstance = new FakeApi(defaultClient); + String param = "param_example"; // String | field1 + String param2 = "param2_example"; // String | field2 + try { + apiInstance.testJsonFormData(param, param2); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testJsonFormData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -692,3 +907,8 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md index 9d22b2e3f94..14a74a37a4e 100644 --- a/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/webclient/docs/FakeClassnameTags123Api.md @@ -20,28 +20,37 @@ To test class name in snake case ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.FakeClassnameTags123Api; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeClassnameTags123Api; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key_query + ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); + api_key_query.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key_query.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key_query -ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); -api_key_query.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.setApiKeyPrefix("Token"); - -FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(); -Client body = new Client(); // Client | client model -try { - Client result = apiInstance.testClassname(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - e.printStackTrace(); + FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testClassname(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -65,3 +74,8 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/webclient/docs/PetApi.md b/samples/client/petstore/java/webclient/docs/PetApi.md index 2c71fc85134..875a8e6783e 100644 --- a/samples/client/petstore/java/webclient/docs/PetApi.md +++ b/samples/client/petstore/java/webclient/docs/PetApi.md @@ -26,25 +26,34 @@ Add a new pet to the store ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.addPet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.addPet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -68,6 +77,12 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + ## deletePet @@ -79,26 +94,35 @@ Deletes a pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | Pet id to delete -String apiKey = "apiKey_example"; // String | -try { - apiInstance.deletePet(petId, apiKey); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -123,6 +147,12 @@ null (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + ## findPetsByStatus @@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List status = Arrays.asList("available"); // List | Status values that need to be considered for filter -try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -179,6 +218,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + ## findPetsByTags @@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -List tags = Arrays.asList(); // List | Tags to filter by -try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -235,6 +289,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + ## getPetById @@ -248,28 +308,37 @@ Returns a single pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to return -try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -293,6 +362,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + ## updatePet @@ -304,25 +380,34 @@ Update an existing pet ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Pet body = new Pet(); // Pet | Pet object that needs to be added to the store -try { - apiInstance.updatePet(body); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + try { + apiInstance.updatePet(body); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -346,6 +431,14 @@ null (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + ## updatePetWithForm @@ -357,27 +450,36 @@ Updates a pet in the store with form data ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "name_example"; // String | Updated name of the pet -String status = "status_example"; // String | Updated status of the pet -try { - apiInstance.updatePetWithForm(petId, name, status); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -403,6 +505,11 @@ null (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + ## uploadFile @@ -414,28 +521,37 @@ uploads an image ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -File file = new File("/path/to/file"); // File | file to upload -try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -461,6 +577,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## uploadFileWithRequiredFile @@ -472,28 +593,37 @@ uploads an image (required) ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.PetApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); -// Configure OAuth2 access token for authorization: petstore_auth -OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); -petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - -PetApi apiInstance = new PetApi(); -Long petId = 56L; // Long | ID of pet to update -File requiredFile = new File("/path/to/file"); // File | file to upload -String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server -try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); - e.printStackTrace(); + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + File requiredFile = new File("/path/to/file"); // File | file to upload + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -519,3 +649,8 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/webclient/docs/StoreApi.md b/samples/client/petstore/java/webclient/docs/StoreApi.md index 65f7651545c..352399ea515 100644 --- a/samples/client/petstore/java/webclient/docs/StoreApi.md +++ b/samples/client/petstore/java/webclient/docs/StoreApi.md @@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -String orderId = "orderId_example"; // String | ID of the order that needs to be deleted -try { - apiInstance.deleteOrder(orderId); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -57,6 +69,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## getInventory @@ -70,27 +88,36 @@ Returns a map of status codes to quantities ```java // Import classes: -//import org.openapitools.client.ApiClient; -//import org.openapitools.client.ApiException; -//import org.openapitools.client.Configuration; -//import org.openapitools.client.auth.*; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; -ApiClient defaultClient = Configuration.getDefaultApiClient(); +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); -// Configure API key authorization: api_key -ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); -api_key.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key.setApiKeyPrefix("Token"); - -StoreApi apiInstance = new StoreApi(); -try { - Map result = apiInstance.getInventory(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -111,6 +138,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + ## getOrderById @@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Long orderId = 56L; // Long | ID of pet that needs to be fetched -try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -159,6 +203,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + ## placeOrder @@ -170,18 +221,30 @@ Place an order for a pet ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.StoreApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -StoreApi apiInstance = new StoreApi(); -Order body = new Order(); // Order | order placed for purchasing the pet -try { - Order result = apiInstance.placeOrder(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - e.printStackTrace(); + StoreApi apiInstance = new StoreApi(defaultClient); + Order body = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -205,3 +268,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/petstore/java/webclient/docs/UserApi.md b/samples/client/petstore/java/webclient/docs/UserApi.md index 3baa2c50ea9..4154aba4f17 100644 --- a/samples/client/petstore/java/webclient/docs/UserApi.md +++ b/samples/client/petstore/java/webclient/docs/UserApi.md @@ -27,17 +27,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -User body = new User(); // User | Created user object -try { - apiInstance.createUser(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + User body = new User(); // User | Created user object + try { + apiInstance.createUser(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -61,6 +73,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithArrayInput @@ -72,17 +89,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithArrayInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -106,6 +135,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## createUsersWithListInput @@ -117,17 +151,29 @@ Creates list of users with given input array ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -List body = Arrays.asList(null); // List | List of user object -try { - apiInstance.createUsersWithListInput(body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + List body = Arrays.asList(null); // List | List of user object + try { + apiInstance.createUsersWithListInput(body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -151,6 +197,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## deleteUser @@ -164,17 +215,29 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be deleted -try { - apiInstance.deleteUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -198,6 +261,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## getUserByName @@ -209,18 +278,30 @@ Get user by user name ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -try { - User result = apiInstance.getUserByName(username); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -244,6 +325,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + ## loginUser @@ -255,19 +343,31 @@ Logs user into the system ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | The user name for login -String password = "password_example"; // String | The password for login in clear text -try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -292,6 +392,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + ## logoutUser @@ -303,16 +409,28 @@ Logs out current logged in user session ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -try { - apiInstance.logoutUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -333,6 +451,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + ## updateUser @@ -346,18 +469,30 @@ This can only be done by the logged in user. ```java // Import classes: -//import org.openapitools.client.ApiException; -//import org.openapitools.client.api.UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | name that need to be deleted -User body = new User(); // User | Updated user object -try { - apiInstance.updateUser(username, body); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - e.printStackTrace(); + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User body = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, body); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } } ``` @@ -382,3 +517,9 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + From caac76c2652939c0e59d6cb7bfaed6ec119b357d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Zavr=C5=A1nik?= Date: Mon, 3 Jun 2019 14:48:40 +0200 Subject: [PATCH 10/73] Kotlin-Spring template fixes/improvements (#3007) * Fixed case where invalid comma is added to consumes/produces list in case last element is empty. * Changed default HttpStatus.OK response to match first response code in definition. Allowing also other responses 201, 202 ... * Changed default HttpStatus.OK response to match first response code in definition. Allowing also other responses 201, 202 ... * run ./bin/kotlin-springboot-petstore-server.sh Updated APIs --- .../main/resources/kotlin-spring/api.mustache | 4 ++-- .../resources/kotlin-spring/returnValue.mustache | 2 +- .../main/kotlin/org/openapitools/api/PetApi.kt | 16 ++++++++-------- .../main/kotlin/org/openapitools/api/StoreApi.kt | 8 ++++---- .../main/kotlin/org/openapitools/api/UserApi.kt | 16 ++++++++-------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index fcf43b083b8..ba8597ee9fd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -74,8 +74,8 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}} produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}} consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}} - produces = [{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}} - consumes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}} + produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}} + consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}} method = [RequestMethod.{{httpMethod}}]) {{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> { return {{>returnValue}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/returnValue.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/returnValue.mustache index 4973c83431d..d2bea4c365f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/returnValue.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/returnValue.mustache @@ -1 +1 @@ -{{#serviceInterface}}ResponseEntity(service.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}), HttpStatus.OK){{/serviceInterface}}{{^serviceInterface}}ResponseEntity(HttpStatus.NOT_IMPLEMENTED){{/serviceInterface}} \ No newline at end of file +{{#serviceInterface}}ResponseEntity(service.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}), {{#responses}}{{#-first}}HttpStatus.valueOf({{code}}){{/-first}}{{/responses}}){{/serviceInterface}}{{^serviceInterface}}ResponseEntity(HttpStatus.NOT_IMPLEMENTED){{/serviceInterface}} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index b62a21f79cf..cf2e8c2d1ae 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -56,7 +56,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.POST]) fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { - return ResponseEntity(service.addPet(body), HttpStatus.OK) + return ResponseEntity(service.addPet(body), HttpStatus.valueOf(405)) } @ApiOperation( @@ -72,7 +72,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long ,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? ): ResponseEntity { - return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400)) } @ApiOperation( @@ -90,7 +90,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.GET]) fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List ): ResponseEntity> { - return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) } @ApiOperation( @@ -108,7 +108,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.GET]) fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List ): ResponseEntity> { - return ResponseEntity(service.findPetsByTags(tags), HttpStatus.OK) + return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) } @ApiOperation( @@ -125,7 +125,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.GET]) fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long ): ResponseEntity { - return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) } @ApiOperation( @@ -141,7 +141,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.PUT]) fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { - return ResponseEntity(service.updatePet(body), HttpStatus.OK) + return ResponseEntity(service.updatePet(body), HttpStatus.valueOf(400)) } @ApiOperation( @@ -159,7 +159,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? ): ResponseEntity { - return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @ApiOperation( @@ -179,6 +179,6 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { - return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index b33120544b9..db4ee51c21a 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -53,7 +53,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic method = [RequestMethod.DELETE]) fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String ): ResponseEntity { - return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) } @ApiOperation( @@ -70,7 +70,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic produces = ["application/json"], method = [RequestMethod.GET]) fun getInventory(): ResponseEntity> { - return ResponseEntity(service.getInventory(), HttpStatus.OK) + return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @ApiOperation( @@ -86,7 +86,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic method = [RequestMethod.GET]) fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long ): ResponseEntity { - return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) } @ApiOperation( @@ -102,6 +102,6 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic method = [RequestMethod.POST]) fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody body: Order ): ResponseEntity { - return ResponseEntity(service.placeOrder(body), HttpStatus.OK) + return ResponseEntity(service.placeOrder(body), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index a785944a279..6fbd89971aa 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -53,7 +53,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { - return ResponseEntity(service.createUser(body), HttpStatus.OK) + return ResponseEntity(service.createUser(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -67,7 +67,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List ): ResponseEntity { - return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.OK) + return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -81,7 +81,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List ): ResponseEntity { - return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.OK) + return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -95,7 +95,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.DELETE]) fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String ): ResponseEntity { - return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) } @ApiOperation( @@ -111,7 +111,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.GET]) fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String ): ResponseEntity { - return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) } @ApiOperation( @@ -128,7 +128,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String ,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String ): ResponseEntity { - return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200)) } @ApiOperation( @@ -141,7 +141,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/logout"], method = [RequestMethod.GET]) fun logoutUser(): ResponseEntity { - return ResponseEntity(service.logoutUser(), HttpStatus.OK) + return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @ApiOperation( @@ -156,6 +156,6 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { - return ResponseEntity(service.updateUser(username, body), HttpStatus.OK) + return ResponseEntity(service.updateUser(username, body), HttpStatus.valueOf(400)) } } From e06a40814184d936a1f0e51ff666ad0508825f75 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Jun 2019 21:17:17 +0800 Subject: [PATCH 11/73] Update C# client dependency (#2678) * update csharp dependency * fix appveyor test * skip build error * update nunit version * fix nunit path * update petstore test * various fix --- .../Org.OpenAPITools.Test.csproj | 24 ++++++------ appveyor.yml | 4 +- bin/csharp-petstore.sh | 2 +- .../main/resources/csharp/Project.mustache | 16 ++++---- .../resources/csharp/TestProject.mustache | 24 ++++++------ .../main/resources/csharp/api_test.mustache | 7 ++-- .../resources/csharp/compile-mono.sh.mustache | 4 +- .../main/resources/csharp/compile.mustache | 4 +- .../main/resources/csharp/model_test.mustache | 7 ++-- .../resources/csharp/mono_nunit_test.mustache | 6 +-- .../src/main/resources/csharp/nuspec.mustache | 4 +- .../resources/csharp/packages.config.mustache | 4 +- .../csharp/packages_test.config.mustache | 6 +-- .../resources/csharp/project.json.mustache | 6 +-- .../petstore/csharp/OpenAPIClient/build.bat | 4 +- .../petstore/csharp/OpenAPIClient/build.sh | 4 +- .../csharp/OpenAPIClient/mono_nunit_test.sh | 6 +-- .../Api/AnotherFakeApiTests.cs | 1 - .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 1 - .../Api/FakeClassnameTags123ApiTests.cs | 1 - .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 39 +++++++++---------- .../Api/StoreApiTests.cs | 1 - .../Org.OpenAPITools.Test/Api/UserApiTests.cs | 1 - .../Client/ApiClientTests.cs | 4 +- .../Model/AdditionalPropertiesAnyTypeTests.cs | 1 - .../Model/AdditionalPropertiesArrayTests.cs | 1 - .../Model/AdditionalPropertiesBooleanTests.cs | 1 - .../Model/AdditionalPropertiesClassTests.cs | 1 - .../Model/AdditionalPropertiesIntegerTests.cs | 1 - .../Model/AdditionalPropertiesNumberTests.cs | 1 - .../Model/AdditionalPropertiesObjectTests.cs | 1 - .../Model/AdditionalPropertiesStringTests.cs | 1 - .../Model/AnimalTests.cs | 1 - .../Model/ApiResponseTests.cs | 1 - .../Model/ArrayOfArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayTestTests.cs | 1 - .../Model/CapitalizationTests.cs | 1 - .../Org.OpenAPITools.Test/Model/CatTests.cs | 1 - .../Model/CategoryTests.cs | 1 - .../Model/ClassModelTests.cs | 1 - .../Org.OpenAPITools.Test/Model/DogTests.cs | 1 - .../Model/EnumArraysTests.cs | 1 - .../Model/EnumClassTests.cs | 1 - .../Model/EnumTestTests.cs | 1 - .../Model/FileSchemaTestClassTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FileTests.cs | 1 - .../Model/FormatTestTests.cs | 1 - .../Model/HasOnlyReadOnlyTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ListTests.cs | 1 - .../Model/MapTestTests.cs | 1 - ...ertiesAndAdditionalPropertiesClassTests.cs | 1 - .../Model/Model200ResponseTests.cs | 1 - .../Model/ModelClientTests.cs | 1 - .../Org.OpenAPITools.Test/Model/NameTests.cs | 1 - .../Model/NumberOnlyTests.cs | 1 - .../Org.OpenAPITools.Test/Model/OrderTests.cs | 1 - .../Model/OuterCompositeTests.cs | 1 - .../Model/OuterEnumTests.cs | 1 - .../Org.OpenAPITools.Test/Model/PetTests.cs | 3 +- .../Model/ReadOnlyFirstTests.cs | 1 - .../Model/ReturnTests.cs | 1 - .../Model/SpecialModelNameTests.cs | 1 - .../Org.OpenAPITools.Test/Model/TagTests.cs | 1 - .../Model/TypeHolderDefaultTests.cs | 1 - .../Model/TypeHolderExampleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/UserTests.cs | 1 - .../Model/XmlItemTests.cs | 1 - .../Org.OpenAPITools.Test.csproj | 24 ++++++------ .../src/Org.OpenAPITools.Test/packages.config | 6 +-- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 16 ++++---- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 4 +- .../src/Org.OpenAPITools/packages.config | 4 +- .../csharp/OpenAPIClientNet35/build.bat | 4 +- .../csharp/OpenAPIClientNet35/build.sh | 4 +- .../OpenAPIClientNet35/mono_nunit_test.sh | 6 +-- .../Org.OpenAPITools.Test.csproj | 24 ++++++------ .../src/Org.OpenAPITools.Test/packages.config | 6 +-- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 16 ++++---- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 4 +- .../src/Org.OpenAPITools/packages.config | 4 +- .../csharp/OpenAPIClientNet40/build.bat | 4 +- .../csharp/OpenAPIClientNet40/build.sh | 4 +- .../OpenAPIClientNet40/mono_nunit_test.sh | 6 +-- .../Org.OpenAPITools.Test.csproj | 24 ++++++------ .../src/Org.OpenAPITools.Test/packages.config | 6 +-- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 16 ++++---- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 4 +- .../src/Org.OpenAPITools/packages.config | 4 +- .../src/Org.OpenAPITools/project.json | 6 +-- .../build.bat | 4 +- .../OpenAPIClientWithPropertyChanged/build.sh | 4 +- .../mono_nunit_test.sh | 6 +-- .../Org.OpenAPITools.Test.csproj | 24 ++++++------ .../src/Org.OpenAPITools.Test/packages.config | 6 +-- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 16 ++++---- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 4 +- .../src/Org.OpenAPITools/packages.config | 4 +- 98 files changed, 219 insertions(+), 271 deletions(-) diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e510bba3f59..c7a19d07a9f 100644 --- a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -65,10 +65,10 @@ OpenAPI spec version: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/appveyor.yml b/appveyor.yml index 4b387578e8f..3c2d0d7e7bc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,9 +58,9 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client - - nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + - nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor # test c# API client (with PropertyChanged) - - nunit-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + - nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor # generate all petstore clients - .\bin\windows\run-all-petstore.cmd diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh index 4185295fa1a..cbfeb6fab0d 100755 --- a/bin/csharp-petstore.sh +++ b/bin/csharp-petstore.sh @@ -32,6 +32,6 @@ ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with- java $JAVA_OPTS -jar $executable $ags # restore csproj file -echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj" +echo "restore csproject file: CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj" cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/ diff --git a/modules/openapi-generator/src/main/resources/csharp/Project.mustache b/modules/openapi-generator/src/main/resources/csharp/Project.mustache index e028c7b63cb..c5b763016f9 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Project.mustache @@ -69,16 +69,16 @@ - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + {{binRelativePath}}\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache index 598f90210a9..0b1f35a53db 100644 --- a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache @@ -59,16 +59,16 @@ - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll + {{binRelativePath}}\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll @@ -77,10 +77,10 @@ {{binRelativePath}}\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - {{binRelativePath}}\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + {{binRelativePath}}\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/api_test.mustache b/modules/openapi-generator/src/main/resources/csharp/api_test.mustache index 4b58b5b49f7..34aab0e2567 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_test.mustache @@ -22,7 +22,6 @@ namespace {{packageName}}.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class {{classname}}Tests { private {{classname}} instance; @@ -51,8 +50,8 @@ namespace {{packageName}}.Test [Test] public void {{operationId}}InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' {{classname}} - //Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}"); + // TODO uncomment below to test 'IsInstanceOf' {{classname}} + //Assert.IsInstanceOf(typeof({{classname}}), instance); } {{#operations}}{{#operation}} @@ -67,7 +66,7 @@ namespace {{packageName}}.Test //{{{dataType}}} {{paramName}} = null; {{/allParams}} //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - {{#returnType}}//Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}} + {{#returnType}}//Assert.IsInstanceOf(typeof({{{returnType}}}), response, "response is {{{returnType}}}");{{/returnType}} } {{/operation}}{{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache b/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache index ce3fbe0b8ac..3271da17f82 100644 --- a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache @@ -44,9 +44,9 @@ ${nuget_cmd} install src/{{packageName}}/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.1/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/{{targetFrameworkNuget}}/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.5.2/lib/{{targetFrameworkNuget}}/JsonSubTypes.dll bin/JsonSubTypes.dll {{#generatePropertyChanged}} cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/compile.mustache b/modules/openapi-generator/src/main/resources/csharp/compile.mustache index a0c9c0aaa4c..13f4569714b 100644 --- a/modules/openapi-generator/src/main/resources/csharp/compile.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/compile.mustache @@ -15,8 +15,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.10.0.3\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.1\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.5.2\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll bin\RestSharp.dll {{#generatePropertyChanged}} copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/model_test.mustache b/modules/openapi-generator/src/main/resources/csharp/model_test.mustache index 8bdab50696c..142737a6bb5 100644 --- a/modules/openapi-generator/src/main/resources/csharp/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/model_test.mustache @@ -23,7 +23,6 @@ namespace {{packageName}}.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class {{classname}}Tests { // TODO uncomment below to declare an instance variable for {{classname}} @@ -54,8 +53,8 @@ namespace {{packageName}}.Test [Test] public void {{classname}}InstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" {{classname}} - //Assert.IsInstanceOfType<{{classname}}> (instance, "variable 'instance' is a {{classname}}"); + // TODO uncomment below to test "IsInstanceOf" {{classname}} + //Assert.IsInstanceOf(typeof({{classname}}), instance); } {{#discriminator}} @@ -67,7 +66,7 @@ namespace {{packageName}}.Test public void {{classname}}DeserializeFrom{{parent}}Test() { // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} - //Assert.IsInstanceOf<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); + //Assert.IsInstanceOf(typeof({{parent}}), JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); } {{/children}} {{/discriminator}} diff --git a/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache b/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache index f3e03dc803e..da9c06702cb 100644 --- a/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache @@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe mozroots --import --sync mono nuget.exe install src/{{{packageName}}}.Test/packages.config -o packages -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages +echo "[INFO] Install NUnit Console 3.x runners via NuGet" +mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages echo "[INFO] Build the solution and run the unit test" xbuild {{{packageName}}}.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll + mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache index e061877340d..003928a31a3 100644 --- a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache @@ -30,8 +30,8 @@ - - + + {{#generatePropertyChanged}} diff --git a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache index 57234ce284b..c8d4841e60f 100644 --- a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache @@ -1,8 +1,8 @@ - - + + {{#generatePropertyChanged}} diff --git a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache index 5e08ad3b671..8ebdecf06b2 100644 --- a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache @@ -1,7 +1,7 @@ - + - - + + diff --git a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache b/modules/openapi-generator/src/main/resources/csharp/project.json.mustache index 194fdda4495..29ad6d85693 100644 --- a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/project.json.mustache @@ -3,10 +3,10 @@ "dependencies": { "FubarCoder.RestSharp.Portable.Core": "4.0.7", "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", - "Newtonsoft.Json": "10.0.3", - "JsonSubTypes": "1.2.0" + "Newtonsoft.Json": "12.0.1", + "JsonSubTypes": "1.5.2" }, "frameworks": { "{{targetFrameworkNuget}}": {} } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.bat b/samples/client/petstore/csharp/OpenAPIClient/build.bat index 88942a71d0f..75153d5f899 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClient/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.sh b/samples/client/petstore/csharp/OpenAPIClient/build.sh index 269c087258e..7edc32f6886 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClient/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh index 039eba8ed42..ef4209de27b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh +++ b/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh @@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe mozroots --import --sync mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages +echo "[INFO] Install NUnit Console 3.x runners via NuGet" +mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages echo "[INFO] Build the solution and run the unit test" xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll + mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs index 3564cba1bbc..f52b503cea2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class AnotherFakeApiTests { private AnotherFakeApi instance; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index c7274563e0e..8245961e05f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class FakeApiTests { private FakeApi instance; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs index 941cf048285..01c0d864db4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class FakeClassnameTags123ApiTests { private FakeClassnameTags123Api instance; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 6bc3db2a81f..5a2aa03f4b7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -20,7 +20,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class PetApiTests { private PetApi instance; @@ -97,7 +96,7 @@ namespace Org.OpenAPITools.Test [Test] public void InstanceTest() { - Assert.IsInstanceOf(instance); + Assert.IsInstanceOf(typeof(PetApi), instance); } @@ -133,7 +132,7 @@ namespace Org.OpenAPITools.Test List listPet = petApi.FindPetsByTags(tagsList); foreach (Pet pet in listPet) // Loop through List with foreach. { - Assert.IsInstanceOf(pet); + Assert.IsInstanceOf(typeof(Pet), pet); Assert.AreEqual("csharp sample tag name1", pet.Tags[0]); } } @@ -146,7 +145,7 @@ namespace Org.OpenAPITools.Test { List tags = new List(new String[] { "pet" }); var response = instance.FindPetsByTags(tags); - Assert.IsInstanceOf>(response); + Assert.IsInstanceOf(typeof(List), response); } /// @@ -162,19 +161,19 @@ namespace Org.OpenAPITools.Test PetApi petApi = new PetApi(c1); Pet response = petApi.GetPetById(petId); - Assert.IsInstanceOf(response); + Assert.IsInstanceOf(typeof(Pet), response); Assert.AreEqual("Csharp test", response.Name); Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf>(response.Tags); + Assert.IsInstanceOf(typeof(List), response.Tags); Assert.AreEqual(petId, response.Tags[0].Id); Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - Assert.IsInstanceOf>(response.PhotoUrls); + Assert.IsInstanceOf(typeof(List), response.PhotoUrls); Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - Assert.IsInstanceOf(response.Category); + Assert.IsInstanceOf(typeof(Category), response.Category); Assert.AreEqual(56, response.Category.Id); Assert.AreEqual("sample category name2", response.Category.Name); } @@ -188,19 +187,19 @@ namespace Org.OpenAPITools.Test PetApi petApi = new PetApi(); var task = petApi.GetPetByIdAsync(petId); Pet response = task.Result; - Assert.IsInstanceOf(response); + Assert.IsInstanceOf(typeof(Pet), response); Assert.AreEqual("Csharp test", response.Name); Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf>(response.Tags); + Assert.IsInstanceOf(typeof(List), response.Tags); Assert.AreEqual(petId, response.Tags[0].Id); Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - Assert.IsInstanceOf>(response.PhotoUrls); + Assert.IsInstanceOf(typeof(List), response.PhotoUrls); Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - Assert.IsInstanceOf(response.Category); + Assert.IsInstanceOf(typeof(Category), response.Category); Assert.AreEqual(56, response.Category.Id); Assert.AreEqual("sample category name2", response.Category.Name); } @@ -219,19 +218,19 @@ namespace Org.OpenAPITools.Test Assert.AreEqual(task.Result.Headers["Content-Type"], "application/json"); Pet response = task.Result.Data; - Assert.IsInstanceOf(response); + Assert.IsInstanceOf(typeof(Pet), response); Assert.AreEqual("Csharp test", response.Name); Assert.AreEqual(Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf>(response.Tags); + Assert.IsInstanceOf(typeof(List), response.Tags); Assert.AreEqual(petId, response.Tags[0].Id); Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name); - Assert.IsInstanceOf>(response.PhotoUrls); + Assert.IsInstanceOf(typeof(List), response.PhotoUrls); Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]); - Assert.IsInstanceOf(response.Category); + Assert.IsInstanceOf(typeof(Category), response.Category); Assert.AreEqual(56, response.Category.Id); Assert.AreEqual("sample category name2", response.Category.Name); } @@ -257,9 +256,9 @@ namespace Org.OpenAPITools.Test petApi.UpdatePetWithForm(petId, "new form name", "pending"); Pet response = petApi.GetPetById(petId); - Assert.IsInstanceOf(response); - Assert.IsInstanceOf(response.Category); - Assert.IsInstanceOf>(response.Tags); + Assert.IsInstanceOf(typeof(Pet), response); + Assert.IsInstanceOf(typeof(Category), response.Category); + Assert.IsInstanceOf(typeof(List), response.Tags); Assert.AreEqual("new form name", response.Name); Assert.AreEqual(Pet.StatusEnum.Pending, response.Status); diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs index 89768ca854e..41d065c8be9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class StoreApiTests { private StoreApi instance; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index ce7ccbc5e95..befdfe04de3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the API endpoint. /// - [TestFixture] public class UserApiTests { private UserApi instance; diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs index 633330e3bcf..d9637bd92e4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Test } // The test below only passes when running at -04:00 timezone - [Ignore()] + [Ignore("The test below only passes when running at -04:00 timezone")] public void TestParameterToStringWithTimeZoneForDateTime() { ApiClient api = new ApiClient(); @@ -136,4 +136,4 @@ namespace Org.OpenAPITools.Test } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs index 38461dbaf93..799a923c571 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesAnyTypeTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs index 88957b1672d..7543ec159c3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesArrayTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesArray diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs index 3170d95ee4b..3180b1237a8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesBooleanTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs index 9d6a6426c9b..9ed6376a5b3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesClassTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs index 6ee92130162..7bdcee4b637 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesIntegerTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs index 25c4e87498c..61d2c0389f4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesNumberTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs index ce6e19f5fcf..502718f42cb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesObjectTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesObject diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs index 6c6cbad5e49..2e5414c3730 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AdditionalPropertiesStringTests { // TODO uncomment below to declare an instance variable for AdditionalPropertiesString diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs index 2849d780c8d..108e4e1557d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class AnimalTests { // TODO uncomment below to declare an instance variable for Animal diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs index 70c07575145..2640f864df6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ApiResponseTests { // TODO uncomment below to declare an instance variable for ApiResponse diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index 5eb86a38573..ba3ff03b3c5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ArrayOfArrayOfNumberOnlyTests { // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs index cd7074afaa1..55f896463a0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ArrayOfNumberOnlyTests { // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs index f1f286ce448..80fd020890f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ArrayTestTests { // TODO uncomment below to declare an instance variable for ArrayTest diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs index cb003b2abee..6e2b957083a 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class CapitalizationTests { // TODO uncomment below to declare an instance variable for Capitalization diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs index 6cd18d546ed..02b9f47b82b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class CatTests { // TODO uncomment below to declare an instance variable for Cat diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index f964723517e..6b5ddc1906b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class CategoryTests { // TODO uncomment below to declare an instance variable for Category diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index 0a6de083da5..f64883e9ff3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ClassModelTests { // TODO uncomment below to declare an instance variable for ClassModel diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs index fbae571470b..083be397f77 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class DogTests { // TODO uncomment below to declare an instance variable for Dog diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs index 1760e0d4ef3..8ae6a179e77 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class EnumArraysTests { // TODO uncomment below to declare an instance variable for EnumArrays diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs index f1c67fe1914..10ae874e846 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class EnumClassTests { // TODO uncomment below to declare an instance variable for EnumClass diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index 6ba0c31db41..bd96d5636d1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class EnumTestTests { // TODO uncomment below to declare an instance variable for EnumTest diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs index bb47c43dc7a..e1ad9a0c243 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class FileSchemaTestClassTests { // TODO uncomment below to declare an instance variable for FileSchemaTestClass diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs index f1cf54c22e4..acaf56152c6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class FileTests { // TODO uncomment below to declare an instance variable for File diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index cca85ec5b2a..2c7ce557ca1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class FormatTestTests { // TODO uncomment below to declare an instance variable for FormatTest diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs index 1fef4b1371e..4669408d886 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class HasOnlyReadOnlyTests { // TODO uncomment below to declare an instance variable for HasOnlyReadOnly diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs index 983fd757c32..8fd5456835c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ListTests { // TODO uncomment below to declare an instance variable for List diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs index 9bb76bde239..508dc3c1381 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class MapTestTests { // TODO uncomment below to declare an instance variable for MapTest diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index 72e5a9130b9..9d963599991 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class MixedPropertiesAndAdditionalPropertiesClassTests { // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index f85a9a6a581..701423909c0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class Model200ResponseTests { // TODO uncomment below to declare an instance variable for Model200Response diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs index db4530153a8..4da1fdf73e5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ModelClientTests { // TODO uncomment below to declare an instance variable for ModelClient diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs index 5575f11af51..d7f80082aee 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class NameTests { // TODO uncomment below to declare an instance variable for Name diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs index d9b5c4ea499..48428b86b35 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class NumberOnlyTests { // TODO uncomment below to declare an instance variable for NumberOnly diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs index 36853bd0d17..add9d154fb3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class OrderTests { // TODO uncomment below to declare an instance variable for Order diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs index 7069f4e9554..bcfdd4516cb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class OuterCompositeTests { // TODO uncomment below to declare an instance variable for OuterComposite diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs index f482ff479ec..bd71a2ed183 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class OuterEnumTests { // TODO uncomment below to declare an instance variable for OuterEnum diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs index 3261b8b18e7..7507d9f74e3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class PetTests { private Pet instance; @@ -61,7 +60,7 @@ namespace Org.OpenAPITools.Test [Test] public void PetInstanceTest() { - Assert.IsInstanceOfType(typeof(Pet), instance); + Assert.IsInstanceOf(typeof(Pet), instance); } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs index cf1a8f54bb8..c2823e5ca49 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ReadOnlyFirstTests { // TODO uncomment below to declare an instance variable for ReadOnlyFirst diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 1ac79a9f910..176d55e5fe4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class ReturnTests { // TODO uncomment below to declare an instance variable for Return diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 0a4dcb6a7bc..0902a6d961c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class SpecialModelNameTests { // TODO uncomment below to declare an instance variable for SpecialModelName diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs index 52ee4ca988f..b4927515fe1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class TagTests { // TODO uncomment below to declare an instance variable for Tag diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs index f4c78879bf0..476af27f1f3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class TypeHolderDefaultTests { // TODO uncomment below to declare an instance variable for TypeHolderDefault diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs index a4760f2c4c9..cf220d7d6ff 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class TypeHolderExampleTests { // TODO uncomment below to declare an instance variable for TypeHolderExample diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs index 8e073d2aa0e..506ddc1ddc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class UserTests { // TODO uncomment below to declare an instance variable for User diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs index b936ec597e0..d1646dc97d0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs @@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - [TestFixture] public class XmlItemTests { // TODO uncomment below to declare an instance variable for XmlItem diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e510bba3f59..c7a19d07a9f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -65,10 +65,10 @@ OpenAPI spec version: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config index ac390c1dcb3..e70b078702d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - + - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj index bd27e1ca756..9356e9991f6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c49c57e4403..c275a14d2af 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config index 3caf34e0d76..a970e5e3a96 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config @@ -1,6 +1,6 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat index 563159f27b9..3910f59e988 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh index 57640ebc2d7..d0a31cd3c55 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.1/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.5.2/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh index 039eba8ed42..ef4209de27b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh @@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe mozroots --import --sync mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages +echo "[INFO] Install NUnit Console 3.x runners via NuGet" +mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages echo "[INFO] Build the solution and run the unit test" xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll + mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 9e22db187c4..155563e5570 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll @@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config index 403ae200190..9e1acaaaa37 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - + - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj index dcba0060768..89be9eb56e2 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c49c57e4403..c275a14d2af 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config index 149e1472a7a..bd2e3e6607f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config @@ -1,6 +1,6 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat index 26264134050..0bf67cfa4a7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net4\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh index 31f579a7f29..791a3a16b60 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.1/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net4/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.5.2/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh index 039eba8ed42..ef4209de27b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh @@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe mozroots --import --sync mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages +echo "[INFO] Install NUnit Console 3.x runners via NuGet" +mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages echo "[INFO] Build the solution and run the unit test" xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll + mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index f977b43d8a5..e40d730a807 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll @@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config index 0768a494dc4..86d33422d46 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - + - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0087e256c5b..f034307d971 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c49c57e4403..c275a14d2af 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config index 9c99469f255..5561d895e9e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config @@ -1,6 +1,6 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json index d5d3017c216..b06adc0ade6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json @@ -3,10 +3,10 @@ "dependencies": { "FubarCoder.RestSharp.Portable.Core": "4.0.7", "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", - "Newtonsoft.Json": "10.0.3", - "JsonSubTypes": "1.2.0" + "Newtonsoft.Json": "12.0.1", + "JsonSubTypes": "1.5.2" }, "frameworks": { "netstandard1.3": {} } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat index 4a96110196e..6cfcc5b213e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat @@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin -copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll +copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh index 9297d1388d5..7a5668e35c5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh @@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll +cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll cp packages/PropertyChanged.Fody.1.51.3/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh index 039eba8ed42..ef4209de27b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh @@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe mozroots --import --sync mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages +echo "[INFO] Install NUnit Console 3.x runners via NuGet" +mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages echo "[INFO] Build the solution and run the unit test" xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll + mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 13b29c8ed5e..e923e5727b3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0 ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config index ac390c1dcb3..e70b078702d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config @@ -1,7 +1,7 @@ - + - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 21d6a6d9c17..4a270f3b904 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0 - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll + $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 0be2d6a6ee1..0b279146237 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -25,8 +25,8 @@ - - + + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config index b45bbc1cf36..f7e188fb0db 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config @@ -1,8 +1,8 @@ - - + + From 8c9a1512ae824d35866375eb69ddd085309d0251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Mon, 3 Jun 2019 16:43:19 +0200 Subject: [PATCH 12/73] [maven-plugin] fix strictSpec parameter (#3071) --- .../main/java/org/openapitools/codegen/plugin/CodeGenMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 7ac66dc4da4..91d76333b10 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -244,7 +244,7 @@ public class CodeGenMojo extends AbstractMojo { /** * To treat a document strictly against the spec. */ - @Parameter(name = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) + @Parameter(name = "strictSpecBehavior", alias = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) private Boolean strictSpecBehavior; /** From 89d0c017646489d5b662bf0549de1f35376ab962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Tue, 4 Jun 2019 12:54:25 +0200 Subject: [PATCH 13/73] Use 4.0.2-SNAPSHOT version in gradle samples (#3085) --- appveyor.yml | 2 +- .../samples/local-spec/gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3c2d0d7e7bc..afafbd2e704 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,7 +50,7 @@ build_script: # install openapi-generator locally - mvn clean install --quiet # run the locally installed openapi-generator-gradle-plugin - - gradle -PopenApiGeneratorVersion=4.0.2-SNAPSHOT -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info + - gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info test_script: # restore test-related files - copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 11f18bc06ed..045cf002579 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1 @@ -openApiGeneratorVersion=4.0.1 +openApiGeneratorVersion=4.0.2-SNAPSHOT From c6207c0a49b393dbabeda86b722e979c09f84707 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 4 Jun 2019 21:38:28 +0800 Subject: [PATCH 14/73] Mark nodejs-server as deprecated (#3083) * mark nodejs-server as deprecated * update opeanpi3 script * add new file --- bin/nodejs-petstore-google-cloud-functions.sh | 2 +- bin/nodejs-petstore-server.sh | 2 +- .../nodejs-petstore-google-cloud-functions.sh | 2 +- bin/openapi3/nodejs-petstore-server.sh | 2 +- docs/generators.md | 2 +- docs/generators/nodejs-server-deprecated.md | 16 + .../languages/NodeJSServerCodegen.java | 13 +- .../.openapi-generator/VERSION | 2 +- .../api/openapi.yaml | 840 ++++++++++-------- .../controllers/Pet.js | 7 +- .../service/PetService.js | 7 +- .../nodejs/.openapi-generator/VERSION | 2 +- .../server/petstore/nodejs/api/openapi.yaml | 208 +++-- .../server/petstore/nodejs/controllers/Pet.js | 7 +- .../petstore/nodejs/service/PetService.js | 7 +- 15 files changed, 641 insertions(+), 478 deletions(-) create mode 100644 docs/generators/nodejs-server-deprecated.md diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/nodejs-petstore-google-cloud-functions.sh index 80e12027058..bfb02d960dc 100755 --- a/bin/nodejs-petstore-google-cloud-functions.sh +++ b/bin/nodejs-petstore-google-cloud-functions.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nodejs-petstore-server.sh b/bin/nodejs-petstore-server.sh index 2dfc8f327c7..fbbed3e46f1 100755 --- a/bin/nodejs-petstore-server.sh +++ b/bin/nodejs-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh index a11e8da6c5d..00ab32fb9ab 100755 --- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh +++ b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/openapi3/nodejs-petstore-server.sh index df83e4ebfa6..a987aced357 100755 --- a/bin/openapi3/nodejs-petstore-server.sh +++ b/bin/openapi3/nodejs-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" java $JAVA_OPTS -jar $executable $ags diff --git a/docs/generators.md b/docs/generators.md index 3ca62059b7b..5f890cab5bc 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -91,7 +91,7 @@ The following generators are available: - [jaxrs-spec](generators/jaxrs-spec.md) - [kotlin-server](generators/kotlin-server.md) - [kotlin-spring](generators/kotlin-spring.md) - - [nodejs-server](generators/nodejs-server.md) + - [nodejs-server-deprecated](generators/nodejs-server-deprecated.md) (deprecated) - [php-laravel](generators/php-laravel.md) - [php-lumen](generators/php-lumen.md) - [php-silex](generators/php-silex.md) diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md new file mode 100644 index 00000000000..c8741e58f4c --- /dev/null +++ b/docs/generators/nodejs-server-deprecated.md @@ -0,0 +1,16 @@ + +--- +id: generator-opts-server-nodejs-server-deprecated +title: Config Options for nodejs-server-deprecated +sidebar_label: nodejs-server-deprecated +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| +|serverPort|TCP port to listen on.| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java index 896f0837e57..eccb5a0cb3a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java @@ -28,6 +28,8 @@ import io.swagger.v3.oas.models.Paths; import io.swagger.v3.oas.models.info.Info; import org.openapitools.codegen.*; import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +60,11 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig public NodeJSServerCodegen() { super(); + // mark the generator as deprecated in the documentation + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + // set the output folder here outputFolder = "generated-code/nodejs"; @@ -142,7 +149,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig */ @Override public String getName() { - return "nodejs-server"; + return "nodejs-server-deprecated"; } /** @@ -153,7 +160,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig */ @Override public String getHelp() { - return "Generates a nodejs server library using the swagger-tools project. By default, " + + return "[DEPRECATED] Generates a nodejs server library using the swagger-tools project. By default, " + "it will also generate service classes--which you can disable with the `-Dnoservice` environment variable."; } @@ -303,6 +310,8 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig message.append(System.lineSeparator()).append(System.lineSeparator()) .append("=======================================================================================") .append(System.lineSeparator()) + .append("IMPORTANT: The nodejs-server generator has been deprecated.") + .append(System.lineSeparator()) .append("Currently, Node.js server doesn't work as its dependency doesn't support OpenAPI Spec3.") .append(System.lineSeparator()) .append("For further details, see https://github.com/OpenAPITools/openapi-generator/issues/34") diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION index 096bf47efe3..d96260ba335 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml index 8a31b8d5b86..f2908efadee 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml +++ b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml @@ -1,178 +1,198 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: - title: OpenAPI Petstore - description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + description: This is a sample server Petstore server. For this sample, you can use + the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet - requestBody: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} - 405: - description: Validation exception - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet post: - tags: - - pet - summary: Add a new pet to the store operationId: addPet requestBody: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true + $ref: '#/components/requestBodies/Pet' responses: 405: description: Invalid input - content: {} security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByStatus: - get: + summary: Add a new pet to the store tags: - pet - summary: Finds Pets by status + x-swagger-router-controller: Pet + put: + operationId: updatePet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 400: + description: Invalid ID supplied + 404: + description: Pet not found + 405: + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-swagger-router-controller: Pet + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status - in: query - description: Status values that need to be considered for filter - required: true + - description: Status values that need to be considered for filter explode: false + in: query + name: status + required: true schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: description: Invalid status value - content: {} security: - petstore_auth: - - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + x-swagger-router-controller: Pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags - in: query - description: Tags to filter by - required: true + - description: Tags to filter by explode: false + in: query + name: tags + required: true schema: - type: array items: type: string + type: array + style: form + - description: Maximum number of items to return + explode: true + in: query + name: maxCount + required: false + schema: + format: int32 + type: integer + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: description: Invalid tag value - content: {} - deprecated: true + security: + - petstore_auth: + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-swagger-router-controller: Pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + 400: + description: Invalid pet value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/{petId}: - get: + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-swagger-router-controller: Pet + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return + explode: false in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer + style: simple responses: 200: - description: successful operation content: application/xml: schema: @@ -180,148 +200,127 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: description: Invalid ID supplied - content: {} 404: description: Pet not found - content: {} security: - api_key: [] - x-openapi-router-controller: Pet - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-swagger-router-controller: Pet + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated + explode: false in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string + type: object responses: 405: description: Invalid input - content: {} security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet + x-swagger-router-controller: Pet /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update + explode: false in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string + type: object responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: uploads an image + tags: + - pet + x-swagger-router-controller: Pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - x-openapi-router-controller: Store - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + x-swagger-router-controller: Store + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -329,30 +328,54 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: description: Invalid Order - content: {} - x-openapi-router-controller: Store - /store/order/{orderId}: - get: + summary: Place an order for a pet tags: - store - summary: Find purchase order by ID - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - operationId: getOrderById + x-swagger-router-controller: Store + /store/order/{orderId}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder parameters: - - name: orderId + - description: ID of the order that needs to be deleted + explode: false in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + type: string + style: simple + responses: + 400: + description: Invalid ID supplied + 404: + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-swagger-router-controller: Store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + explode: false + in: path + name: orderId + required: true + schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 + style: simple responses: 200: - description: successful operation content: application/xml: schema: @@ -360,126 +383,86 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: description: Invalid ID supplied - content: {} 404: description: Order not found - content: {} - x-openapi-router-controller: Store - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} - x-openapi-router-controller: Store + x-swagger-router-controller: Store /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: description: successful operation - content: {} - x-openapi-router-controller: User + security: + - auth_cookie: [] + summary: Create user + tags: + - user + x-swagger-router-controller: User /user/createWithArray: post: - tags: - - user - summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: - description: List of user object - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: description: successful operation - content: {} - x-openapi-router-controller: User + security: + - auth_cookie: [] + summary: Creates list of users with given input array + tags: + - user + x-swagger-router-controller: User /user/createWithList: post: - tags: - - user - summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: - description: List of user object - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: description: successful operation - content: {} - x-openapi-router-controller: User - /user/login: - get: + security: + - auth_cookie: [] + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + x-swagger-router-controller: User + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login + explode: true in: query - description: The user name for login - required: true - schema: - type: string - - name: password - in: query - description: The password for login in clear text + name: username + required: true + schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password required: true schema: type: string + style: form responses: 200: - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - schema: - type: integer - format: int32 - X-Expires-After: - description: date in UTC when toekn expires - schema: - type: string - format: date-time content: application/xml: schema: @@ -487,37 +470,85 @@ paths: application/json: schema: type: string + description: successful operation + headers: + Set-Cookie: + description: Cookie authentication key for use with the `auth_cookie` + apiKey authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple + X-Rate-Limit: + description: calls per hour allowed by the user + explode: false + schema: + format: int32 + type: integer + style: simple + X-Expires-After: + description: date in UTC when toekn expires + explode: false + schema: + format: date-time + type: string + style: simple 400: description: Invalid username/password supplied - content: {} - x-openapi-router-controller: User - /user/logout: - get: + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + x-swagger-router-controller: User + /user/logout: + get: operationId: logoutUser responses: default: description: successful operation - content: {} - x-openapi-router-controller: User - /user/{username}: - get: + security: + - auth_cookie: [] + summary: Logs out current logged in user session tags: - user - summary: Get user by user name - operationId: getUserByName + x-swagger-router-controller: User + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser parameters: - - name: username + - description: The name that needs to be deleted + explode: false in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string + style: simple + responses: + 400: + description: Invalid username supplied + 404: + description: User not found + security: + - auth_cookie: [] + summary: Delete user + tags: + - user + x-swagger-router-controller: User + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple responses: 200: - description: successful operation content: application/xml: schema: @@ -525,90 +556,78 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: description: Invalid username supplied - content: {} 404: description: User not found - content: {} - x-openapi-router-controller: User - put: + summary: Get user by user name tags: - user - summary: Updated user + x-swagger-router-controller: User + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted + explode: false in: path - description: name that need to be deleted + name: username required: true schema: type: string + style: simple requestBody: - description: Updated user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: description: Invalid user supplied - content: {} 404: description: User not found - content: {} - x-openapi-router-controller: User - delete: + security: + - auth_cookie: [] + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} - x-openapi-router-controller: User + x-swagger-router-controller: User components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' schemas: Order: - title: Pet Order - type: object - properties: - id: - type: integer - format: int64 - petId: - type: integer - format: int64 - quantity: - type: integer - format: int32 - shipDate: - type: string - format: date-time - status: - type: string - description: Order Status - enum: - - placed - - approved - - delivered - complete: - type: boolean - default: false description: An order for a pets from the pet store example: petId: 6 @@ -617,30 +636,64 @@ components: shipDate: 2000-01-23T04:56:07.000+00:00 complete: false status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object - properties: - id: - type: integer - format: int64 - name: - type: string description: A category for a pet example: name: name id: 6 + properties: + id: + format: int64 + type: integer + name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -654,72 +707,29 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object - properties: - id: - type: integer - format: int64 - name: - type: string description: A tag for a pet example: name: name id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object - properties: - id: - type: integer - format: int64 - category: - $ref: '#/components/schemas/Category' - name: - type: string - example: doggie - photoUrls: - type: array - xml: - name: photoUrl - wrapped: true - items: - type: string - tags: - type: array - xml: - name: tag - wrapped: true - items: - $ref: '#/components/schemas/Tag' - status: - type: string - description: pet status in the store - enum: - - available - - pending - - sold description: A pet for sale in the pet store example: photoUrls: @@ -736,34 +746,92 @@ components: - name: name id: 1 status: available + properties: + id: + format: int64 + type: integer + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + title: An uploaded response + type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey + auth_cookie: + in: cookie + name: AUTH_KEY + type: apiKey diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js index 53d029ce27c..14a5573b642 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js +++ b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js @@ -16,8 +16,8 @@ module.exports.addPet = function addPet (req, res, next) { module.exports.deletePet = function deletePet (req, res, next) { var petId = req.swagger.params['petId'].value; - var api_key = req.swagger.params['api_key'].value; - Pet.deletePet(petId,api_key) + var apiUnderscorekey = req.swagger.params['api_key'].value; + Pet.deletePet(petId,apiUnderscorekey) .then(function (response) { utils.writeJson(res, response); }) @@ -39,7 +39,8 @@ module.exports.findPetsByStatus = function findPetsByStatus (req, res, next) { module.exports.findPetsByTags = function findPetsByTags (req, res, next) { var tags = req.swagger.params['tags'].value; - Pet.findPetsByTags(tags) + var maxCount = req.swagger.params['maxCount'].value; + Pet.findPetsByTags(tags,maxCount) .then(function (response) { utils.writeJson(res, response); }) diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js index e4a0219ab80..441e248b271 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js +++ b/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js @@ -18,10 +18,10 @@ exports.addPet = function(pet) { * Deletes a pet * * petId Long Pet id to delete - * api_key String (optional) + * apiUnderscorekey String (optional) * no response value expected for this operation **/ -exports.deletePet = function(petId,api_key) { +exports.deletePet = function(petId,apiUnderscorekey) { return new Promise(function(resolve, reject) { resolve(); }); @@ -69,9 +69,10 @@ exports.findPetsByStatus = function(status) { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * * tags List Tags to filter by + * maxCount Integer Maximum number of items to return (optional) * returns List **/ -exports.findPetsByTags = function(tags) { +exports.findPetsByTags = function(tags,maxCount) { return new Promise(function(resolve, reject) { var examples = {}; examples['application/json'] = { diff --git a/samples/server/petstore/nodejs/.openapi-generator/VERSION b/samples/server/petstore/nodejs/.openapi-generator/VERSION index 0628777500b..d96260ba335 100644 --- a/samples/server/petstore/nodejs/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs/api/openapi.yaml b/samples/server/petstore/nodejs/api/openapi.yaml index 877989080ca..f2908efadee 100644 --- a/samples/server/petstore/nodejs/api/openapi.yaml +++ b/samples/server/petstore/nodejs/api/openapi.yaml @@ -1,11 +1,15 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: - description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + description: This is a sample server Petstore server. For this sample, you can use + the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -20,18 +24,9 @@ paths: post: operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: 405: - content: {} description: Invalid input security: - petstore_auth: @@ -44,24 +39,13 @@ paths: put: operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found 405: - content: {} description: Validation exception security: - petstore_auth: @@ -106,11 +90,9 @@ paths: type: array description: successful operation 400: - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -119,7 +101,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -132,6 +115,15 @@ paths: type: string type: array style: form + - description: Maximum number of items to return + explode: true + in: query + name: maxCount + required: false + schema: + format: int32 + type: integer + style: form responses: 200: content: @@ -147,11 +139,9 @@ paths: type: array description: successful operation 400: - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -161,20 +151,24 @@ paths: delete: operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: 400: - content: {} description: Invalid pet value security: - petstore_auth: @@ -189,12 +183,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: 200: content: @@ -206,10 +202,8 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found security: - api_key: [] @@ -221,13 +215,16 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -238,9 +235,9 @@ paths: status: description: Updated status of the pet type: string + type: object responses: 405: - content: {} description: Invalid input security: - petstore_auth: @@ -255,13 +252,16 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -273,6 +273,7 @@ paths: description: file to upload format: binary type: string + type: object responses: 200: content: @@ -313,7 +314,7 @@ paths: operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -329,7 +330,6 @@ paths: $ref: '#/components/schemas/Order' description: successful operation 400: - content: {} description: Invalid Order summary: Place an order for a pet tags: @@ -337,31 +337,34 @@ paths: x-swagger-router-controller: Store /store/order/{orderId}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: orderId required: true schema: type: string + style: simple responses: 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Order not found summary: Delete purchase order by ID tags: - store x-swagger-router-controller: Store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: orderId required: true @@ -370,6 +373,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: 200: content: @@ -381,10 +385,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -396,15 +398,16 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Create user tags: - user @@ -413,18 +416,12 @@ paths: post: operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Creates list of users with given input array tags: - user @@ -433,18 +430,12 @@ paths: post: operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Creates list of users with given input array tags: - user @@ -454,17 +445,22 @@ paths: operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: 200: content: @@ -476,18 +472,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `auth_cookie` + apiKey authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when toekn expires + explode: false schema: format: date-time type: string + style: simple 400: - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -498,8 +505,9 @@ paths: operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Logs out current logged in user session tags: - user @@ -510,18 +518,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found + security: + - auth_cookie: [] summary: Delete user tags: - user @@ -530,11 +540,13 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: 200: content: @@ -546,10 +558,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found summary: Get user by user name tags: @@ -560,30 +570,62 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied 404: - content: {} description: User not found + security: + - auth_cookie: [] summary: Updated user tags: - user x-swagger-router-controller: User components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -631,6 +673,7 @@ components: format: int64 type: integer name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string title: Pet category type: object @@ -756,6 +799,25 @@ components: type: string title: An uploaded response type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object securitySchemes: petstore_auth: flows: @@ -769,3 +831,7 @@ components: in: header name: api_key type: apiKey + auth_cookie: + in: cookie + name: AUTH_KEY + type: apiKey diff --git a/samples/server/petstore/nodejs/controllers/Pet.js b/samples/server/petstore/nodejs/controllers/Pet.js index 53d029ce27c..14a5573b642 100644 --- a/samples/server/petstore/nodejs/controllers/Pet.js +++ b/samples/server/petstore/nodejs/controllers/Pet.js @@ -16,8 +16,8 @@ module.exports.addPet = function addPet (req, res, next) { module.exports.deletePet = function deletePet (req, res, next) { var petId = req.swagger.params['petId'].value; - var api_key = req.swagger.params['api_key'].value; - Pet.deletePet(petId,api_key) + var apiUnderscorekey = req.swagger.params['api_key'].value; + Pet.deletePet(petId,apiUnderscorekey) .then(function (response) { utils.writeJson(res, response); }) @@ -39,7 +39,8 @@ module.exports.findPetsByStatus = function findPetsByStatus (req, res, next) { module.exports.findPetsByTags = function findPetsByTags (req, res, next) { var tags = req.swagger.params['tags'].value; - Pet.findPetsByTags(tags) + var maxCount = req.swagger.params['maxCount'].value; + Pet.findPetsByTags(tags,maxCount) .then(function (response) { utils.writeJson(res, response); }) diff --git a/samples/server/petstore/nodejs/service/PetService.js b/samples/server/petstore/nodejs/service/PetService.js index e4a0219ab80..441e248b271 100644 --- a/samples/server/petstore/nodejs/service/PetService.js +++ b/samples/server/petstore/nodejs/service/PetService.js @@ -18,10 +18,10 @@ exports.addPet = function(pet) { * Deletes a pet * * petId Long Pet id to delete - * api_key String (optional) + * apiUnderscorekey String (optional) * no response value expected for this operation **/ -exports.deletePet = function(petId,api_key) { +exports.deletePet = function(petId,apiUnderscorekey) { return new Promise(function(resolve, reject) { resolve(); }); @@ -69,9 +69,10 @@ exports.findPetsByStatus = function(status) { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * * tags List Tags to filter by + * maxCount Integer Maximum number of items to return (optional) * returns List **/ -exports.findPetsByTags = function(tags) { +exports.findPetsByTags = function(tags,maxCount) { return new Promise(function(resolve, reject) { var examples = {}; examples['application/json'] = { From 57560d365fe16d1ed58abac31098501873731e8d Mon Sep 17 00:00:00 2001 From: Vincent Devos <46601673+karismann@users.noreply.github.com> Date: Tue, 4 Jun 2019 15:57:43 +0200 Subject: [PATCH 15/73] [KOTLIN Spring] fix generation with modelNamePrefix/Suffix (#3038) * [KOTLIN Spring] fix generation with modelNamePrefix/modelNameSuffix * fix indent * fix indent * fix indent * fix indent * fix indent * fix indent --- .../languages/KotlinSpringServerCodegen.java | 45 ++++--------------- .../kotlin-springboot/build.gradle.kts | 1 + .../petstore/kotlin-springboot/pom.xml | 6 +++ .../kotlin/org/openapitools/api/PetApi.kt | 22 ++++----- .../org/openapitools/api/PetApiService.kt | 12 ++--- .../org/openapitools/api/PetApiServiceImpl.kt | 12 ++--- .../kotlin/org/openapitools/api/StoreApi.kt | 10 ++--- .../org/openapitools/api/StoreApiService.kt | 6 +-- .../openapitools/api/StoreApiServiceImpl.kt | 6 +-- .../kotlin/org/openapitools/api/UserApi.kt | 20 ++++----- .../org/openapitools/api/UserApiService.kt | 12 ++--- .../openapitools/api/UserApiServiceImpl.kt | 12 ++--- .../kotlin/org/openapitools/model/Category.kt | 4 +- .../org/openapitools/model/InlineObject.kt | 4 +- .../org/openapitools/model/InlineObject1.kt | 2 +- .../openapitools/model/ModelApiResponse.kt | 6 +-- .../kotlin/org/openapitools/model/Order.kt | 10 ++--- .../main/kotlin/org/openapitools/model/Pet.kt | 10 ++--- .../main/kotlin/org/openapitools/model/Tag.kt | 4 +- .../kotlin/org/openapitools/model/User.kt | 16 +++---- .../kotlin/org/openapitools/api/PetApi.kt | 20 ++++----- .../org/openapitools/api/PetApiService.kt | 12 ++--- .../org/openapitools/api/PetApiServiceImpl.kt | 12 ++--- .../kotlin/org/openapitools/api/StoreApi.kt | 10 ++--- .../org/openapitools/api/StoreApiService.kt | 6 +-- .../openapitools/api/StoreApiServiceImpl.kt | 6 +-- .../kotlin/org/openapitools/api/UserApi.kt | 20 ++++----- .../org/openapitools/api/UserApiService.kt | 12 ++--- .../openapitools/api/UserApiServiceImpl.kt | 12 ++--- .../kotlin/org/openapitools/model/Category.kt | 4 +- .../openapitools/model/ModelApiResponse.kt | 6 +-- .../kotlin/org/openapitools/model/Order.kt | 10 ++--- .../main/kotlin/org/openapitools/model/Pet.kt | 10 ++--- .../main/kotlin/org/openapitools/model/Tag.kt | 4 +- .../kotlin/org/openapitools/model/User.kt | 16 +++---- .../kotlin/org/openapitools/api/PetApiTest.kt | 20 ++++----- .../org/openapitools/api/StoreApiTest.kt | 6 +-- .../org/openapitools/api/UserApiTest.kt | 16 +++---- 38 files changed, 200 insertions(+), 222 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 8ac3ea459a5..ddc2cbf99c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -95,48 +95,19 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId); // Use lists instead of arrays - typeMapping.put("array", "List"); - typeMapping.put("string", "String"); - typeMapping.put("boolean", "Boolean"); - typeMapping.put("integer", "Int"); - typeMapping.put("float", "Float"); - typeMapping.put("long", "Long"); - typeMapping.put("double", "Double"); - typeMapping.put("ByteArray", "ByteArray"); - typeMapping.put("list", "List"); - typeMapping.put("map", "Map"); - typeMapping.put("object", "Any"); - typeMapping.put("binary", "Array"); + typeMapping.put("array", "kotlin.collections.List"); + typeMapping.put("list", "kotlin.collections.List"); typeMapping.put("date", "java.time.LocalDate"); typeMapping.put("date-time", "java.time.OffsetDateTime"); typeMapping.put("Date", "java.time.LocalDate"); typeMapping.put("DateTime", "java.time.OffsetDateTime"); - importMapping.put("Date", "java.time.LocalDate"); - importMapping.put("DateTime", "java.time.OffsetDateTime"); - // use resource for file handling typeMapping.put("file", "org.springframework.core.io.Resource"); - - languageSpecificPrimitives.addAll(Arrays.asList( - "Any", - "Byte", - "ByteArray", - "Short", - "Int", - "Long", - "Float", - "Double", - "Boolean", - "Char", - "String", - "Array", - "List", - "Map", - "Set" - )); + importMapping.put("Date", "java.time.LocalDate"); + importMapping.put("DateTime", "java.time.OffsetDateTime"); addOption(TITLE, "server title name or client service name", title); addOption(BASE_PACKAGE, "base package (invokerPackage) for generated code", basePackage); @@ -543,16 +514,16 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen private void doDataTypeAssignment(final String returnType, DataTypeAssigner dataTypeAssigner) { if (returnType == null) { dataTypeAssigner.setReturnType("Unit"); - } else if (returnType.startsWith("List")) { + } else if (returnType.startsWith("kotlin.collections.List")) { int end = returnType.lastIndexOf(">"); if (end > 0) { - dataTypeAssigner.setReturnType(returnType.substring("List<".length(), end).trim()); + dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.List<".length(), end).trim()); dataTypeAssigner.setReturnContainer("List"); } - } else if (returnType.startsWith("Map")) { + } else if (returnType.startsWith("kotlin.collections.Map")) { int end = returnType.lastIndexOf(">"); if (end > 0) { - dataTypeAssigner.setReturnType(returnType.substring("Map<".length(), end).split(",")[1].trim()); + dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.Map<".length(), end).split(",")[1].trim()); dataTypeAssigner.setReturnContainer("Map"); } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts b/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts index 0192dfa9162..26f4601e570 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts +++ b/samples/server/openapi3/petstore/kotlin-springboot/build.gradle.kts @@ -41,6 +41,7 @@ dependencies { compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") compile("com.fasterxml.jackson.module:jackson-module-kotlin") + testCompile("org.jetbrains.kotlin:kotlin-test-junit5") testCompile("org.springframework.boot:spring-boot-starter-test") { exclude(module = "junit") } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/pom.xml b/samples/server/openapi3/petstore/kotlin-springboot/pom.xml index 45c650bae0f..10720393bf0 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/pom.xml +++ b/samples/server/openapi3/petstore/kotlin-springboot/pom.xml @@ -107,6 +107,12 @@ javax.validation validation-api + + org.jetbrains.kotlin + kotlin-test-junit5 + 1.3.31 + test + diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index 21d677c730c..7b397708c7a 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -69,8 +69,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @RequestMapping( value = ["/pet/{petId}"], method = [RequestMethod.DELETE]) - fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? + fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) } @@ -88,7 +88,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByStatus"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) } @@ -106,8 +106,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByTags"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List -,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int? + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List +,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: kotlin.Int? ): ResponseEntity> { return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK) } @@ -124,7 +124,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long + fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.OK) } @@ -156,9 +156,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"], method = [RequestMethod.POST]) - fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? -,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? + fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) } @@ -176,8 +176,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"], method = [RequestMethod.POST]) - fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? + fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index 1ef6953cb76..89bae4c1ceb 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -6,17 +6,17 @@ interface PetApiService { fun addPet(pet: Pet): Unit - fun deletePet(petId: Long, apiKey: String?): Unit + fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit - fun findPetsByStatus(status: List): List + fun findPetsByStatus(status: kotlin.collections.List): List - fun findPetsByTags(tags: List, maxCount: Int?): List + fun findPetsByTags(tags: kotlin.collections.List, maxCount: kotlin.Int?): List - fun getPetById(petId: Long): Pet + fun getPetById(petId: kotlin.Long): Pet fun updatePet(pet: Pet): Unit - fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit - fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse + fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 2b9815beddd..26900dc599d 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -10,19 +10,19 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun deletePet(petId: Long, apiKey: String?): Unit { + override fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit { TODO("Implement me") } - override fun findPetsByStatus(status: List): List { + override fun findPetsByStatus(status: kotlin.collections.List): List { TODO("Implement me") } - override fun findPetsByTags(tags: List, maxCount: Int?): List { + override fun findPetsByTags(tags: kotlin.collections.List, maxCount: kotlin.Int?): List { TODO("Implement me") } - override fun getPetById(petId: Long): Pet { + override fun getPetById(petId: kotlin.Long): Pet { TODO("Implement me") } @@ -30,11 +30,11 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + override fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit { TODO("Implement me") } - override fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + override fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse { TODO("Implement me") } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index 3f1615634b1..16104fb0d22 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -51,7 +51,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @RequestMapping( value = ["/store/order/{orderId}"], method = [RequestMethod.DELETE]) - fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String + fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) } @@ -60,16 +60,16 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", - response = Int::class, + response = kotlin.Int::class, responseContainer = "Map", authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) @RequestMapping( value = ["/store/inventory"], produces = ["application/json"], method = [RequestMethod.GET]) - fun getInventory(): ResponseEntity> { + fun getInventory(): ResponseEntity> { return ResponseEntity(service.getInventory(), HttpStatus.OK) } @@ -84,7 +84,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = ["/store/order/{orderId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long + fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt index ce32895d219..5fa51ca922e 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -3,11 +3,11 @@ package org.openapitools.api import org.openapitools.model.Order interface StoreApiService { - fun deleteOrder(orderId: String): Unit + fun deleteOrder(orderId: kotlin.String): Unit - fun getInventory(): Map + fun getInventory(): Map - fun getOrderById(orderId: Long): Order + fun getOrderById(orderId: kotlin.Long): Order fun placeOrder(order: Order): Order } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt index ab4e08e794c..70e1e76b06b 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -5,15 +5,15 @@ import org.springframework.stereotype.Service @Service class StoreApiServiceImpl : StoreApiService { - override fun deleteOrder(orderId: String): Unit { + override fun deleteOrder(orderId: kotlin.String): Unit { TODO("Implement me") } - override fun getInventory(): Map { + override fun getInventory(): Map { TODO("Implement me") } - override fun getOrderById(orderId: Long): Order { + override fun getOrderById(orderId: kotlin.Long): Order { TODO("Implement me") } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index 42f3e260903..bd7583274b5 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -69,7 +69,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/createWithArray"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List + fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK) } @@ -85,7 +85,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/createWithList"], consumes = ["application/json"], method = [RequestMethod.POST]) - fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: List + fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK) } @@ -100,7 +100,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.DELETE]) - fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String + fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.OK) } @@ -116,7 +116,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String + fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.OK) } @@ -125,16 +125,16 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = "Logs user into the system", nickname = "loginUser", notes = "", - response = String::class) + response = kotlin.String::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) @RequestMapping( value = ["/user/login"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String -): ResponseEntity { + fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String +): ResponseEntity { return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) } @@ -163,7 +163,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], consumes = ["application/json"], method = [RequestMethod.PUT]) - fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String + fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { return ResponseEntity(service.updateUser(username, user), HttpStatus.OK) diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt index 538b00df9bb..d64d09e8314 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -5,17 +5,17 @@ interface UserApiService { fun createUser(user: User): Unit - fun createUsersWithArrayInput(user: List): Unit + fun createUsersWithArrayInput(user: kotlin.collections.List): Unit - fun createUsersWithListInput(user: List): Unit + fun createUsersWithListInput(user: kotlin.collections.List): Unit - fun deleteUser(username: String): Unit + fun deleteUser(username: kotlin.String): Unit - fun getUserByName(username: String): User + fun getUserByName(username: kotlin.String): User - fun loginUser(username: String, password: String): String + fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String fun logoutUser(): Unit - fun updateUser(username: String, user: User): Unit + fun updateUser(username: kotlin.String, user: User): Unit } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt index c15ee34dbdb..0c24688975c 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -9,23 +9,23 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun createUsersWithArrayInput(user: List): Unit { + override fun createUsersWithArrayInput(user: kotlin.collections.List): Unit { TODO("Implement me") } - override fun createUsersWithListInput(user: List): Unit { + override fun createUsersWithListInput(user: kotlin.collections.List): Unit { TODO("Implement me") } - override fun deleteUser(username: String): Unit { + override fun deleteUser(username: kotlin.String): Unit { TODO("Implement me") } - override fun getUserByName(username: String): User { + override fun getUserByName(username: kotlin.String): User { TODO("Implement me") } - override fun loginUser(username: String, password: String): String { + override fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String { TODO("Implement me") } @@ -33,7 +33,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun updateUser(username: String, user: User): Unit { + override fun updateUser(username: kotlin.String, user: User): Unit { TODO("Implement me") } } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index e042a7f997c..4be27d19748 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Category ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt index e998bc995ce..ee034530c63 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class InlineObject ( @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: String? = null, + @JsonProperty("name") val name: kotlin.String? = null, @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: String? = null + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt index d29578fd0c0..a289d8c05f7 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -19,7 +19,7 @@ import io.swagger.annotations.ApiModelProperty data class InlineObject1 ( @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: String? = null, + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, @ApiModelProperty(example = "null", value = "file to upload") @JsonProperty("file") val file: org.springframework.core.io.Resource? = null diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 2f844a9c356..0e86b28e937 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -20,13 +20,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: Int? = null, + @JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: String? = null, + @JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: String? = null + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index e20d850491f..08726893f7d 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty data class Order ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: Long? = null, + @JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: Int? = null, + @JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @@ -39,14 +39,14 @@ data class Order ( @JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: Boolean? = null + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** * Order Status * Values: placed,approved,delivered */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("placed") placed("placed"), diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 9e054ac22f7..4a2e9d26cb9 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -27,20 +27,20 @@ data class Pet ( @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: String, + @JsonProperty("name") val name: kotlin.String, @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: List, + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("category") val category: Category? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: List? = null, + @JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") val status: Pet.Status? = null @@ -50,7 +50,7 @@ data class Pet ( * pet status in the store * Values: available,pending,sold */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("available") available("available"), diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index 40ef1b9a86b..df04dcd035d 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 95fe12aa467..619b2e7c2c3 100644 --- a/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/openapi3/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -25,28 +25,28 @@ import io.swagger.annotations.ApiModelProperty data class User ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: String? = null, + @JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: String? = null, + @JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: String? = null, + @JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: String? = null, + @JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: String? = null, + @JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: String? = null, + @JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: Int? = null + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index cf2e8c2d1ae..6beea7c3bed 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -69,8 +69,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @RequestMapping( value = ["/pet/{petId}"], method = [RequestMethod.DELETE]) - fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? + fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400)) } @@ -88,7 +88,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByStatus"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) } @@ -106,7 +106,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByTags"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) } @@ -123,7 +123,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long + fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) } @@ -155,9 +155,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"], method = [RequestMethod.POST]) - fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? -,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? + fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -175,8 +175,8 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"], method = [RequestMethod.POST]) - fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? + fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index 8e5d3cfd6e1..f3f2fd68b6c 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -6,17 +6,17 @@ interface PetApiService { fun addPet(body: Pet): Unit - fun deletePet(petId: Long, apiKey: String?): Unit + fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit - fun findPetsByStatus(status: List): List + fun findPetsByStatus(status: kotlin.collections.List): List - fun findPetsByTags(tags: List): List + fun findPetsByTags(tags: kotlin.collections.List): List - fun getPetById(petId: Long): Pet + fun getPetById(petId: kotlin.Long): Pet fun updatePet(body: Pet): Unit - fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit - fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse + fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 5ecf2c91f33..452e4e400b7 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -10,19 +10,19 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun deletePet(petId: Long, apiKey: String?): Unit { + override fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit { TODO("Implement me") } - override fun findPetsByStatus(status: List): List { + override fun findPetsByStatus(status: kotlin.collections.List): List { TODO("Implement me") } - override fun findPetsByTags(tags: List): List { + override fun findPetsByTags(tags: kotlin.collections.List): List { TODO("Implement me") } - override fun getPetById(petId: Long): Pet { + override fun getPetById(petId: kotlin.Long): Pet { TODO("Implement me") } @@ -30,11 +30,11 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + override fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit { TODO("Implement me") } - override fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + override fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse { TODO("Implement me") } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index db4ee51c21a..a3ba066c21a 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -51,7 +51,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @RequestMapping( value = ["/store/order/{orderId}"], method = [RequestMethod.DELETE]) - fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String + fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) } @@ -60,16 +60,16 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", - response = Int::class, + response = kotlin.Int::class, responseContainer = "Map", authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) @RequestMapping( value = ["/store/inventory"], produces = ["application/json"], method = [RequestMethod.GET]) - fun getInventory(): ResponseEntity> { + fun getInventory(): ResponseEntity> { return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @@ -84,7 +84,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = ["/store/order/{orderId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long + fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 8ddca95e7d5..d4a4ef9507f 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -3,11 +3,11 @@ package org.openapitools.api import org.openapitools.model.Order interface StoreApiService { - fun deleteOrder(orderId: String): Unit + fun deleteOrder(orderId: kotlin.String): Unit - fun getInventory(): Map + fun getInventory(): Map - fun getOrderById(orderId: Long): Order + fun getOrderById(orderId: kotlin.Long): Order fun placeOrder(body: Order): Order } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt index f38e0eca525..7e733e28dc5 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -5,15 +5,15 @@ import org.springframework.stereotype.Service @Service class StoreApiServiceImpl : StoreApiService { - override fun deleteOrder(orderId: String): Unit { + override fun deleteOrder(orderId: kotlin.String): Unit { TODO("Implement me") } - override fun getInventory(): Map { + override fun getInventory(): Map { TODO("Implement me") } - override fun getOrderById(orderId: Long): Order { + override fun getOrderById(orderId: kotlin.Long): Order { TODO("Implement me") } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index 6fbd89971aa..0a77ac8ecd8 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -65,7 +65,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/createWithArray"], method = [RequestMethod.POST]) - fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List + fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.valueOf(200)) } @@ -79,7 +79,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/createWithList"], method = [RequestMethod.POST]) - fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: List + fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.valueOf(200)) } @@ -93,7 +93,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.DELETE]) - fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String + fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) } @@ -109,7 +109,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String + fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) } @@ -118,16 +118,16 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = "Logs user into the system", nickname = "loginUser", notes = "", - response = String::class) + response = kotlin.String::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) @RequestMapping( value = ["/user/login"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String -): ResponseEntity { + fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String +): ResponseEntity { return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200)) } @@ -153,7 +153,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.PUT]) - fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String + fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { return ResponseEntity(service.updateUser(username, body), HttpStatus.valueOf(400)) diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt index f7286538c60..491705c3b50 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -5,17 +5,17 @@ interface UserApiService { fun createUser(body: User): Unit - fun createUsersWithArrayInput(body: List): Unit + fun createUsersWithArrayInput(body: kotlin.collections.List): Unit - fun createUsersWithListInput(body: List): Unit + fun createUsersWithListInput(body: kotlin.collections.List): Unit - fun deleteUser(username: String): Unit + fun deleteUser(username: kotlin.String): Unit - fun getUserByName(username: String): User + fun getUserByName(username: kotlin.String): User - fun loginUser(username: String, password: String): String + fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String fun logoutUser(): Unit - fun updateUser(username: String, body: User): Unit + fun updateUser(username: kotlin.String, body: User): Unit } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt index 3373dcb6a73..ebd82222015 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -9,23 +9,23 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun createUsersWithArrayInput(body: List): Unit { + override fun createUsersWithArrayInput(body: kotlin.collections.List): Unit { TODO("Implement me") } - override fun createUsersWithListInput(body: List): Unit { + override fun createUsersWithListInput(body: kotlin.collections.List): Unit { TODO("Implement me") } - override fun deleteUser(username: String): Unit { + override fun deleteUser(username: kotlin.String): Unit { TODO("Implement me") } - override fun getUserByName(username: String): User { + override fun getUserByName(username: kotlin.String): User { TODO("Implement me") } - override fun loginUser(username: String, password: String): String { + override fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String { TODO("Implement me") } @@ -33,7 +33,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override fun updateUser(username: String, body: User): Unit { + override fun updateUser(username: kotlin.String, body: User): Unit { TODO("Implement me") } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index 1a1dbf7223c..f477eb4e7a8 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Category ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 2f844a9c356..0e86b28e937 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -20,13 +20,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: Int? = null, + @JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: String? = null, + @JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: String? = null + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index e20d850491f..08726893f7d 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty data class Order ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: Long? = null, + @JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: Int? = null, + @JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @@ -39,14 +39,14 @@ data class Order ( @JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: Boolean? = null + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** * Order Status * Values: placed,approved,delivered */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("placed") placed("placed"), diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 9e054ac22f7..4a2e9d26cb9 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -27,20 +27,20 @@ data class Pet ( @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: String, + @JsonProperty("name") val name: kotlin.String, @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: List, + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("category") val category: Category? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: List? = null, + @JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") val status: Pet.Status? = null @@ -50,7 +50,7 @@ data class Pet ( * pet status in the store * Values: available,pending,sold */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("available") available("available"), diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index 40ef1b9a86b..df04dcd035d 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 95fe12aa467..619b2e7c2c3 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -25,28 +25,28 @@ import io.swagger.annotations.ApiModelProperty data class User ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: String? = null, + @JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: String? = null, + @JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: String? = null, + @JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: String? = null, + @JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: String? = null, + @JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: String? = null, + @JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: Int? = null + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/PetApiTest.kt b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/PetApiTest.kt index 394aff3b339..d621c166966 100644 --- a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/PetApiTest.kt +++ b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/PetApiTest.kt @@ -38,8 +38,8 @@ class PetApiTest { */ @Test fun deletePetTest() { - val petId:Long? = null - val apiKey:String? = null + val petId:kotlin.Long? = null + val apiKey:kotlin.String? = null val response: ResponseEntity = api.deletePet(petId!!, apiKey!!) // TODO: test validations @@ -55,7 +55,7 @@ class PetApiTest { */ @Test fun findPetsByStatusTest() { - val status:List? = null + val status:kotlin.collections.List? = null val response: ResponseEntity> = api.findPetsByStatus(status!!) // TODO: test validations @@ -71,7 +71,7 @@ class PetApiTest { */ @Test fun findPetsByTagsTest() { - val tags:List? = null + val tags:kotlin.collections.List? = null val response: ResponseEntity> = api.findPetsByTags(tags!!) // TODO: test validations @@ -87,7 +87,7 @@ class PetApiTest { */ @Test fun getPetByIdTest() { - val petId:Long? = null + val petId:kotlin.Long? = null val response: ResponseEntity = api.getPetById(petId!!) // TODO: test validations @@ -119,9 +119,9 @@ class PetApiTest { */ @Test fun updatePetWithFormTest() { - val petId:Long? = null - val name:String? = null - val status:String? = null + val petId:kotlin.Long? = null + val name:kotlin.String? = null + val status:kotlin.String? = null val response: ResponseEntity = api.updatePetWithForm(petId!!, name!!, status!!) // TODO: test validations @@ -137,8 +137,8 @@ class PetApiTest { */ @Test fun uploadFileTest() { - val petId:Long? = null - val additionalMetadata:String? = null + val petId:kotlin.Long? = null + val additionalMetadata:kotlin.String? = null val file:org.springframework.core.io.Resource? = null val response: ResponseEntity = api.uploadFile(petId!!, additionalMetadata!!, file!!) diff --git a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt index 48b25c4eafd..82b91cd652b 100644 --- a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt +++ b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt @@ -21,7 +21,7 @@ class StoreApiTest { */ @Test fun deleteOrderTest() { - val orderId:String? = null + val orderId:kotlin.String? = null val response: ResponseEntity = api.deleteOrder(orderId!!) // TODO: test validations @@ -37,7 +37,7 @@ class StoreApiTest { */ @Test fun getInventoryTest() { - val response: ResponseEntity> = api.getInventory() + val response: ResponseEntity> = api.getInventory() // TODO: test validations } @@ -52,7 +52,7 @@ class StoreApiTest { */ @Test fun getOrderByIdTest() { - val orderId:Long? = null + val orderId:kotlin.Long? = null val response: ResponseEntity = api.getOrderById(orderId!!) // TODO: test validations diff --git a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/UserApiTest.kt b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/UserApiTest.kt index 50940559e87..14917f70aeb 100644 --- a/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/UserApiTest.kt +++ b/samples/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/UserApiTest.kt @@ -37,7 +37,7 @@ class UserApiTest { */ @Test fun createUsersWithArrayInputTest() { - val body:List? = null + val body:kotlin.collections.List? = null val response: ResponseEntity = api.createUsersWithArrayInput(body!!) // TODO: test validations @@ -53,7 +53,7 @@ class UserApiTest { */ @Test fun createUsersWithListInputTest() { - val body:List? = null + val body:kotlin.collections.List? = null val response: ResponseEntity = api.createUsersWithListInput(body!!) // TODO: test validations @@ -69,7 +69,7 @@ class UserApiTest { */ @Test fun deleteUserTest() { - val username:String? = null + val username:kotlin.String? = null val response: ResponseEntity = api.deleteUser(username!!) // TODO: test validations @@ -85,7 +85,7 @@ class UserApiTest { */ @Test fun getUserByNameTest() { - val username:String? = null + val username:kotlin.String? = null val response: ResponseEntity = api.getUserByName(username!!) // TODO: test validations @@ -101,9 +101,9 @@ class UserApiTest { */ @Test fun loginUserTest() { - val username:String? = null - val password:String? = null - val response: ResponseEntity = api.loginUser(username!!, password!!) + val username:kotlin.String? = null + val password:kotlin.String? = null + val response: ResponseEntity = api.loginUser(username!!, password!!) // TODO: test validations } @@ -133,7 +133,7 @@ class UserApiTest { */ @Test fun updateUserTest() { - val username:String? = null + val username:kotlin.String? = null val body:User? = null val response: ResponseEntity = api.updateUser(username!!, body!!) From dc3543981ec6bb835acad8eb53a45fcc631ee566 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Tue, 4 Jun 2019 19:33:01 +0530 Subject: [PATCH 16/73] feat(java-jersey2): Making response headers case-insensitive (#3072) * feat(java-jersey2): Making headers case-insensitive * feat(java-jersey2): Updating documentation --- docs/generators/java.md | 2 +- .../codegen/languages/JavaClientCodegen.java | 2 +- .../libraries/jersey2/ApiResponse.mustache | 12 ++- .../libraries/jersey2/apiException.mustache | 96 +++++++++++++++++++ 4 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/Java/libraries/jersey2/apiException.mustache diff --git a/docs/generators/java.md b/docs/generators/java.md index 7785ee892e9..809773a8bdf 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -54,5 +54,5 @@ sidebar_label: java |useRuntimeException|Use RuntimeException instead of Exception| |false| |feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive in okhttp-gson library| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| |library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x
**feign**
HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.8.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.8.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.8.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x
**rest-assured**
HTTP client: rest-assured : 3.x. JSON processing: Gson 2.x. Only for Java8
|okhttp-gson| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index a5a3b3dd40d..b95c9bf8d3b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -124,7 +124,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception")); cliOptions.add(CliOption.newBoolean(FEIGN_VERSION, "Version of OpenFeign: '10.x', '9.x' (default)")); cliOptions.add(CliOption.newBoolean(USE_REFLECTION_EQUALS_HASHCODE, "Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.")); - cliOptions.add(CliOption.newBoolean(CASE_INSENSITIVE_RESPONSE_HEADERS, "Make API response's headers case-insensitive in " + OKHTTP_GSON + " library")); + cliOptions.add(CliOption.newBoolean(CASE_INSENSITIVE_RESPONSE_HEADERS, "Make API response's headers case-insensitive. Available on " + OKHTTP_GSON + ", " + JERSEY2 + " libraries")); supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead."); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiResponse.mustache index 2f01685a0af..a67b11f054c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiResponse.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiResponse.mustache @@ -4,6 +4,10 @@ package {{invokerPackage}}; import java.util.List; import java.util.Map; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} /** * API response returned by API call. @@ -30,7 +34,13 @@ public class ApiResponse { */ public ApiResponse(int statusCode, Map> headers, T data) { this.statusCode = statusCode; - this.headers = headers; + {{#caseInsensitiveResponseHeaders}} + Map> responseHeaders = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : headers.entrySet()){ + responseHeaders.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.headers = {{#caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}; this.data = data; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/apiException.mustache new file mode 100644 index 00000000000..e8952456591 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/apiException.mustache @@ -0,0 +1,96 @@ +{{>licenseInfo}} + +package {{invokerPackage}}; + +import java.util.Map; +import java.util.List; +{{#caseInsensitiveResponseHeaders}} +import java.util.Map.Entry; +import java.util.TreeMap; +{{/caseInsensitiveResponseHeaders}} + +{{>generatedAnnotation}} +public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + {{#caseInsensitiveResponseHeaders}} + Map> headers = new TreeMap>(String.CASE_INSENSITIVE_ORDER); + for(Entry> entry : responseHeaders.entrySet()){ + headers.put(entry.getKey().toLowerCase(), entry.getValue()); + } + {{/caseInsensitiveResponseHeaders}} + this.responseHeaders = {{#caseInsensitiveResponseHeaders}}headers{{/caseInsensitiveResponseHeaders}}{{^caseInsensitiveResponseHeaders}}responseHeaders{{/caseInsensitiveResponseHeaders}}; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} From dcf3f420f98bb75df28052634e8fc1d0f2a5731c Mon Sep 17 00:00:00 2001 From: MBcom <27956078+MBcom@users.noreply.github.com> Date: Tue, 4 Jun 2019 17:03:15 +0200 Subject: [PATCH 17/73] general support to add scopes for bearer auth too (#1984) * general support to add scopes for bearer auth too implemented authorize workflow in aspnet core too * petstore update * fix missing ) * multi roles fix * null pointer error prevention * null point exception fixes * null pointer fixes * npe fix * solved line break issue --- .../openapitools/codegen/CodegenSecurity.java | 2 +- .../codegen/DefaultGenerator.java | 34 +++++++++++++++++++ .../aspnetcore/2.1/controller.mustache | 4 ++- .../Org.OpenAPITools/Controllers/PetApi.cs | 1 + .../Org.OpenAPITools/Controllers/StoreApi.cs | 1 + .../Org.OpenAPITools/Controllers/UserApi.cs | 1 + 6 files changed, 41 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java index 7e545eec738..ea354971202 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java @@ -38,7 +38,7 @@ public class CodegenSecurity { // Oauth specific public String flow, authorizationUrl, tokenUrl; public List> scopes; - public Boolean isCode, isPassword, isApplication, isImplicit; + public Boolean isCode, isPassword, isApplication, isImplicit, hasScopes; @Override public String toString() { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 1226eaba9fe..7a76a472269 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -1051,6 +1051,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { if (securities != null && securities.isEmpty()) { continue; } + Map authMethods = getAuthMethods(securities, securitySchemes); if (authMethods == null || authMethods.isEmpty()) { authMethods = getAuthMethods(globalSecurities, securitySchemes); @@ -1058,6 +1059,39 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { if (authMethods != null && !authMethods.isEmpty()) { codegenOperation.authMethods = config.fromSecurity(authMethods); + List> scopes = new ArrayList>(); + if (codegenOperation.authMethods != null){ + for (CodegenSecurity security : codegenOperation.authMethods){ + if (security != null && security.isBasicBearer != null && security.isBasicBearer && + securities != null){ + for (SecurityRequirement req : securities){ + if (req == null) continue; + for (String key : req.keySet()){ + if (security.name != null && key.equals(security.name)){ + int count = 0; + for (String sc : req.get(key)){ + Map scope = new HashMap(); + scope.put("scope", sc); + scope.put("description", ""); + count++; + if (req.get(key) != null && count < req.get(key).size()){ + scope.put("hasMore", "true"); + } else { + scope.put("hasMore", null); + } + scopes.add(scope); + } + //end this inner for + break; + } + } + + } + security.hasScopes = scopes.size() > 0; + security.scopes = scopes; + } + } + } codegenOperation.hasAuthMethods = true; } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache index dec27299ffc..75121e64532 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache @@ -14,6 +14,7 @@ using Newtonsoft.Json; {{/isLibrary}} using System.ComponentModel.DataAnnotations; using {{packageName}}.Attributes; +using Microsoft.AspNetCore.Authorization; using {{modelPackage}}; namespace {{apiPackage}} @@ -32,7 +33,8 @@ namespace {{apiPackage}} /// {{description}}{{/allParams}}{{#responses}} /// {{message}}{{/responses}} [{{httpMethod}}] - [Route("{{{basePathWithoutHost}}}{{{path}}}")] + [Route("{{{basePathWithoutHost}}}{{{path}}}")]{{#hasAuthMethods}}{{#authMethods}}{{#isBasicBearer}} + [Authorize{{#hasScopes}}(Roles = "{{#scopes}}{{scope}}{{#hasMore}},{{/hasMore}}{{/scopes}}"){{/hasScopes}}]{{/isBasicBearer}}{{/authMethods}}{{/hasAuthMethods}} [ValidateModelState]{{#useSwashbuckle}} [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index a945134b8a9..2a2599284de 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -17,6 +17,7 @@ using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; using Org.OpenAPITools.Attributes; using Org.OpenAPITools.Models; +using Microsoft.AspNetCore.Authorization; namespace Org.OpenAPITools.Controllers { diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 1e981d697ae..93acea2d083 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -17,6 +17,7 @@ using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; using Org.OpenAPITools.Attributes; using Org.OpenAPITools.Models; +using Microsoft.AspNetCore.Authorization; namespace Org.OpenAPITools.Controllers { diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index 7c455f25a57..c3a29ff7aed 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -17,6 +17,7 @@ using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; using Org.OpenAPITools.Attributes; using Org.OpenAPITools.Models; +using Microsoft.AspNetCore.Authorization; namespace Org.OpenAPITools.Controllers { From 9f1b9386f19c2f34e5e2ebe2e8832ecacb1af330 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 5 Jun 2019 00:07:15 +0800 Subject: [PATCH 18/73] [CI] Test maven plugin in Travis, move jobs from Shippable to Circle CI (#3087) * test plugin in travis, move jobs to circle CI * Revert "[maven-plugin] fix strictSpec parameter (#3071)" This reverts commit 8c9a1512ae824d35866375eb69ddd085309d0251. * Revert "Revert "[maven-plugin] fix strictSpec parameter (#3071)"" This reverts commit c3e5723c5a365ffb8a6cedfcc4a7a278543e63a3. * test with jdk8 --- .travis.yml | 3 +++ CI/circle_parallel.sh | 9 +++++++++ shippable.yml | 17 +++++++++-------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d790284751..3db40c94ca5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -131,6 +131,9 @@ script: # WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet. - mvn --quiet --batch-mode --show-version clean install - mvn --quiet --batch-mode --show-version verify -Psamples + # test maven plugin + - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml + - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml after_success: # push to maven repo - if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 9b780d2f195..417f34349f2 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -12,6 +12,15 @@ if [ "$NODE_INDEX" = "1" ]; then #cp CI/pom.xml.circleci pom.xml java -version mvn --quiet verify -Psamples.circleci + + # generate all petstore samples (client, servers, doc) + ./bin/run-all-petstore + # generate all petstore samples (openapi3) + ./bin/openapi3/run-all-petstore + # generate test scripts + ./bin/tests/run-all-test + # test all generators with fake petstore spec (2.0, 3.0) + ./bin/utils/test-fake-petstore-for-all.sh elif [ "$NODE_INDEX" = "2" ]; then # run ensure-up-to-date sample script on SNAPSHOT version only project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout` diff --git a/shippable.yml b/shippable.yml index 5d59a34340b..c9ff665bebe 100644 --- a/shippable.yml +++ b/shippable.yml @@ -38,11 +38,12 @@ build: - mix --version # test samples defined in pom.xml - mvn --quiet verify -P samples.shippable -Dmaven.javadoc.skip=true - # generate all petstore samples (client, servers, doc) - - ./bin/run-all-petstore - # generate all petstore samples (openapi3) - - ./bin/openapi3/run-all-petstore - # generate test scripts - - ./bin/tests/run-all-test - # test all generators with fake petstore spec (2.0, 3.0) - - ./bin/utils/test-fake-petstore-for-all.sh + # below moved to CircleCI + ## generate all petstore samples (client, servers, doc) + #- ./bin/run-all-petstore + ## generate all petstore samples (openapi3) + #- ./bin/openapi3/run-all-petstore + ## generate test scripts + #- ./bin/tests/run-all-test + ## test all generators with fake petstore spec (2.0, 3.0) + #- ./bin/utils/test-fake-petstore-for-all.sh From 66bf0dce9e362e8e893dfa27cb96567485446fbe Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Wed, 5 Jun 2019 11:47:46 +0200 Subject: [PATCH 19/73] [Golang][client] Allow generating go client code as a submodule. (#3012) --- docs/generators/go.md | 1 + .../org/openapitools/codegen/CodegenConstants.java | 3 +++ .../codegen/languages/GoClientCodegen.java | 13 +++++++++++++ .../src/main/resources/go/go.mod.mustache | 2 +- .../codegen/go/GoClientOptionsTest.java | 2 ++ .../codegen/options/GoClientOptionsProvider.java | 2 ++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/generators/go.md b/docs/generators/go.md index 07cdb2fdd79..ec1ecbebeeb 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -10,6 +10,7 @@ sidebar_label: go |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|isGoSubmodule|whether the generated Go module is a submodule| |false| |withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 61134701d5f..0f03cacec6e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -69,6 +69,9 @@ public class CodegenConstants { public static final String WITH_GO_CODEGEN_COMMENT = "withGoCodegenComment"; public static final String WITH_GO_CODEGEN_COMMENT_DESC = "whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs"; + public static final String IS_GO_SUBMODULE = "isGoSubmodule"; + public static final String IS_GO_SUBMODULE_DESC = "whether the generated Go module is a submodule"; + public static final String GROUP_ID = "groupId"; public static final String GROUP_ID_DESC = "groupId in generated pom.xml"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index af79157f93a..2ea1a2918c8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -33,6 +33,7 @@ public class GoClientCodegen extends AbstractGoCodegen { protected String packageVersion = "1.0.0"; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; + protected boolean isGoSubmodule = false; public static final String WITH_GO_CODEGEN_COMMENT = "withGoCodegenComment"; public static final String WITH_XML = "withXml"; @@ -51,6 +52,7 @@ public class GoClientCodegen extends AbstractGoCodegen { // default HIDE_GENERATION_TIMESTAMP to true hideGenerationTimestamp = Boolean.TRUE; + cliOptions.add(CliOption.newBoolean(CodegenConstants.IS_GO_SUBMODULE, CodegenConstants.IS_GO_SUBMODULE_DESC)); cliOptions.add(CliOption.newBoolean(WITH_GO_CODEGEN_COMMENT, "whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs")); cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)")); @@ -111,6 +113,13 @@ public class GoClientCodegen extends AbstractGoCodegen { additionalProperties.put(WITH_XML, "true"); } } + + if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) { + setIsGoSubmodule(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.IS_GO_SUBMODULE).toString())); + if (isGoSubmodule) { + additionalProperties.put(CodegenConstants.IS_GO_SUBMODULE, "true"); + } + } } /** @@ -184,4 +193,8 @@ public class GoClientCodegen extends AbstractGoCodegen { this.packageVersion = packageVersion; } + public void setIsGoSubmodule(boolean isGoSubmodule) { + this.isGoSubmodule = isGoSubmodule; + } + } diff --git a/modules/openapi-generator/src/main/resources/go/go.mod.mustache b/modules/openapi-generator/src/main/resources/go/go.mod.mustache index bc919e42e0e..ec4310dd593 100644 --- a/modules/openapi-generator/src/main/resources/go/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go/go.mod.mustache @@ -1,4 +1,4 @@ -module github.com/{{gitUserId}}/{{gitRepoId}} +module github.com/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} require ( github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java index 7bdf5afbb60..634fcc45506 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java @@ -52,6 +52,8 @@ public class GoClientOptionsTest extends AbstractOptionsTest { times = 1; clientCodegen.setPrependFormOrBodyParameters(Boolean.valueOf(GoClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)); times = 1; + clientCodegen.setIsGoSubmodule(Boolean.valueOf(GoClientOptionsProvider.IS_GO_SUBMODULE_VALUE)); + times = 1; }}; } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java index 9e79d0ea0a0..39dc5d06ab8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java @@ -29,6 +29,7 @@ public class GoClientOptionsProvider implements OptionsProvider { public static final boolean WITH_GO_CODEGEN_COMMENT_VALUE = true; public static final boolean WITH_XML_VALUE = true; public static final Boolean PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = true; + public static final boolean IS_GO_SUBMODULE_VALUE = true; @Override public String getLanguage() { @@ -45,6 +46,7 @@ public class GoClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.WITH_GO_CODEGEN_COMMENT, "true") .put(CodegenConstants.WITH_XML, "true") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") + .put(CodegenConstants.IS_GO_SUBMODULE, "true") .build(); } From 4e9d2264430a4ae6ba1d005b210a4e003a3636bc Mon Sep 17 00:00:00 2001 From: Chris Couzens Date: Wed, 5 Jun 2019 11:54:23 +0100 Subject: [PATCH 20/73] Ruby: Avoid double escaping path items (#3093) `URI.encode` is obsolete. `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` are recommended instead. https://ruby-doc.org/stdlib-2.6/libdoc/uri/rdoc/URI/Escape.html#method-i-escape URI.encode has different behaviour to CGI.escape: ```ruby URI.encode('hello/world?test%string') => "hello/world?test%25string" CGI.escape('hello/world?test%string') => "hello%2Fworld%3Ftest%25string" ``` I recently raised pull request #3039 201cbdce29cc6cdbbbe9efcb1afb250a05bc2ffd That pull request escapes path items at insertion. Before either pull request, the path item 'hello?world' would go into the URL as 'hello?world'. That behaviour was insecure as if an attacker could control the path item value, they could change the URL the application connected to. After #3039 'hello?world' would go in as 'hello%253Fworld'. This was safer than before, but it's still not correct. If I'd realised at the time, I would have made it correct at the time. What this pull request does is make it go in as 'hello%35world', which is correct. ApiClient::build_request_url was URI.encoding the whole path. This wasn't protecting against all undesirable characters in the path items, but was escaping % characters a 2nd time which was unhelpful. I have additionally removed URI.encode from Configuration::base_url as I can't see any benefit it could be bringing. There is no justification for it in the commit where it was originally added: 47c8597d36a9bc0983ba5c40e2489bb094f9f076 --- .../src/main/resources/ruby-client/api.mustache | 1 - .../src/main/resources/ruby-client/api_client.mustache | 3 +-- .../src/main/resources/ruby-client/configuration.mustache | 5 +---- .../petstore/ruby/lib/petstore/api/another_fake_api.rb | 1 - samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 1 - .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 1 - samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 1 - samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 1 - samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 1 - samples/client/petstore/ruby/lib/petstore/api_client.rb | 3 +-- samples/client/petstore/ruby/lib/petstore/configuration.rb | 5 +---- .../petstore/ruby/lib/petstore/api/another_fake_api.rb | 1 - .../client/petstore/ruby/lib/petstore/api/default_api.rb | 1 - .../client/petstore/ruby/lib/petstore/api/fake_api.rb | 1 - .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 1 - .../client/petstore/ruby/lib/petstore/api/pet_api.rb | 1 - .../client/petstore/ruby/lib/petstore/api/store_api.rb | 1 - .../client/petstore/ruby/lib/petstore/api/user_api.rb | 1 - .../openapi3/client/petstore/ruby/lib/petstore/api_client.rb | 3 +-- .../client/petstore/ruby/lib/petstore/configuration.rb | 5 +---- 20 files changed, 6 insertions(+), 32 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index c92659ff2b1..1c5a053a9b9 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -2,7 +2,6 @@ {{> api_info}} =end -require 'uri' require 'cgi' module {{moduleName}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache index 8e5b92e9e00..28c76241620 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache @@ -7,7 +7,6 @@ require 'json' require 'logger' require 'tempfile' require 'typhoeus' -require 'uri' module {{moduleName}} class ApiClient @@ -256,7 +255,7 @@ module {{moduleName}} def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + @config.base_url + path end # Builds the HTTP request body diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache index 2f43306a3b9..3c0148fbd4d 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache @@ -2,8 +2,6 @@ {{> api_info}} =end -require 'uri' - module {{moduleName}} class Configuration # Defines url scheme @@ -166,8 +164,7 @@ module {{moduleName}} end def base_url - url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') end # Gets API key (with prefix if set). diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 18cb328fd9a..f957c352092 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index ce59bf605c1..314b100ee77 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 13410aa52de..6e33ef4e10e 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 273affb0542..936d0027a02 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index f387db67c5a..774dc9a55a9 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 01cb76b6da8..3a90e874a20 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 891c0f5655c..8d36b435ea4 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -15,7 +15,6 @@ require 'json' require 'logger' require 'tempfile' require 'typhoeus' -require 'uri' module Petstore class ApiClient @@ -262,7 +261,7 @@ module Petstore def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + @config.base_url + path end # Builds the HTTP request body diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 44eb8aa808c..08d9bb569f0 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -10,8 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' - module Petstore class Configuration # Defines url scheme @@ -174,8 +172,7 @@ module Petstore end def base_url - url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') end # Gets API key (with prefix if set). diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index ca03529892a..ea4ed548f2d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb index f944f4a91ad..bc85b460c84 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb index 4887add3f1c..60d57a6bbfa 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 21a754cec9c..a679d6277d0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb index faeb9c5e761..17debb4979e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb index d846a761f28..bda77f3a2b0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb index 6e50fade18b..bb5e1f5f149 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -10,7 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' require 'cgi' module Petstore diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb index 891c0f5655c..8d36b435ea4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb @@ -15,7 +15,6 @@ require 'json' require 'logger' require 'tempfile' require 'typhoeus' -require 'uri' module Petstore class ApiClient @@ -262,7 +261,7 @@ module Petstore def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + @config.base_url + path end # Builds the HTTP request body diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb index fde046f49b1..9d4385540e6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb @@ -10,8 +10,6 @@ OpenAPI Generator version: 4.0.2-SNAPSHOT =end -require 'uri' - module Petstore class Configuration # Defines url scheme @@ -174,8 +172,7 @@ module Petstore end def base_url - url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') end # Gets API key (with prefix if set). From ad06496887480ff8299a2fbbb1756f98a4e602fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Wed, 5 Jun 2019 14:21:51 +0200 Subject: [PATCH 21/73] [maven-plugin] fix strictSpec parameter without alias (#3095) * Revert "[maven-plugin] fix strictSpec parameter (#3071)" This reverts commit 8c9a1512ae824d35866375eb69ddd085309d0251. * [maven-plugin] fix strictSpec parameter without alias --- .../java/org/openapitools/codegen/plugin/CodeGenMojo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 91d76333b10..0414bb1dc87 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -244,8 +244,8 @@ public class CodeGenMojo extends AbstractMojo { /** * To treat a document strictly against the spec. */ - @Parameter(name = "strictSpecBehavior", alias = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) - private Boolean strictSpecBehavior; + @Parameter(name = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) + private Boolean strictSpec; /** * To generate alias (array, map) as model @@ -471,8 +471,8 @@ public class CodeGenMojo extends AbstractMojo { configurator.setValidateSpec(!skipValidateSpec); } - if (strictSpecBehavior != null) { - configurator.setStrictSpecBehavior(strictSpecBehavior); + if (strictSpec != null) { + configurator.setStrictSpecBehavior(strictSpec); } if (logToStderr != null) { From 6379022c42871f5c457984a1a4f9438826ba48bf Mon Sep 17 00:00:00 2001 From: Adi Gerber <16128031+adigerber@users.noreply.github.com> Date: Wed, 5 Jun 2019 20:50:39 +0300 Subject: [PATCH 22/73] scala-play-server: fix API doc url (#3096) --- .../scala-play-server/app/apiDocController.scala.mustache | 2 +- .../petstore/scala-play-server/app/api/ApiDocController.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/scala-play-server/app/apiDocController.scala.mustache b/modules/openapi-generator/src/main/resources/scala-play-server/app/apiDocController.scala.mustache index d6a85a65963..b2d81f06027 100644 --- a/modules/openapi-generator/src/main/resources/scala-play-server/app/apiDocController.scala.mustache +++ b/modules/openapi-generator/src/main/resources/scala-play-server/app/apiDocController.scala.mustache @@ -6,6 +6,6 @@ import play.api.mvc._ @Singleton class ApiDocController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { def api: Action[AnyContent] = Action { - Redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json") + Redirect("/assets/lib/swagger-ui/index.html?url=/assets/openapi.json") } } diff --git a/samples/server/petstore/scala-play-server/app/api/ApiDocController.scala b/samples/server/petstore/scala-play-server/app/api/ApiDocController.scala index c86ec2b87b9..27ff50a810c 100644 --- a/samples/server/petstore/scala-play-server/app/api/ApiDocController.scala +++ b/samples/server/petstore/scala-play-server/app/api/ApiDocController.scala @@ -6,6 +6,6 @@ import play.api.mvc._ @Singleton class ApiDocController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { def api: Action[AnyContent] = Action { - Redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json") + Redirect("/assets/lib/swagger-ui/index.html?url=/assets/openapi.json") } } From 86e53d6f0b960cc188e8d05a3b04e6561b5f034b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 6 Jun 2019 01:57:16 +0800 Subject: [PATCH 23/73] fix NPE in go generator (#3104) --- bin/utils/ensure-up-to-date | 1 + .../org/openapitools/codegen/languages/GoClientCodegen.java | 2 +- .../go/go-petstore-withXml/.openapi-generator/VERSION | 2 +- samples/client/petstore/go/go-petstore-withXml/client.go | 2 +- .../client/petstore/go/go-petstore-withXml/docs/UserApi.md | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 3d5909a88d8..8cf31ae0c51 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -51,6 +51,7 @@ declare -a scripts=( "./bin/csharp-netcore-petstore-all.sh" "./bin/elixir-petstore.sh" "./bin/go-petstore.sh" +"./bin/go-petstore-withxml.sh" "./bin/go-gin-petstore-server.sh" "./bin/groovy-petstore.sh" "./bin/apex-petstore.sh" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 2ea1a2918c8..749ae845c8e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -114,7 +114,7 @@ public class GoClientCodegen extends AbstractGoCodegen { } } - if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) { + if (additionalProperties.containsKey(CodegenConstants.IS_GO_SUBMODULE)) { setIsGoSubmodule(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.IS_GO_SUBMODULE).toString())); if (isGoSubmodule) { additionalProperties.put(CodegenConstants.IS_GO_SUBMODULE, "true"); diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION index 06b5019af3f..d96260ba335 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index 973bad121ed..c666bcfe6ea 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -388,7 +388,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } else if jsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) + err = xml.NewEncoder(bodyBuf).Encode(body) } if err != nil { diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md index ea19e0e716f..3201e1771dc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md @@ -59,7 +59,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](array.md)| List of user object | +**body** | [**[]User**](User.md)| List of user object | ### Return type @@ -90,7 +90,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](array.md)| List of user object | +**body** | [**[]User**](User.md)| List of user object | ### Return type From e68426fda9e69f7ed8de8bc9470dd875ad374d06 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 6 Jun 2019 02:10:21 +0800 Subject: [PATCH 24/73] Add @sunn to openapi generator core team (#3105) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b43c267dee3..73fde0dcfc4 100644 --- a/README.md +++ b/README.md @@ -604,6 +604,7 @@ OpenAPI Generator core team members are contributors who have been making signif * [@cbornet](https://github.com/cbornet) (2016/05) * [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview) * [@jmini](https://github.com/jmini) (2018/04) +* [@sunn](https://github.com/sunn) (2019/06) :heart: = Link to support the contributor directly From 0d701b7ce9e21c9405cac5cf17facd48dba542fc Mon Sep 17 00:00:00 2001 From: Adi Gerber <16128031+adigerber@users.noreply.github.com> Date: Wed, 5 Jun 2019 21:26:22 +0300 Subject: [PATCH 25/73] scala-play-server: fix enum names for reserved words (#3080) --- .../languages/ScalaPlayFrameworkServerCodegen.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 0285e31ccf7..881b2cb6dc9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -358,7 +358,15 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem @Override public String toEnumName(CodegenProperty property) { - return camelize(property.name); + return camelizeStripReservedEscape(property.name); + } + + public String camelizeStripReservedEscape(String str) { + if (str.startsWith("`") && str.endsWith("`")) { + str = str.substring(1, str.length() - 1); + } + + return camelize(str); } @Override From 146c1fb25530699661211bcdd92b76491902b4b7 Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Wed, 5 Jun 2019 20:42:15 +0200 Subject: [PATCH 26/73] Link query parameter to model object (#2710) * Link query parameter to model object Must fix #2655 * Fix import --- .../openapitools/codegen/DefaultCodegen.java | 8 ++++ .../resources/JavaSpring/queryParams.mustache | 2 +- .../codegen/DefaultCodegenTest.java | 16 +++++++ .../java/spring/SpringCodegenTest.java | 46 +++++++++++++++++++ .../test/resources/3_0/objectQueryParam.yaml | 25 ++++++++++ 5 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/objectQueryParam.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 0c826154494..4595d855077 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2210,6 +2210,7 @@ public class DefaultCodegen implements CodegenConfig { // property.baseType = getSimpleRef(p.get$ref()); //} // --END of revision + property.isModel = ModelUtils.isModel(p); setNonArrayMapProperty(property, type); } @@ -3035,6 +3036,9 @@ public class DefaultCodegen implements CodegenConfig { } else { codegenParameter.dataType = codegenProperty.dataType; } + if (ModelUtils.isObjectSchema(parameterSchema)) { + codegenProperty.complexType = codegenParameter.dataType; + } codegenParameter.dataFormat = codegenProperty.dataFormat; codegenParameter.required = codegenProperty.required; @@ -3221,6 +3225,10 @@ public class DefaultCodegen implements CodegenConfig { * @return data type */ protected String getParameterDataType(Parameter parameter, Schema schema) { + if (parameter.get$ref() != null) { + String refName = ModelUtils.getSimpleRef(parameter.get$ref()); + return toModelName(refName); + } return null; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache index 55e9558ec70..9bf21463079 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}){{/isModel}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index fe708c0ed66..334ae65e518 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -622,4 +622,20 @@ public class DefaultCodegenTest { Map objs = Collections.singletonMap("models", Collections.singletonList(Collections.singletonMap("model", cm))); return objs; } + + @Test + public void objectQueryParamIdentifyAsObject() { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/objectQueryParam.yaml"); + new InlineModelResolver().flatten(openAPI); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + Set imports = new HashSet<>(); + CodegenParameter parameter = codegen.fromParameter(openAPI.getPaths().get("/pony").getGet().getParameters().get(0), imports); + + Assert.assertEquals(parameter.dataType, "PageQuery"); + Assert.assertEquals(imports.size(), 1); + Assert.assertEquals(imports.iterator().next(), "PageQuery"); + } + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 8059873a453..9a95e857d8a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -17,14 +17,27 @@ package org.openapitools.codegen.java.spring; +import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.servers.Server; +import io.swagger.v3.parser.core.models.ParseOptions; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.ClientOpts; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.MockDefaultGenerator; import org.openapitools.codegen.languages.SpringCodegen; +import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.testng.Assert; import org.testng.annotations.Test; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; + +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; + import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; public class SpringCodegenTest { @@ -122,4 +135,37 @@ public class SpringCodegenTest { Assert.assertEquals(codegen.additionalProperties().get("jdk8"), false); } + + @Test + public void doNotGenerateRequestParamForObjectQueryParam() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/objectQueryParam.yaml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + ClientOpts opts = new ClientOpts(); + opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput(); + input.setOpenAPI(openAPI); + input.setConfig(codegen); + input.setOpts(opts); + + MockDefaultGenerator generator = new MockDefaultGenerator(); + generator.opts(input).generate(); + + checkFileNotContains(generator, outputPath + "/src/main/java/org/openapitools/api/PonyApi.java", "@RequestParam"); + } + + private void checkFileNotContains(MockDefaultGenerator generator, String path, String... lines) { + String file = generator.getFiles().get(path); + assertNotNull(file); + for (String line : lines) + assertFalse(file.contains(line)); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/objectQueryParam.yaml b/modules/openapi-generator/src/test/resources/3_0/objectQueryParam.yaml new file mode 100644 index 00000000000..cddf5495fed --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/objectQueryParam.yaml @@ -0,0 +1,25 @@ +openapi: 3.0.0 +servers: + - url: 'localhost:8080' +info: + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +paths: + /pony: + get: + operationId: list + parameters: + - in: query + name: pageQuery + schema: + type: object + properties: + offset: + type: integer + format: int32 + limit: + type: integer + format: int32 \ No newline at end of file From 19f47d0caa49142cefcde6a4f5439f640f8e6958 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 6 Jun 2019 13:32:58 +0800 Subject: [PATCH 27/73] [Java][okhttp-gson] Update dependencies (#3103) * update java client depedency to the latest version * update java samples --- .../Java/libraries/okhttp-gson/build.gradle.mustache | 8 ++++---- .../Java/libraries/okhttp-gson/build.sbt.mustache | 8 ++++---- .../resources/Java/libraries/okhttp-gson/pom.mustache | 4 ++-- .../java/okhttp-gson-parcelableModel/build.gradle | 8 ++++---- .../petstore/java/okhttp-gson-parcelableModel/build.sbt | 8 ++++---- .../petstore/java/okhttp-gson-parcelableModel/pom.xml | 4 ++-- samples/client/petstore/java/okhttp-gson/build.gradle | 8 ++++---- samples/client/petstore/java/okhttp-gson/build.sbt | 8 ++++---- samples/client/petstore/java/okhttp-gson/pom.xml | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index 613c81a48be..cb0e972ae37 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -126,15 +126,15 @@ if(hasProperty('target') && target == 'android') { } dependencies { - compile 'io.swagger:swagger-annotations:1.5.21' - compile 'com.squareup.okhttp3:okhttp:3.13.1' - compile 'com.squareup.okhttp3:logging-interceptor:3.13.1' + compile 'io.swagger:swagger-annotations:1.5.22' + compile 'com.squareup.okhttp3:okhttp:3.14.2' + compile 'com.squareup.okhttp3:logging-interceptor:3.14.2' compile 'com.google.code.gson:gson:2.8.5' compile 'io.gsonfire:gson-fire:1.8.3' {{#hasOAuthMethods}} compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' {{/hasOAuthMethods}} - compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' {{#joda}} compile 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index f83f149e920..80a53397e3a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -9,11 +9,11 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.21", - "com.squareup.okhttp3" % "okhttp" % "3.13.1", - "com.squareup.okhttp3" % "logging-interceptor" % "3.13.1", + "io.swagger" % "swagger-annotations" % "1.5.22", + "com.squareup.okhttp3" % "okhttp" % "3.14.2", + "com.squareup.okhttp3" % "logging-interceptor" % "3.14.2", "com.google.code.gson" % "gson" % "2.8.5", - "org.apache.commons" % "commons-lang3" % "3.8.1", + "org.apache.commons" % "commons-lang3" % "3.9", {{#hasOAuthMethods}} "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", {{/hasOAuthMethods}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index eac0a4e1ba2..84b97f52c77 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -298,9 +298,9 @@ ${java.version} 1.8.3 1.5.21 - 3.14.0 + 3.14.2 2.8.5 - 3.8.1 + 3.9 {{#joda}} 2.9.9 {{/joda}} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 21590dd5662..229b37b48cc 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } dependencies { - compile 'io.swagger:swagger-annotations:1.5.21' - compile 'com.squareup.okhttp3:okhttp:3.13.1' - compile 'com.squareup.okhttp3:logging-interceptor:3.13.1' + compile 'io.swagger:swagger-annotations:1.5.22' + compile 'com.squareup.okhttp3:okhttp:3.14.2' + compile 'com.squareup.okhttp3:logging-interceptor:3.14.2' compile 'com.google.code.gson:gson:2.8.5' compile 'io.gsonfire:gson-fire:1.8.3' compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' compile 'org.threeten:threetenbp:1.3.5' testCompile 'junit:junit:4.12' } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index 6f9c7fa962b..ea38e20bc43 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -9,11 +9,11 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.21", - "com.squareup.okhttp3" % "okhttp" % "3.13.1", - "com.squareup.okhttp3" % "logging-interceptor" % "3.13.1", + "io.swagger" % "swagger-annotations" % "1.5.22", + "com.squareup.okhttp3" % "okhttp" % "3.14.2", + "com.squareup.okhttp3" % "logging-interceptor" % "3.14.2", "com.google.code.gson" % "gson" % "2.8.5", - "org.apache.commons" % "commons-lang3" % "3.8.1", + "org.apache.commons" % "commons-lang3" % "3.9", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", "org.threeten" % "threetenbp" % "1.3.5" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 0353247b020..30df3d74268 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -256,9 +256,9 @@ ${java.version} 1.8.3 1.5.21 - 3.14.0 + 3.14.2 2.8.5 - 3.8.1 + 3.9 1.3.8 1.0.0 4.12 diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 6f451be8dfd..0206cad9df4 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -98,13 +98,13 @@ if(hasProperty('target') && target == 'android') { } dependencies { - compile 'io.swagger:swagger-annotations:1.5.21' - compile 'com.squareup.okhttp3:okhttp:3.13.1' - compile 'com.squareup.okhttp3:logging-interceptor:3.13.1' + compile 'io.swagger:swagger-annotations:1.5.22' + compile 'com.squareup.okhttp3:okhttp:3.14.2' + compile 'com.squareup.okhttp3:logging-interceptor:3.14.2' compile 'com.google.code.gson:gson:2.8.5' compile 'io.gsonfire:gson-fire:1.8.3' compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' compile 'org.threeten:threetenbp:1.3.5' testCompile 'junit:junit:4.12' } diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index c5fea6a50ba..17e9ba0e59c 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -9,11 +9,11 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.21", - "com.squareup.okhttp3" % "okhttp" % "3.13.1", - "com.squareup.okhttp3" % "logging-interceptor" % "3.13.1", + "io.swagger" % "swagger-annotations" % "1.5.22", + "com.squareup.okhttp3" % "okhttp" % "3.14.2", + "com.squareup.okhttp3" % "logging-interceptor" % "3.14.2", "com.google.code.gson" % "gson" % "2.8.5", - "org.apache.commons" % "commons-lang3" % "3.8.1", + "org.apache.commons" % "commons-lang3" % "3.9", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", "org.threeten" % "threetenbp" % "1.3.5" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 8d13db0ce55..a716cc878d7 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -249,9 +249,9 @@ ${java.version} 1.8.3 1.5.21 - 3.14.0 + 3.14.2 2.8.5 - 3.8.1 + 3.9 1.3.8 1.0.0 4.12 From 6660b74247e83fecca93c5db63a552acbb9648a2 Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Thu, 6 Jun 2019 16:13:11 +0200 Subject: [PATCH 28/73] Add Q_DECLARE_METATYPE to the generated models and remove ref in signals (#3091) --- .../cpp-qt5-client/api-header.mustache | 4 +-- .../resources/cpp-qt5-client/enum.mustache | 3 ++ .../cpp-qt5-client/model-header.mustache | 2 ++ .../resources/cpp-qt5-client/object.mustache | 3 ++ .../cpp-qt5-qhttpengine-server/enum.mustache | 3 ++ .../model-header.mustache | 2 ++ .../object.mustache | 3 ++ .../cpp-qt5/.openapi-generator/VERSION | 2 +- .../petstore/cpp-qt5/client/OAIApiResponse.h | 2 ++ .../petstore/cpp-qt5/client/OAICategory.h | 2 ++ .../client/petstore/cpp-qt5/client/OAIEnum.h | 3 ++ .../petstore/cpp-qt5/client/OAIObject.h | 3 ++ .../client/petstore/cpp-qt5/client/OAIOrder.h | 2 ++ .../client/petstore/cpp-qt5/client/OAIPet.h | 2 ++ .../petstore/cpp-qt5/client/OAIPetApi.h | 32 +++++++++---------- .../petstore/cpp-qt5/client/OAIStoreApi.h | 16 +++++----- .../client/petstore/cpp-qt5/client/OAITag.h | 2 ++ .../client/petstore/cpp-qt5/client/OAIUser.h | 2 ++ .../petstore/cpp-qt5/client/OAIUserApi.h | 32 +++++++++---------- .../server/src/models/OAIApiResponse.h | 2 ++ .../server/src/models/OAICategory.h | 2 ++ .../server/src/models/OAIEnum.h | 3 ++ .../server/src/models/OAIObject.h | 3 ++ .../server/src/models/OAIOrder.h | 2 ++ .../server/src/models/OAIPet.h | 2 ++ .../server/src/models/OAITag.h | 2 ++ .../server/src/models/OAIUser.h | 2 ++ 27 files changed, 95 insertions(+), 43 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache index a5fc0432b52..b213f344a64 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache @@ -38,9 +38,9 @@ signals: {{/operation}}{{/operations}} {{#operations}}{{#operation}}void {{nickname}}SignalFull({{prefix}}HttpRequestWorker* worker{{#returnType}}, {{{returnType}}} summary{{/returnType}}); {{/operation}}{{/operations}} - {{#operations}}{{#operation}}void {{nickname}}SignalE({{#returnType}}{{{returnType}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, QString& error_str); + {{#operations}}{{#operation}}void {{nickname}}SignalE({{#returnType}}{{{returnType}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, QString error_str); {{/operation}}{{/operations}} - {{#operations}}{{#operation}}void {{nickname}}SignalEFull({{prefix}}HttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + {{#operations}}{{#operation}}void {{nickname}}SignalEFull({{prefix}}HttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); {{/operation}}{{/operations}} }; diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache index 6e10a390b36..2874ef8c712 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache @@ -4,6 +4,7 @@ #include #include +#include {{#cppNamespaceDeclarations}} namespace {{this}} { @@ -54,4 +55,6 @@ private : } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{prefix}}Enum) + #endif // {{prefix}}_ENUM_H diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache index 9cb73bdb4d0..38b42f401a2 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache @@ -74,6 +74,8 @@ private: } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{classname}}) + #endif // {{classname}}_H {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache index c0b2413118b..100670d1fc5 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache @@ -4,6 +4,7 @@ #include #include +#include {{#cppNamespaceDeclarations}} namespace {{this}} { @@ -56,4 +57,6 @@ private : } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{prefix}}Object) + #endif // {{prefix}}_OBJECT_H diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/enum.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/enum.mustache index 6e10a390b36..2874ef8c712 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/enum.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/enum.mustache @@ -4,6 +4,7 @@ #include #include +#include {{#cppNamespaceDeclarations}} namespace {{this}} { @@ -54,4 +55,6 @@ private : } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{prefix}}Enum) + #endif // {{prefix}}_ENUM_H diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-header.mustache index 9cb73bdb4d0..38b42f401a2 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-header.mustache @@ -74,6 +74,8 @@ private: } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{classname}}) + #endif // {{classname}}_H {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/object.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/object.mustache index c0b2413118b..100670d1fc5 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/object.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/object.mustache @@ -4,6 +4,7 @@ #include #include +#include {{#cppNamespaceDeclarations}} namespace {{this}} { @@ -56,4 +57,6 @@ private : } {{/cppNamespaceDeclarations}} +Q_DECLARE_METATYPE({{#cppNamespaceDeclarations}}{{this}}::{{/cppNamespaceDeclarations}}{{prefix}}Object) + #endif // {{prefix}}_OBJECT_H diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index 06b5019af3f..d96260ba335 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h b/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h index b28590dd38a..2fe8209ac10 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h +++ b/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h @@ -76,4 +76,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIApiResponse) + #endif // OAIApiResponse_H diff --git a/samples/client/petstore/cpp-qt5/client/OAICategory.h b/samples/client/petstore/cpp-qt5/client/OAICategory.h index 0586cb3d4e1..129d9748576 100644 --- a/samples/client/petstore/cpp-qt5/client/OAICategory.h +++ b/samples/client/petstore/cpp-qt5/client/OAICategory.h @@ -68,4 +68,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAICategory) + #endif // OAICategory_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIEnum.h b/samples/client/petstore/cpp-qt5/client/OAIEnum.h index 42daef17ac1..a5e619960fb 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIEnum.h +++ b/samples/client/petstore/cpp-qt5/client/OAIEnum.h @@ -15,6 +15,7 @@ #include #include +#include namespace OpenAPI { @@ -61,4 +62,6 @@ private : } +Q_DECLARE_METATYPE(OpenAPI::OAIEnum) + #endif // OAI_ENUM_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIObject.h b/samples/client/petstore/cpp-qt5/client/OAIObject.h index 9cc379894ca..babc1e64fbb 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIObject.h +++ b/samples/client/petstore/cpp-qt5/client/OAIObject.h @@ -15,6 +15,7 @@ #include #include +#include namespace OpenAPI { @@ -63,4 +64,6 @@ private : } +Q_DECLARE_METATYPE(OpenAPI::OAIObject) + #endif // OAI_OBJECT_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIOrder.h b/samples/client/petstore/cpp-qt5/client/OAIOrder.h index eb9edd329e3..c9b006d3632 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIOrder.h +++ b/samples/client/petstore/cpp-qt5/client/OAIOrder.h @@ -101,4 +101,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIOrder) + #endif // OAIOrder_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIPet.h b/samples/client/petstore/cpp-qt5/client/OAIPet.h index ffeb4ba5ad7..6bec604d216 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPet.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPet.h @@ -103,4 +103,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIPet) + #endif // OAIPet_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h index 336b973bdb6..05881f65fc6 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h @@ -77,23 +77,23 @@ signals: void updatePetWithFormSignalFull(OAIHttpRequestWorker* worker); void uploadFileSignalFull(OAIHttpRequestWorker* worker, OAIApiResponse summary); - void addPetSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void deletePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void findPetsByStatusSignalE(QList summary, QNetworkReply::NetworkError error_type, QString& error_str); - void findPetsByTagsSignalE(QList summary, QNetworkReply::NetworkError error_type, QString& error_str); - void getPetByIdSignalE(OAIPet summary, QNetworkReply::NetworkError error_type, QString& error_str); - void updatePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void updatePetWithFormSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void uploadFileSignalE(OAIApiResponse summary, QNetworkReply::NetworkError error_type, QString& error_str); + void addPetSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void deletePetSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void findPetsByStatusSignalE(QList summary, QNetworkReply::NetworkError error_type, QString error_str); + void findPetsByTagsSignalE(QList summary, QNetworkReply::NetworkError error_type, QString error_str); + void getPetByIdSignalE(OAIPet summary, QNetworkReply::NetworkError error_type, QString error_str); + void updatePetSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void updatePetWithFormSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void uploadFileSignalE(OAIApiResponse summary, QNetworkReply::NetworkError error_type, QString error_str); - void addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void uploadFileSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void uploadFileSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); }; diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h index 62bba015a36..6026045168d 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h @@ -60,15 +60,15 @@ signals: void getOrderByIdSignalFull(OAIHttpRequestWorker* worker, OAIOrder summary); void placeOrderSignalFull(OAIHttpRequestWorker* worker, OAIOrder summary); - void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void getInventorySignalE(QMap summary, QNetworkReply::NetworkError error_type, QString& error_str); - void getOrderByIdSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString& error_str); - void placeOrderSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString& error_str); + void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void getInventorySignalE(QMap summary, QNetworkReply::NetworkError error_type, QString error_str); + void getOrderByIdSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString error_str); + void placeOrderSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString error_str); - void deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void placeOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void placeOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); }; diff --git a/samples/client/petstore/cpp-qt5/client/OAITag.h b/samples/client/petstore/cpp-qt5/client/OAITag.h index 2a497cf1bd7..497a021f085 100644 --- a/samples/client/petstore/cpp-qt5/client/OAITag.h +++ b/samples/client/petstore/cpp-qt5/client/OAITag.h @@ -68,4 +68,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAITag) + #endif // OAITag_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIUser.h b/samples/client/petstore/cpp-qt5/client/OAIUser.h index d388f62a29b..556de322584 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUser.h +++ b/samples/client/petstore/cpp-qt5/client/OAIUser.h @@ -116,4 +116,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIUser) + #endif // OAIUser_H diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h index 1f858bad947..178b1804a98 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h @@ -76,23 +76,23 @@ signals: void logoutUserSignalFull(OAIHttpRequestWorker* worker); void updateUserSignalFull(OAIHttpRequestWorker* worker); - void createUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void createUsersWithListInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void deleteUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void getUserByNameSignalE(OAIUser summary, QNetworkReply::NetworkError error_type, QString& error_str); - void loginUserSignalE(QString summary, QNetworkReply::NetworkError error_type, QString& error_str); - void logoutUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str); - void updateUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str); + void createUserSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void createUsersWithListInputSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void deleteUserSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void getUserByNameSignalE(OAIUser summary, QNetworkReply::NetworkError error_type, QString error_str); + void loginUserSignalE(QString summary, QNetworkReply::NetworkError error_type, QString error_str); + void logoutUserSignalE(QNetworkReply::NetworkError error_type, QString error_str); + void updateUserSignalE(QNetworkReply::NetworkError error_type, QString error_str); - void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); - void updateUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); + void updateUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str); }; diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIApiResponse.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIApiResponse.h index b28590dd38a..2fe8209ac10 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIApiResponse.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIApiResponse.h @@ -76,4 +76,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIApiResponse) + #endif // OAIApiResponse_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAICategory.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAICategory.h index 0586cb3d4e1..129d9748576 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAICategory.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAICategory.h @@ -68,4 +68,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAICategory) + #endif // OAICategory_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIEnum.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIEnum.h index 42daef17ac1..a5e619960fb 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIEnum.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIEnum.h @@ -15,6 +15,7 @@ #include #include +#include namespace OpenAPI { @@ -61,4 +62,6 @@ private : } +Q_DECLARE_METATYPE(OpenAPI::OAIEnum) + #endif // OAI_ENUM_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIObject.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIObject.h index 9cc379894ca..babc1e64fbb 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIObject.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIObject.h @@ -15,6 +15,7 @@ #include #include +#include namespace OpenAPI { @@ -63,4 +64,6 @@ private : } +Q_DECLARE_METATYPE(OpenAPI::OAIObject) + #endif // OAI_OBJECT_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIOrder.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIOrder.h index eb9edd329e3..c9b006d3632 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIOrder.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIOrder.h @@ -101,4 +101,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIOrder) + #endif // OAIOrder_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIPet.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIPet.h index ffeb4ba5ad7..6bec604d216 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIPet.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIPet.h @@ -103,4 +103,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIPet) + #endif // OAIPet_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAITag.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAITag.h index 2a497cf1bd7..497a021f085 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAITag.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAITag.h @@ -68,4 +68,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAITag) + #endif // OAITag_H diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIUser.h b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIUser.h index d388f62a29b..556de322584 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIUser.h +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/server/src/models/OAIUser.h @@ -116,4 +116,6 @@ private: } +Q_DECLARE_METATYPE(OpenAPI::OAIUser) + #endif // OAIUser_H From cd85210835074fa84a6c25051db517fb34608cb1 Mon Sep 17 00:00:00 2001 From: Ken Rosaka Date: Thu, 6 Jun 2019 16:58:31 +0200 Subject: [PATCH 29/73] [typescript-fetch] add bearer token support (#3097) * [typescript-fetch] added Bearer token support * [typescript-fetch] executed ./bin/openapi3/typescript-fetch-petstore-all.sh * [typescript-fetch] executed ./bin/typescript-fetch-petstore-all.sh --- .../src/main/resources/typescript-fetch/apis.mustache | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 6a1967c7c86..976fce56236 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -107,10 +107,21 @@ export class {{classname}} extends runtime.BaseAPI { {{/headerParams}} {{#authMethods}} {{#isBasic}} + {{#isBasicBasic}} if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + {{/isBasicBasic}} + {{#isBasicBearer}} + if (this.configuration && (this.configuration.accessToken || this.configuration.apiKey)) { + const token = this.configuration.accessToken || this.configuration.apiKey; + const tokenString = typeof token === 'function' ? token("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]) : token; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + {{/isBasicBearer}} {{/isBasic}} {{#isApiKey}} {{#isKeyInHeader}} From 5de7f09ae93d046a887f06e68b8e9728201ac2ff Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 6 Jun 2019 15:09:26 -0400 Subject: [PATCH 30/73] Gradle sample on travis (#3114) * Explicitly ignore .bak in gradle samples directory * Add gradle wrapper to local-spec sample, make .java-version (jenv local) be less machine specific * Include gradle plugin samples in travis build --- .java-version | 2 +- .travis.yml | 3 + .../samples/.gitignore | 1 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 56177 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + .../samples/local-spec/gradlew | 172 ++++++++++++++++++ .../samples/local-spec/gradlew.bat | 84 +++++++++ 7 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator-gradle-plugin/samples/.gitignore create mode 100644 modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.jar create mode 100644 modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.properties create mode 100755 modules/openapi-generator-gradle-plugin/samples/local-spec/gradlew create mode 100644 modules/openapi-generator-gradle-plugin/samples/local-spec/gradlew.bat diff --git a/.java-version b/.java-version index 2cb7d300212..6259340971b 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -oracle64-1.8.0.152 \ No newline at end of file +1.8 diff --git a/.travis.yml b/.travis.yml index 3db40c94ca5..f47f448b874 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,6 +134,9 @@ script: # test maven plugin - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml + # test gradle plugin + - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) + - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate) after_success: # push to maven repo - if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then diff --git a/modules/openapi-generator-gradle-plugin/samples/.gitignore b/modules/openapi-generator-gradle-plugin/samples/.gitignore new file mode 100644 index 00000000000..0f9d8a485dc --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/samples/.gitignore @@ -0,0 +1 @@ +.bak/ \ No newline at end of file diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.jar b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..29953ea141f55e3b8fc691d31b5ca8816d89fa87 GIT binary patch literal 56177 zcmagFV{~WVwk?_pE4FRhwr$(CRk3Z`c2coz+fFL^#m=jD_df5v|GoR1_hGCxKaAPt z?5)i;2YO!$(jcHHKtMl#0s#RD{xu*V;Q#dm0)qVemK9YIq?MEtqXz*}_=jUJ`nb5z zUkCNS_ILXK>nJNICn+YXtU@O%b}u_MDI-lwHxDaKOEoh!+oZ&>#JqQWH$^)pIW0R) zElKkO>LS!6^{7~jvK^hY^r+ZqY@j9c3=``N6W|1J`tiT5`FENBXLF!`$M#O<|Hr=m zzdq3a_Az%dG_f)LA6=3E>FVxe=-^=L^nXkt;*h0g0|Nr0hXMkk{m)Z`?Co8gUH;CO zHMF!-b}@8vF?FIdwlQ>ej#1NgUlc?5LYq`G68Sj-$su4QLEuKmR+5|=T>6WUWDgWe zxE!*C;%NhMOo?hz$E$blz1#Poh2GazA4f~>{M`DT`i=e#G$*Bc4?Fwhs9KG=iTU1_ znfp#3-rpN&56JH)Q82UMm6+B@cJwQOmm^!avj=B5n8}b6-%orx(1!3RBhL~LO~Q_) z08-2}(`c{;%({toq#^5eD&g&LhE&rdu6Xo6?HW)dn#nW17y(4VDNRo}2Tz*KZeOJ=Gqg{aO>;;JnlqFiMVA+byk#lYskJf)bJ=Q) z8Z9b3bI9$rE-t9r5=Uhh={6sj%B;jj)M&G`lVH9Y*O*|2Qx{g3u&tETV~m)LwKEm7 zT}U%CvR7RA&X0<;L?i24Vi<+zU^$IbDbi|324Qk)pPH={pEwumUun5Zs*asDRPM8b z5ubzmua81PTymsv=oD9C!wsc%ZNy20pg(ci)Tela^>YG-p}A()CDp}KyJLp7^&ZEd z**kfem_(nl!mG9(IbD|-i?9@BbLa{R>y-AA+MIlrS7eH44qYo%1exzFTa1p>+K&yc z<5=g{WTI8(vJWa!Sw-MdwH~r;vJRyX}8pFLp7fEWHIe2J+N;mJkW0t*{qs_wO51nKyo;a zyP|YZy5it}{-S^*v_4Sp4{INs`_%Apd&OFg^iaJ;-~2_VAN?f}sM9mX+cSn-j1HMPHM$PPC&s>99#34a9HUk3;Bwf6BZG%oLAS*cq*)yqNs=7}gqn^ZKvuW^kN+x2qym zM_7hv4BiTDMj#<>Ax_0g^rmq=`4NbKlG1@CWh%_u&rx`9Xrlr0lDw zf}|C`$ey5IS3?w^Y#iZ!*#khIx8Vm+0msFN>$B~cD~;%#iqV|mP#EHY@t_VV77_@I zK@x`ixdjvu=j^jTc%;iiW`jIptKpX09b9LV{(vPu1o0LcG)50H{Wg{1_)cPq9rH+d zP?lSPp;sh%n^>~=&T533yPxuXFcTNvT&eGl9NSt8qTD5{5Z`zt1|RV%1_>;odK2QV zT=PT^2>(9iMtVP==YMXX#=dxN{~Z>=I$ob}1m(es=ae^3`m5f}C~_YbB#3c1Bw&3lLRp(V)^ZestV)Xe{Yk3^ijWw@xM16StLG)O zvCxht23Raf)|5^E3Mjt+b+*U7O%RM$fX*bu|H5E{V^?l_z6bJ8jH^y2J@9{nu)yCK z$MXM!QNhXH!&A`J#lqCi#nRZ&#s1&1CPi7-9!U^|7bJPu)Y4J4enraGTDP)ssm_9d z4Aj_2NG8b&d9jRA#$ehl3??X9-{c^vXH5**{}=y+2ShoNl-71whx;GS=a~*?bN{cm zCy+j0p4J4h{?MSnkQ5ZV4UJ(fs7p#3tmo7i*sWH?FmuDj0o>4|CIYAj=g@ZbEmMgl z6J-XPr67r}Ke$)WkD)hVD2|tn{e!x-z)koN$iH!2AUD0#&3&3g8mHKMr%iUusrnOd>R?l~q-#lr2Ki zb)XkR$bT5#or!s~fN5(K@`VL)5=CrQDiLQE;KrxvC78a+BXkAL$!KCJ3m1g%n4o4Z z@+*qk1bK{*U#?bZ$>8-Syw@3dG~GF=)-`%bU56v^)3b7`EW+tkkrSA?osI4}*~X?i zWO^kL8*xM{x-Ix}u=$wq8=Nl5bzHhAT)N&dg{HA$_n!ys67s~R1r7)(4i^ZB@P9sF z|N4Y-G$9R8Rz1J`EL)hhVuCdsX)!cl)`ZIXF>D+$NazAcg3$y)N1g~`ibIxbdAOtE zb2!M7*~GEENaTc+x#hOFY_n0y3`1mnNGu&QTmNh~%X$^tdi_4%ZjQk{_O^$=mcm|! z%xAxO*?qsc`IPrL?xgPmHAvEdG5A>rJ{Lo;-uQf3`5I~EC(PPgq2@n1Wc}lV&2O~t z1{|U92JH6zB?#yX!M`}Ojw+L1Z8{Is0pe?^ZxzOe_ZQcPCXnEVCy;+Yugc`E!nA(I z%O%hk_^!(IZso}h@Qe3{Fwl3nztZ$&ipk?FSr2Mo@18#FM^=PCyaDZ35%7gPt-%35 z$P4|4J8DnNH{_l_z@JQPY07;`(!M-{9j2=y__fxmbp59aaV4d)Y=@N(iUgGm0K!28 zMp;Ig3KkNy9z>t5BvQWtMY82$c}}d6;1`IJ^~At0(2|*C(NG#SWoa2rs|hBM8+HW(P5TMki>=KRlE+dThLZkdG387dOSY2X zWHr}5+)x`9lO#fSD1v&fL&wqU@b&THBot8Z?V;E4ZA$y42=95pP3iW)%$=UW_xC3; zB6t^^vl~v5csW5=aiZLZt9JLP*ph4~Q*l96@9!R8?{~a#m)tdNxFzQaeCgYIBA1+o+4UMmZoUO9z?Owi@Z=9VeCI6_ z7DV)=*v<&VRY|hWLdn^Ps=+L2+#Yg9#5mHcf*s8xp4nbrtT-=ju6wO976JQ(L+r=)?sfT?!(-}k!y?)>5c}?GB-zU zS*r8)PVsD;^aVhf^57tq(S%&9a;}F}^{ir}y0W|0G_=U9#W6y2FV}8NTpXJX*ivt{ zwQLhX0sSB8J?bmh(eUKq#AVmTO{VudFZpsIn-|i-8WlsexQ<;@WNn)OF=UpDJ7BI= z%-95NYqOY#)S?LIW-+rfw84@6Me}ya4*ltE*R^fy&W7?rEggZBxN@BR6=0!WH%4x0 zXg7=Ws|9Em`0pAt8k0cyQlr+>htn8GYs)+o>)IIf)p+yR`>lvz>5xFt(ep7>no4?4 zA%SUJ=L2D=;wq*f8WFl|&57Apa1;cT?b?bfJc8h&vkBvm%#ypP{=`6RL#Tf-dCq`;$!eR%>29EqpIkV*9 zEZl_>P3&}hY7)~q6UYw?*cBCsuPi$TU zRe}A|5nl7L_#e`8W0Hcpd~NWjAaV#3ngl$CoE3dz!= z?$3`dPgn5I+Q8 z@Bk>MqB7;kQqnDK=buPc+DsEDP-S;8#I(_z!*u&%_%nqI3+srxxsf9-Qg6%$l$Rtl zK2Wn-OtsBE5<1d}1Hl!l-r8eqD+{%b5$jfxQZw`2%)f+_^HMfbWyW4@j!^9M({>e; zeqCfR5b?^xh7MhHfmDvoXm8Wq;Jl2RU;jY*+a&o*H02$`#5HsG9#HOR4{g9 z#2mgNt%ep|IWrmctj=e%3xV&o^@8%OrR6io()6^sr!nQ3WIyQ3)0Mn}w}p^&t*V0G z03mUjJXbSCUG!o#-x*;_v>N8n-`yh1%Dp(1P)vz$^`oevMVh?u3}mgh}Qr(jhy;-09o$EB6jjWR!2F&xz^66M!F z-g}JBWLcw=j&Vb>xW#PQ3vICRT_UZ@wllScxk@ZQe&h-y)4B5kUJptVO%U-Ff3Hka zEyLldFsaM5E5`k>m}||+u`11;)tG@FL6TGzoF`A{R}?RZ@Ba!AS(tqAf{a_wtnlv>p|+&EEs(x%d4eq*RQ;Pq;) za9*J(n&C2dmFcNXb`WJi&XPu>t+m)Qp}c;$^35-Fj6soilnd4=b;ZePF27IdjE6PZ zvx{|&5tApKU2=ItX*ilhDx-a2SqQVjcV40Yn})Kaz$=$+3ZK~XXtrzTlKbR7C9)?2 zJ<^|JKX!eG231Oo=94kd1jC49mqE6G0x!-Qd}UkEm)API zKEemM1b4u_4LRq9IGE3e8XJq0@;%BCr|;BYW_`3R2H86QfSzzDg8eA>L)|?UEAc$< zaHY&MN|V#{!8}cryR+ygu!HI#$^;fxT|rmDE0zx|;V!ER3yW@09`p#zt}4S?Eoqx8 zk3FxI12)>eTd+c0%38kZdNwB`{bXeqO;vNI>F-l3O%-{`<3pNVdCdwqYsvso!Fw($ z`@$1&U=XH|%FFs>nq#e0tnS_jHVZLaEmnK#Ci==~Q!%Vr?{K0b$dSu(S!2VjZ}316b_I5Uk*L!8cJd>6W67+#0>-1P0i{eI%`C(_FkwRC zm}5eHEb0v^w3Wkqv#biSHXBG4yPC=^E!@hV8J5*JYf73=BqO!Ps#sP0fx~&C9PMN= z+V%$50uI|KE4^LCUXI74-qw$aRG&3kN-aOzVpRS1AX(Ua;Ewy>SlDn@lV(<^W?t-x z%K2iVK+;lG_~XF&Glk7w4<=Z!@-qDLc7)$q!>H^AU{s6e7krRmr!AZLf?8~$rRuP) zc$@c*PhIA^Lsu;uR{^x2)9nvsm}-67I`+iFZkhfNASUD>*LqxD=sAtpn{zY0xMxFp z4@USzYjMULeKc1lBe*8vxJDGNiSTtq_b#zd+Vzdc%$~+xf0;s|LR{F$YKe7YJVR$U}jKOo6=D+|6vnryopFbmNXEo-~I z*nm(LHmEGwkB%h%tXF4r|5h2p%VnRLx5rRsFpPR|e)*)C`WG-Iz94xsO&>1k8g6W? zG6#40`>I=B^scgmt_6!uU}=b3HgE@Jhj-X3jP!w-y>81ZD*~9C6ZRN4vlAFJQwK&l zP9&CP4%l-eN@0>Ihb_UWtp2kcPnh+L(fFJfQLc0`qqFbCkzr`8y2%{@RNrQbx*;tj zKtW!BWJFR$9(9^!Y%I%@3p?0zX#;(G?}sRkL{U>2rH4Wc{3{0@MV+vEaFcD18KIy% z7OyQTp?-N_)i%g+O#h(eLt_3ZDo)2l4PwjVS#=FzUNVvW{kFijz-@Y9-66fQL=xoc zXfLAC8<-!nnpM87K#eT;D^sW^HL5kS))Qj`kxT`%OewTXS(FT^X~VlkkZJJ?3*R8J zR>c>6)9K+9lg_a7!#<`KC$oEk-!~2N)@V}eq4O2xP)~N-lc}vH8qSe7tmQ3p@$pPde;Xk30uHYJ+VXeA@=yordN?7_ zpGsTlLlI{(qgtjOIlbx8DI{Nczj!*I>_-3ahzG;Kt&~8G_4G8qqF6IDn&g+zo>^L< z@zeVTB`{B9S*@M2_7@_(iHTQMCdC3zDi3_pE2!Lsg`K)$SiZj2X>=b2U#h^?x0j$Y zYuRf9vtRT~dxvF2Onn>?FfYPan1uc&eKyfBOK(|g7}E)t7}?{4GI%_KoO#8;_{N6! zDAqx7%0J`PG@O{(_)9yAFF!7l zWy1|Utdlc)^&J3OKhPI+S|Fc3R7vMVdN?PgoiQzo200oGpcy;TjSQ^e$a}Kh&C~xm zsG!Pqpqt5T`1`X$yas7{1hk?-r(Um>%&@?P2#NMETeQYhvk~nZW#BApGOLS2hdH)d zn!sf)7DotO?tRXBE#UpfKk-s}6%TfS0|7#>Rgk z%Np7ln*SH#6tzufY<0|UT+M}zJ1)1ap_cE@;QZp)+e-;k24 z3lZG_EA?tM$Eg|x3CK3!k`T7!*0}{fh8#=t^2EJ>TTo`6!CUm(HFUl7fFIB9Zlt4a z!4=|s-ZSn!@6Yc&+r1w*?*2fxKX>Hz2(vBwgE*>E=`A?Y1W-;{d2$4B%$NFAI?v5e zmYT{blxWeHn2J(0Vbz%FDz9~baqE#)R2TMG24xMZjCLcPfc1mR?5H4L%GnMR7ua{B zCu=nN(vV)5dJ_B80WBCy`tJ#YH6GyltGBSQvsN#q0;6XU1&60$&PC$0r}FUdr@1I+ zINcU{Ow6t4Qzmyk=A6u*z_!A*$^hBXJeKQ96bnF2qD$46hN!?1C|io|<_u@g16@Wd z(Fg?1=p8)dkWz<^ml6Tj5gO$hpB1N5msV!#PB5pfwCOBu`cv__=7kQq*r#Tc7E@6z zdr}5qs*slXK39`Yn%?=rslQgOTH0x?@z|h%fI5Y7kQ{X00BcL#8Jae4Dc9M zR%ySU5qODGnM;n#&up^M+PIddhxizA9@V%@0QQMY#1n z%{E8NS=?1?d((9Bk_ZC|{^(juH!;Mih{pTo&tu<^$Twk1aF;#W$;gxw!3g-zy(iiM z^+8nFS<9DJfk4+}(_Nza@Ukw}!*svpqJ)Nkh^sd%oHva}7+y)|5_aZ=JOZ6jnoYHQ zE2$FAnQ2mILoK*+6&(O9=%_tfQCYO%#(4t_5xP~W%Yw7Y4wcK|Ynd#YB3`rxli+9(uIQcRuQW_2EFA@J_ae$<%!EbI9c5htL`8>3Myy)@^=J)4p@nB2*&sWCOmwH zwYi;-9HOboaw0ov-WBk89LqGY!{)>8KxU1g%%wMq9h@Aie^42!f9`?o32T4;!dly? z(N?67=yo%jNp;oIVu7;esQ$wG=Vr+`rqPB&RLzr@@v`H-KK6wTa=8b<;$yE1lQGy?A1;JX|2hSzg9`a{;-5oh|=bFSzv&b zst=xa%|xW;id+~(8Fj7hS5BPVD(@(`3t@HUu))Q{0ZrqE2Jg zm6Gv~A*$A7Q#MU25zXD)iEUbLML1b++l4fJvP^PYOSK~^;n$EzdTE(zW3F1OpKztF zharBT_Ym7Y%lt#=p2&$3gs=g4xkM8A%Cbm*xR)9BnI}5=Oxp4GEF*bjFF^87xkP4L z;StW)zkX!yzz5^Q4HfEicKi{8elkFQx|0TH5Mtzsln>TN2*5Nypl(7sj_UxoN|KSyOP0g{L+vTbHlOyIEJ@ zjfku4x;`_FLga2P{FJLrgpIt;A-ukDuPsuW4#ApWE7|&i85Frv()~gOM`v`YVsF0c zx|J0}YRtNo7DIl>N&+%c(o1^C?%>Zf5<-<(yVcj~p88d;@=(jtox_$Af#v4%=g4oD ziv4MKh%Uf}NHP$SqF6mZj>}_HfC-@2>S~<3qOIu*R^%7;`VGN{ay@0(xmKM^5g9H4 zaq4>^38z|jszHqa)d>j#7Ccxz$*DGEG9PtB(d31?a;2$u>bY`CigPsg$zpDTW?zKg z+Ye-wtTjYHi#Hs`5$aDA=5Gl4J>p1Xs3PJZWWgax9~(h;G{hDip2I=+bW1ng3BrMC za72TsJR+;*0fSYuVnHsA;BnH5x8yc5Z=Bno0CUc14%hAC=b4*&iEzgAB!L= z`hhC!k&WLZPFYJY4X1pELFsAnJ!}Y@cW6I~)S53UOve!$ECM^q8ZE{e{o}hoflqqy z1*ubPGaeqs1&92?_Z|pDIR*gw{Tf^KJV)G*JLdzktzF;w@W<(X2;}XY0Mlzs8J?$L z$HVp2*+(o8?*n6cqx3_k6 z_&05@yeYRSfWQk)=oa0v#3BHNBBd>{fP`)#O^*^0_#?tW5jf!vCBp<2W+WCTEYeSv z9x0#bu>tB9M0W%_p^S7&BHa{2hfNL5eUUq4dFsGvgW}38M#j+AdeC5Q0pg^g zVzX3vrRi^YI(~*BW_Jv^o?2;5SRY4UiQy4mO}td`T?9Cn>K+dHL)+V&T+H2e9cz36 z3w!e<82_a0Abraxx8?L{a%&###&w=O83@y6xz0Yz{8$Wp? zpRHDDFRKHe+@^Y7*&@z$+aA;ksdi7xdV}c(i1><3F00dIA(v8LW(^O*HX)5kc#IRw zqF;w9l3uQK5us~@YEWk+?*7*(7!*}^OBGk+&H=rcQ31wWiI7@}vU8P`@-3x85BGy25yPLiFcZ9Ix z&g>o*aIM5;Y#3A-9~8-WmTezK5V~98kP{j^ZZ|WDa{ZX{nzq*qy3?Lw?|D4hN>kzB|OT6-b>reho-)KPiAg^M6 z^V7T^-LL<$VK9OM_AsP21hWykSObS?gk4L=NQ@Wevk9nXUWk~lu4S>zqFX4H{cWCE z8{eF=%>j8Xll5o2)cdA;Gx}>chr}9ZPv2kT=8x~q=B4i_@+{8-#jh5lsK}aj>0zxd zIl8*E$!(}Vii%YIB_2V6>|Ove`W+f~dqsd+*K|~yHvkUoMukz^XnLgcXunf+E9#k| zU0yT>#IG*W)+6ue)vv=xfDT{9k$;BDL!duM&qpGVui6NbuaKa`h?7i(W~4YUu2O@t zV=FEUMaC0QAIZg2c%Yb_WFI$vZ0z*fj-GdWkVMt>lDy@w)qhCE7c^Vx0i34{@bnQJ zMhB3B>8stMqGsKyqUsN>cE5xczm}r!D&5+?zTtYl6!U!4nmiPv?E)Pe$l(A@E1T7dD)Px*$)#pB(Mccz%i%RKcuskizkH& zM^+m#S#sK2?f8;gH5BaXCfyI z=Mo5s;fHbBh@$hNB(!H7;BeU>q)!Z^jaCks!;!d2W7 zv{8hf2+z&R2zAS%9Tu1(dKX~*{rOT|yjLsg6Bx_1@bTy#0{R-?J}i!IObk@Tql*9w zzz?AV8Z)xiNz}%2zKEIZ6UoVuri+AT8vVZBot|VA=8|~z-!4-N@}@Bfq$~F4`^LO) z?K#tKQ7_DzB_Z%wfZ*v)GUASW0eOy}aw!V^?FkG?fcp7dg4lvM$f-%IEnIAQEx7dJ zjeQdmuCCRe*a?o*QD#kfEAsvNYaVL>s2?e^Vg|OK!_F0B;_5TuXF?H0Pn&9-qO85; zmDYsjdxHi?{3_Il0sibc3V2IAP74l2a#&X0f6EdwEb_ zCHuQC@Q$(2$$0W&FuxtPzZJ`{zM{%lcw)>^c&ZZe3{GU#x8ZmhC${E>XcP+}<0zKn z`!He406MT}e^f*=$WZoCHO>xt?AE)A6xB*54a+>4&{!W0*`Q93ibK&4*}N2!PdjOa z8?@WRHjyEXqa(1=JSuglKreLS>x>SiHMYiH7)EW4L&&HyJUh+>opC2p&vz)-)hLZx z$xgyMGH)3R3o|Ptu(n3@oM8uX^(hq+q=`-aC1BlQp2I$eKj1tJuqDUh( zDkDsZ^23iaH3;bn7U>k)AD&%$u4G55$I=scldY;vFs+SJmR6mE&8&=C%8}PL3Pz1e zQ8C!gVj0PV2ym8>BOJZh9EPGH7B0X&x$=hK?E>1-@+vYaj!Grfw5!*_$pLHotuVn@tVzDd6inT? zVRbufqa&mdvhz=1^!A^mshoYUOn2TjV3fhuz*2mdNqBX{nUrI%6StBzCpt&mPbl5F zvw_Cj$en(bhzY^UOim8~W)nxy)zWKuy$oSS;qRzt zGB#g+Xbic&C4Zo0-$ZvuXA7-ka&rf8*Kn)MO$ggardqZ=0LyU3(T};RwH9seBsgBc z$6-BI}BN*-yID>S62)&!|-r4rDIfw zn19#SN$JA4xngbeGE4txEV5qszS(EnvzvVfh08c;IO5>d^UpU#m~24P{^7AVO7JAS zXZ6RdAp5-_yL;j@AlsMp8N&HVwHV>9DfH4c81xmzCzVZ3fXAQ+=RnI0B<;YfHZuqa zH|&*09Aj{ZsDVS+5jB{XEkd)PR5JO&0q`JK;9>!6T7%b14rbcBtNiw}OPI9h?u#%^ z{#w3(2+S5shq7N4smmX#Ns_ayWl5jP^7M^2hVn&gl1y>C@BvQ$Ah*^_cgzF=iG z39Lr1x6KpDuS0W9tH%r}N=vnOgCk^E`0I|6X8%H)E5a1{r;Ooi{4RF@DssCC6!o~J zDpXb3^$sNds;bMqm6n#cJ8M2#j7A_?^(fYr0QA$GrTQV$n;9;Qkh~$WT|e1Yq}o;h zEk_Ww1Kf4%%?R!{!c91CSJ*2fr<8xHF)(7!_%EKZ*$KsDg&ALtP>P19z99^whu6ms z^F(P(PMjgfp#lXpZt(?04@z5J{`JHow@|N~KFN{8WLok3u$zxk=`cv$?EaF;?XU6*mT&GJ_`>Ma3MgI?U07^UN9N3Fe37d_Q@ z-K2Z>R)Wso&W%+APtaorr8H4bEP6FH4p7!F)=w=jfs{I20h3Vck4N=Y(~XC1-kIAd zy5x^LnlUYu)zXH(P}oXq?U#Bgp{4bf<(9x%vx;I>b+jS0&jtaYZ?(5Pfi=RUF`r58 zPQbIAX=tIC=*W@cR#+`*i)vPR-|p^(ORBp*UB+Ei6;0-CF@No`$y^MQ8{I(2`CNzye&0=Q^qYjw%}y zZk$+l#(MVftcugPvORxL+@7k(4XzR~ti3!@toSymCaI5}vo}ri9vdMZa)_TzEsCB^ zLAkET9Z0E*!fv>)%Z#tIxUhYw%QRE2;98~{O{W%9rXI<-_{I=y%%qwb%iNi=+!>Qf zK(HtaA|ze7afz`txb*_lkb0u$(ijK97^%;axfg0J0#7NIs61X5HEQ=zq4Zv>VMu>$ z2~v10H$A`~ZB}6dK%@F2UgC9sMoSgd@q}!<7mY~z+C3H5tBW}xeKN&KIXP_?N=ed~ zFv^}TDs}$Eb(JDOQ;H7ZUNrivfKib({Ix|*X$AZawRj(j{g<^=Frb3--rEyv z6xZd8uQqr-K=@KuDrN*E`gfQ`mxKf_5w*!nJcKf(S=suW%7rFjx+s2> zi#9ouh%>Rl2Ch+}ie_3lybm-tkHbTSJILVkcjl~h@Q}u~N~u`668%(zQ9>9i7C#5$ zx{s(#H|$tR^Isy#9Q9XsY<1MHT-F7OyLQJdGEvzDtP8S6C2h^jU=C=>>*UM{Ijd1dNe~wr z+2V*%W+RpfrPRjc)E0!+gT^{TN*3CN1C}}95a1F4XwxwLS9A^ttvzq%M4HJ+$y?4I z`yKD+?Z?h%Uf%Z`@?6k*M1Nf&Cz(V^NgBygk_J*oqqX3`NcK^Lkg7rqVHhw@z>zv- z%X}I!;8!nQ^_RTCBos2Bl+SVD9Fa##0@yip*+{E)wPQxv$$hRA!c&QWLoLFG2$U zYDR(@dUI1w4`Zyv?%zhHwZ){BfpG(vq}!Y;6q(jI@xnbko7P(N3{;tEgWTp9X{GP3 z8Eh9fNgec!7)M?OE!e8wyw>Gtn}5IO|5~^)!F(*STx1KCRz?o>7RZbDJd>Dg##z!; zo}rG4d{6=c-pIFA4k|&90#~oqAIhkOeb6poAgkn^-%j66XICvZs}RA0IXj6u*rG#zR07|(JUt8bvX^$La@O#!;a) ziCtKmEDwgAp}1=mhU`6(nvaz%KG1c@?X8FbZK*QU*6mn${cWs15OGLA-803ZO-?=7 zah4u9yUPx8iI^Q~Bc7;DSaf@k0S@+p?!2(*$4}3v|?Nx~swkjwTmia)C!dVfht zzo1E-1vmsM(nC);|(Kp4yaPusRKec@I0b0J(n9k*tg>E zC-M)?LH%OLASR6}G-`?oyQ%KJ3(+KfS;-Rndh?ku8frhoZdKm<$0bj0e4I_lCX`7S#zIYBZ*s)i1dsNx5wX6~IDx z(Oz=(Bo4-fnzObxxiw~v`H}FuI<4v9nlM*7QryonD7aNenD4Iivwde7(TYd34Y|)E zZ;|i*$m}OZEsYWN9Xn+cJ?tl$HcJt&tK#m5)0pE@XV}gwcJV80^2W;>rR>%lUXzzrnFRHk2?0nQST``j1g;Rr}E@4Bo##q3%WJ3kW9`oLwIq zA0vY(vUKK{!(xz~Aai`k?GLCg(L^>jk7c19wzM!kci)KXbo`HMF5|jVUqOh5zPHx~ z7u)Wv`L*($bdq$~K@z$=!D+{HF@qBwO~Iv@@Nxw?Fyp2O5_#Ys8J$}5^H>J%`@CS{ zt-hYIu7NOhv0I=tr-?4EH2w4i=#_UUmFjs z%A-veHM(n~V=b%q0^_6lN0yt~Pi!0-4-LyFFewUhvZI$BFGs7)rVm2-{L|9h^f~Z)eyKyr z7?*u`rR)t7ZJ=8!I1#4|5kHXDmljgsWr(i6WPJ0eCg9K=mNGR7`F@<9Y)ptr=d(G2 zyFZ6ui;z7lu4{L3aCARB69KtaMekNz59bzEC8)@)F`W`q&hnF!@hlaZlivmQh~9 z8R-`kyDt3>Is4#t4`YaCAl(Y_9rDyTs1KYE_5gKHl-~>Ih(L@+s?${L`>}yrDEr-q zaZJ6`3Uhb_efWr)4dESDe#xM2C-gvCth%+_s@(-6U(RvIlv?Ex6v_UD{5h)9b*>N7 zzip!Gp<%x}c#!@x5`?mLYygtk7JG(HNpnAPnU%2^Gmjs75I>IS^yb*`pyeYn!J7D^ z_Z#@1;rrh7(T48tPjx2LKtKflO``Iz@cr-po+gBW$}#TuxAUQHEQAn2AEUg92@)F; z3M`=n3n&Q;h^mjIUSbe7;14c|RaJ{dweE`QJlDm5psETI1Mo@!_NG-@iUZ5tf+VTP5naWV2+Jq7qEv=`|Y`Kg-zESx3Ez zQ)3pq8v?(5LV8cnz-rlKv&6J}4*g7EdUU6RwAv#hOEPPngAzg>(I@$3kIb+#Z%^>q zC6ClJv0EE@{7Gk%QkBdOEd0}w2A}A(xKmF(szcN4$yDCezH)ILk`wx*R!dqa012KxWj{K;{m4IE$*u6C-i^Xn@6TimgZXs~mpQrA%YziFDYm9%33^x>MsMr{K`bk4 zmTYOFO0uD{fWnFuXf{4lKEGfjCSAEiBcUh~-RK~vwagYh%d^zqS*rgiNnc4TX!3<4FL7tr3;DA>RcYrMt3 z7h~TlyR(x;>v|5s1e#?b~H|Pqc=q};~YvHmKp(4Zk9bYF9IcEMmW{Q;%denJT?l4 z70{bSJ{{dIb)jJC54M+j%am#jwFugdb8V~47)xgJ;{uA!=Zs?&88BQVhSI&P+}(>q_==| z7JnM15Q4kwb~Px<@LEs%cxdZlH`{A~E3?IKpfJGR2rv7%N}=c)V?JJ@W7AH|AkZUh zvi2w)>RY)$6mkHQRo9L;PYl3PPg~?S(CX$-5+P!2B}GqIGEw- z3&}?!>|j7^Vh!EMc2U!gsDhS&8#Pq)SlamRXJ#FxX`caWHH_RW3%~WsoF&WECP$2g z3vaHqsO>V7k2xZwX3!-T2cj>VPidn8C|_4c?CyU;gpnaO(?YGO=a)9=Sc(n>Zb)C_ z>8fRKP6=d9Wg?&2G&5nNVU7Xk_8F-TmDrM6uNLZNK!U|gEn(vb`sw~_Q7LRLhitWE zJ{DBl&v1l}uTVoMM*y8$1{W*UIP`Ju*BeYbo`gJO3-K_tZ&4g%BSpS&lGf9 zD<3|fTK@&&<9U(QZ?zOW4zHKQXw`?v;uSZJ3ZIAji)F;jrOD;GeX1VSR+>@*5?@>z zVUfy2G!UmbDU$F&S&~3{;e=EUs{9uU^x(oT)!;)yX4Es>NE-7X%5^brZcL7_$KhIv zr5CGYP6|tw9`3$Cz3Myl8 znbJvOI4#W@<>Cyg>1I0>WiZtflPr-GM&DAaVv>AI;InpOh-5usQbSpOmTKY9e3EKR z;Hno1gPK2lJj!r+UKn9Zp#3yQStL5eP+`n?y*fm?v zA84*u&xPM4%6OaA%lsEMxp<}G&L4b#3zXfT`Q&U=2$xO!&?4X~_EUw`E}jd$70B`D z%VO!*-NSxZ=hz=*vGi#2+0DPI?Nr{|cA-Xm?8(IBQT5razQXk&(-b@ZJgwDKQH#!m zNC}wPd|`LEdw{jkq}>P?kLv_l`1H;`3Ypo z<=~^h)h>9lcSp#~`+8{d*nkO{Q57=hcqST+<>@KCkjsY4-m!~JrSs!7e3YBf5+gie z@3YxN5s{0Nw97uJlOQ$kM!sMpu6~+PJ9*Ym^Ru?p*)mlo*nLP}tQcyY@^-0%KE==U z9_PrE;U|ZK{=rZX`6#d#514_!C+5->pSvmgNS}EpK($i?)6CZ!Huf)`&x;5Z1A(&Q z@DlP6YDZ(sbd(>nxM#=4mhsQA4E;<+v`Q%cvx`xmNiP4h>WvTUPJ22uWaL49LZe&$ zu1$oP!=mMt@SLsRR9nk&V1bN$rN33*%D|rhd|xC)oT5}P_9ccwLRy4*EnFy#-VG|7&>jsJ2#RpDz#r@68GuOAE*sQSmL#Re$ z8y$k2M}GP&w8RPob)Z+eZez0hGJ6;ig$hoS`OMO5oKKR#YtoGWNpHT|{A-<2v@r9k zdHaj`SnX5h4E^0M=!*2hM>m9i#hdJD+AEofPeP$bAN9B`?Qin)0|4sWhwTizniPlA$1E6xG?)-y`KbWVB#R7|wk*IeoeRw}# zv0XV|5pzw9*e0TCxIsLcdLNFOYX4Y^gpD&=N$!;WMK)%4;Wh80b>{oPy}ot6_RYmF zZFlk2_X|kWVuVY)O#Vf9iHpmhr1G2no4g{P?=gJ_UpU}HpD|jo+qJb=ynu~|cc+v- z;x`}SwQprny~&aqm;cD>#RsRo_#Tf(pEw{Z8_{2^g#CKVen}EUK}tsX@2GvX6kFB{ zz@BgZBarBKocTk%rxxP`3yE^XTF~#~>G?6S_kr*M-OA&x38`~(+>=FcD7CF1Zzp~R z`rhZwkz2j21wH7{BU2yzTYRZMGS+cNw5Qs<(MJzN+PcO{SFY&&dRNlj2{vylsOs_+ zxNOcD(t>RX?HVbjT||`Df>@!92R)`K$w3^9!FYA7Zh8->KU!x)e?ztv$;IVrH@|W@fd8 z7BiE@%*;%u*_qv$`FHN(BD$hGqB^>w>&yBw^JV6HC=#GpjX!WQ(zeKjLwM3%)TCMT z#xyLTD8e|^YTKwg=Vv1|?|13o6!&U$_A}W2wWMcD^#DSn@g(5GbsHO6W$I9JNSxoCmsH}pFn8j_Wxk~5^ zVhEXZ+s@i0YjOeagPLSQYoxR{i2biszj7RW*S<_0j2Dw-Ef7qqLN%~y`ZAHIINOP} zvmaSn7x|DlC&W$UxkMbbJ&xpGD97rRFi#}3H61(AYVcPN9YUF0n72Zo#a#jfh`6TX z7!Pw#0~N0S?BC*wDZ0l04tmB!J145jwS;Pci*%m~ID_r&x0H;>J>$x}okimL!WLb^ z%m!KzacfeEw#alud8ZbsYF& z1@a|GCQHDAcQ3iM5LfSbz{fwQEh%&k<8f6$Q`yJ~Y7aO&6=u1}-*Gqw6$crh2cZ*X zMJE4cPZcdI%GQ>e=U|%r7EWn5pWBsM{|l8thH#qb@2{EkxwMBgjvOdH_IVX`Hh3}l zHcZa5HIB;>NekQX)ukMQJ`DTqS}jZ#j|$iH=Y_~kA^2?d%gm$PmPGuA)POynhUyaK zegRG1n2fzKfWg9@a>C@^5M)xpFSicmIRz7$?!Cq3uh(hTvD(>sag!Yf5*aMvtv=^^ zleZUVg$1$=zDs9p6Q1CAH&);!jkC-ZJ{fW`hE2o0x^4F_jcyr4#!ggqbcMo}icm`y zQ_77P#ZDAzmQz~g1=4DW!t7IZa}Z7thh#dEqn7+`5Lf8=4OAj_>AZ3IGQlz5loU2V zh|Ok)*^>O^ITIz*6(a6LT46*2Z8qn|UEzXV(Cl(`t!NL2^RU)JQ5CwNXU<%q`gjnv zF8YRI{0Qs{HiYEeK^2%=T5HFvrq^)R3Z~s+&dp-ZNpWu25qg9QUYwJZRjYFp(D>*A=`$9U_~N!BjcnQhdaf0Wf4k~Wb-yz6v=9i4rRTbdv0 zO)%vr@`J~@XKn3Cmo;jazVHe{VYoA-^m4ZO7VwZ~TARsMO7PY(!ck&QGkAgY9Q9RJ zLr}6J8cX!W%WFefwo9}P-hOjJJd>||gfOKNQ$xEbxDL$!N<$66h}w{A$tdnEEUq5; zQB17>Yh#_2o^GIeLQ`D^c**S1E;}*EAjaUHZAmh>Q~WW`RrCigz!CK>NF|IY`w>Yt zHl!vK+Cf`LljiFI=u=(p3$f!)&jk0aE{~>@e!_NZAc2Omti-mkw)JiJbz_^F-VP%u zQ&y+sQ5}T;hcIKT?jPxfEv!MA!t{oa;sV+#hIQ7_qx8Lz5Sulr_iep}MwMTaYYHyE z;th6PF7kKkE$1mPSGQC0?W9DiI&FS zPw(Wqb7k(snDvn6ol!D7!#GhJjH2M&gJc}C(-vuZ?+cGXPm&H#hftWUx3POg66a6n zfN##yl=25{SXg!9w>RJsk>cLGe2X4*AU?QPz|qi6XRQfR&>EZ1ay72<=1iIAao!gl z=iXCdaqY-04x%}=Y(<*>tlU_^(VrHIH)W}5({50@Pf_Emkvmy1_vz}FN4%!arFz{@ zGv%Z<%-w_KloV$v=!Z~|Z<%S|Y2a7~>BkxgdN}R+5+GE`KL1&xvnC1ZF`O&)@+-)Gcq!xuuB9S0X>R-t2pteqfiBX18=s!G>_Y z1xdnN_B)8}I9o<`n6y`b6?TV^e{iJi5!y5A8#Yc0miLEe zI33k{;HS8^<|IEkcVzjj#3rzLtPbmdq8r6_xeOf+1flw@2u{ z7ph8+9FzeiT#-P8tS?i#BdQ^$h{Ww*F=6X>5d^;jC>JrKa`a2vZCP4F`(r%|qT)+p z8I(A**}QO~>w_{AcjCG6S2(!)!0Q0koYHOqp0J7jIN>?pqxj+UPbG(ZzH%R7XM90` zj$jS22XlLiS_ef1-*ioM!Q*00STA}&18-3EN|(Q&<%b4;8@@tEm^uU}c!LZu9o`^A zX?d0=!n9~@Op+U(i2*`#N{3pe!XtMPb%k4>*#6S)3<-sC5x+);@IFHe;)vLac7gVb+ zVy%FX+y_#;fY94b0?IYZkO^Ow#D_#PU~5k6IsF|@9#PExC0GDbVu*%(SN5nu45KYs zKy!crklZl|C;1xq4#gk_`Nhg`S}5lC++i0e&GcafLxzk_hVLkBG5d2y{94=Z+|x=1 z%axSnz&LR0GB_NUJ02Lc;Ywvu?Q4ScA)Ezcg)!G2B1)N>;~wK=y{3lDg{gpiV|7Qn z#pOEzcxTd{r1`A7Q=fO{Wkuq(Nu{edMD>fb`0?+_%wU!>D5zX;AqW)-;3!Ex0vhNX zU(=77+{)#g(yr-uoy1;VzA7=eqw-JnGPqHOS9eh-G-@b?^PL|t*sa0#ONj?=tb;`? zl3AWgQ;F`_s;d-UQw4ap81^{HPK`38^=*#j0=$C|aKZrRIa{?amtPS#3sAyjQNNE= zMb?g$oC)nJIPC#jz%sw{QK8};07-+BdV^4n4PcL?xNe2Unx(ja7Qv=z_StA;h(t@` z(NNC7C@e%oWn=;U?G`?^0-gqzf+ur;K~}LsU5XJOUlJ1+>uC@)ch>nl zTSAKzE;N|>ob6G}%w)1smx;CC>fI+tlBydTE74*M`xWyfEVkhU0|-YvvQ@BS*=1*E z51c1H+!>B81O@#;EpxFY;eQ!72d*%yDa90owz9bww$P3P!PL8B1NB1>hZm6;z}(0;}OlhLJezvWPX0@NORT*jtJ!^cR@vI;g*o2t`ZiJwUsBg)gff zZE|OPnxbToa;liDWvy7?*;dfZj1DP^FbC{!haAw0nvpCY1``va4NgJN+5Q4oFCb0h zt^a99;!%c9Qzhh3JiTHZ?tWHR5Wz2sk&=FEtvf)LAVL}ekqCQE?nH=)#wWLp>@1CT zsg*%F!$+?0Z2>!V;;{xXE<^&RS}z%8PcOkF{p!LGufDBPhMPC^ zG$q{wZ z#Ja4}W6245crq5zje}Y@*c9{lc@AzpQqmGuXJ~LY$*{`hg&Gf3P11|WiFee_O|b}! zVRY5AG_P@)S3`T7$B`vU`zoGU;5|1#4QY$XU%4+;XJ0S*Gf z^`C83$;j1G*u}-n&e+z>nM}^X#K>0cbBxQ`${65k4P9l~vmH4wj!dK9Ds-qvw$pf(6VOiY2 zE?B}k{2zUxzM&EhG6jZ^@X=))R&lRCJ#H4rUE-D}<&<(5y_%LK&nIcv={%BK0e!`un#9Tp#Xwr-Fflcti3K={AE}6#+kt{Qie|AZ6 z6*&nr;n(wh^uhJE3@XxoOU#BJE&q;S)ux&^y%En`f>||6x$_bSMn;dC71xBhpU~E{ z5f2v|P{1Cv^jl+$^NJs3E!XibZM8w%4kl>uy8yA#xpwUfn$HvbVs|_LMy>AUN(Ar4 z6ZtLFzwcQpxj;zF&-MnRPYxT3{|`I(dzBso9p=4TUAQ4of#Wd3q@H-0Gz8C6U2uxl#VXmC}x+B`>D)ffK;%ZXO>H zPVvNavG%b4+j~NPJ?rVff87JMOM5lOQOltlI~`eXFb2A)9UhlOiw3q{Ke>OF<`kMl zD=jNgN&(C4hl51!cB-wzNNv$JDl%R#CFx^wJ8zI;*wqhcfv8FGOLzgs8B8@F<^2`p z%)SN|zLITOn%{T>nk3;{6-GYt$(;vrEOutbF+({n^elu<|244j+ z86+n$mOkc15>j*V=xfd1B$*G_jnCJcV9-J8EZ4((lhmZiNJw`_M7fwG&8pHy-Ke_I zrkS&<(%!(i9Q}xb&7WPk`{_kfquVmahoIG>3~7f7S+RSV+E92f8X9;%>e3J=Cr>x0 z&~#wS|C19#Hq^JQmKY}+yCL3daSWFY*=wp%?jSI5|8X-huuF_swuyAM*laABQv<nM&9OUnkdus9i3(4|D}`eMP1@}Y5Bb1U(z#8*%%$T>s4~qFx5>;H zHo2s5PKg@JpAq1ZZ4ryNp{ihW>z)*VLmyu=cWSVjU!#O$Av&KhM`<{OsHeT4W^L$D z{FjnPLb}b$BGoEeF$aDxO-llzmVFo67b$7hXg_8Tqtl11I(W(^t~3EMSd=YsUc-tL zeLEb+dK9(xLL!m2ow1)kliqtx)H+c?rCAXtFh}k)h<{do_@=OvP_jjD3nLJIHX;cA zVfvn9=>eu_t@R0_vlV-GJm~znRBf*`LeMt24Wb(uH5ag1#POrx5gcU1N=^GbQA zX9vONEw_HE$REtCE;n>zdhek^PUnZ};@#Hm_lec6sYLgf#WB9v_nsZ5KeZMY7auW5 z_kJ*q9eK)**B@+THL8Vch#NR9ncS;4qP#j6})Vi(T4b#5_y$z z7?C9%S=An`M&>9nt=_&CMr#bKi5!PK%Oi^X!xk~)OE$*!pzhBbDl|3c_cJ?Jt|od% zuYTxQifMN~M*;jbwvtdar!}ipi6*ul!tJ)0=`QptvVjiLWO?Ld6ii1euZ#(56TeW0VKXYA zO;JSEAuLdOhiOC(zo^YHO>63rTdS-vZ#(9539=q3ZSysm;qjs%@UoRNo1fD+cYOcer$pT%eNH6nAI) zF#HH}KZtL)Sp+0rH3lrc-tc*6T!UfgJ4jfcO4jby`$s!NkCaEoshYG5Jo6~Z904c_ zN@%e>N*~A}l2(TI*J0P&&ek!u&;b12$=W|DWJ0HN04;s(4eX5ydQQ`7)_VOrV%JU| zAsp{6!;B$uFYtT>M{r;b#P62;8PhsNPB~ zDoO@&p=doKv4mZP-D#zF_D~qc8PYJQJ|xuo%cr(3q7)B2GZMPwDGIJ&zZi;fUEyQ^ zlcs~)j^o>q<<~(~Ioj!$ZboT%dYqkYXq&vL*WDjLt_ESAA*A_+)v9X4Z~1?D*Gu@I zNYE?q&aC%8EUc1@Gw-PszuMQ!Erq`S#kHQj5KwM@PRZ4NlK(ROXVva0&c~E!#qtJ0ujV8(>y;aKR3G#1Mf43 zs*c3YkGCB~5XCJWkhOHBOJ@*-bm(s=s<7LjkA==WAdsxiSCN_HG*VRQs+ZOv^y!x- z2C;A|nMuaXAm|6=uTAFdv78xK6bw>VseGo>i1Y#EWJOx3B56}m<5I*`T}qD9x%_qM z>9{{znOJ%GMVUDWcqR9C$0bwpMbQjd+S2r_HA|s-X~_nZcDoQ?DCv38rI(hSCE_ZV zbvPUoTrAj=%zqNQ7P^-Fp>bqVgI}m6*^!WlyGKv+92^oWZlrs7 zLP%PeYC`}14V}Z>{6=9~EdATJEHiIgFI)OD3;bRds~f#P3rA87s!!-^uI1br2CapZ z`1v@|yHda{pTH)AkuX@Swr8a=g6N?>VNRM z7dRL!$B(sDymlKemGkMDPE2d*y(`$P4}_OZoiG2^U!|m)OKnsrH$J?=XL-5>htARqAgN!n1k0v0x4yHek#IorCFRo7^?-1;kV#W$fYQ!QZ- zomxY^(n$ZyZEU3bRd(Qmx=%pGu6}>mQ28S?VS|^mSzr&Wfbtc!fa(?ZZ>1~p-zrz^ zzm3k-e4;KOo(bR9U`{KmT>prvOF+)a;9Ml_ou|vL{IM=Wwe`oeC6zehu8qmGfVHua z1Y$@hbgk2??zN>r8?u<}nJOl7GDqOU+A)^>wkuZ=$Y+0?aq+`izt9p#hof!8mlE^O zf~Gi`+8)>#I!~O!_k0@}6j5)Cw87lr9N9gq4%B4BC9m4se#V(Ln8hzIpyRB}YGS^g zuNz)bukTc4-C-cH9TGtxvp~CV=`XTDd&4S2E=a~QX zH34ta32)bdsH=6WJ#2@#8V6}tbI48DGdKfUvU_^LA8y+nb4GUQkR}LPxm+CNd1|r_ z1{{kl@@K!{B?`H_fqa2bMp=P_xGQl3^UVQO)zE&*>6|fd0-ij2&(}+rzuIf z5BCVJgPeH`_W2=)_-9p+r-e~Ku;noOyq)`Rpluve)JTNOUH0EkxO#^Pz8g7A>2|Gu zo_MJ?scrYD45&6ToEltGJj8>3)|>Uy;dJZ@3c-Eg_+sB9D&U1|zG;L97$k}{!5VLm zZTG>$Pkz}N1Z_+lLxbHRQ6so1{TgU- zNgLZjHZh}%$P)p3^Gekk&O5Tieo9&&cDwA6`Vp6H4v$08e1lb0n7X`!_x6ZQd5Ncr z-1or8K7tmVoT%EEwQD=~7Pr?K#Q{0Fu|sSC$>>4Wb1Msgv(Z1Z(3m7U zMO0y=!H*S-W8oYSQ1PnB#xO?}$Q)^p(#SI7QlV{J=a2?GYE5VN`98&>h?oe*R}ep{ zozpe2vsQT@R#sltkEM-?rp}MoSIFEzNh`e`A6Ph1sa~lqf`_P8wdR(|ad7+8L@kAF z;vhFm@833@Jipi6uq3Pp_bF!`={6RZ)_q3e&#G#EWcSA-dg~O=vK_0rWH@i|&I%f1 zoygC}jg8DWcewP#zZ&O+CV8OUQ)Dm2p4Bjk$?oZgE_%JhAOFZW({kXYL>TpT;Lzz_ zI|FZMvT5ZIj4~Y)tmhAPt~%q0DYhX1((N?ZWM}JC*I_>20dJ=5-SmxUPm+W65rj^`Sjpw$s`^3 zE*(gDcZAiVe8og}D*eTK{{60Jzb!|N-s5|xL@(8VWewvmO-}3iw=6G!_s9I7pXH&* zrdXkqzmYytJaFoVEQefFHzj&&L-8Ck-zIBhH1+A6Dx7TbAE^RAhyx%HXL5skx89S4{#ET7{&c zmPoAZzn~8EGBAIa)Vb6MJ!#GZi5MYbm5C>b(F_nXi)XRA1togzy^M087T#tVYDd`x z;*c=}(IpnMfRND&nI{v8vJ54n?8f4lN`3K^%b)}oat1TifJuxO&ZZTXv5pUhub0Va z0wwYURnZ6}Gm9@r5z`F%e3zeTCje1FB69h@e{T5iwyiaFBF^|31@L?}B2xY5NZ=o~ zE$(4v0{AEMu;!Eh>^}AfO&zIZILKE}6cHN{5EEVqDy8a~1SAO{o{UWYu(Q(T`PAts5V>@5aLwuP6?A4V6(t8AZ*csoO|B$?XQ9mzToari6>M0&(#_q-@sf0G2g@us?RlnK?i5>!_})FfdEnul&4?fFyZ!m znCK()B;nqc9yH<3(+;1HNFSx>BO2|cmH9_>Fz+Q=1y^syP5ZMgbdJd#BU7(9as%Ha z^HX%VEDCVvM$S*Chwpb+?xd6lMjE*fvLWo&C>YLzd&w85R^HGrZ7(kpVPCu?l0Gs1 z>hIk~pj+7mBThy96}uG6s>OMG6mD=@i)9C}#fhwl)Jyp^xn=OVCWhssK}rg8=eT@_ z#MM-!#b3{H*Xr$FEUim5yRH+?cP*`J{c|f&rbWvFlCDFuH4#)*;lNUt$}#2XSF&9v zrQcdn7C`A`pBI)gGu9`(w@al@TAb`ex0c_we6RkY{rql>Q9pi>PGM8b2KT7qFnaxV5b zmoEvhO^tU`ABvOe!>+KynhALJ%$E>t)0)=h(O|==6SCC1QdZFZD5R7X(TTm*Q7_hO z7=l`B@tJOngSoFD`AxA6D{dmf-hq?o<*Jej1-3o?L1`s6?+mT&LguymtaBrJyuUnZ z?rVkLYMuzew?h6~WR}&&rjgWu%Ol0zRpK~!e`c9{nSB|I6c>-U%w~d<3Pru2oslnD z!7N9~Pvko?^+^eupC}q1Sey*kNzo2lD|DB`-Rbj%!6@17B|U@DbT%ss`OK13)V3c zBwneSClO9vQ^N*Z%RXYO`Wr~pe)sPVHe|_LFY!-A<-IfJFyW4DQ`-%WQ$+9`xjvG( zpQ|w~wLPi9e&l?tir%<7e!wa+NTIeV($?_M8K9Ok9K|eg(1Gw$>)_r!@~1mMWch?I zlu47XEEFQ?B*b6E2Mn(`k^R%I5MNchehcs$@A>Qon=44fmd(0d!g;b+#n@O=a#iwYWb+LEvPA@*#Kw4&DzJnYfh;LQnC6!87g zdeW^0s%^91PAO0q`>$Mb==p<41NxthJ-IB>>x%WSPot3rFI* zMf_9_Wl1cS$EV%`sC?Jhn@_2EIcHtJ_h7LBu5E^=&na;`bMz8S&E_6(zjFs3RZeiQ zuRTJN2!tO#0FHtOBj@_b2Se=SHmzr0Tt=WHWsm zPs9+a0tP&xdv8i{VnZqpkkTa`J-)KLAX(5g`{CFP0HkK9R?;p};94=j88#urqEf@h zNp86`#tPiH=peJZ1GkQ~j!|~G>DtG7jQ3c|>9GN9;LJVY1=w~3+AxFB$^Eo!vtkY< z^lHsv3=oH=6dYkZUJB8!gnGuu>Mpma_%KKAHQD%Qw+A~YE zE7L`H=rT?lQtq`I0KgG}wsC>BEIza!{njtF{Q`O>%)n&}o3jSMpQUFP%j1UC+HN<| z%(W?wu*JQbLVt+3ZDuiiDA#YyF+Ybg*l!h`SyN{^k0hQeu)8@TkKFQCrJXjud)K0> zE{25F{XD-Q59a5JYP&@17qn_&5_&P?3hqsnwKyDL`c}1=5ZJU0UskWz3a|b_9B++G zN)j91j2Rf7HbdQc&*p52&{LV;l9GveK^#X>?Yyoup(pf4w|r>&$=OG@Y_VMwA6hl! zIwQFIwy79_k(kp+&XQW7iS%nnfT|GF1~u@KPe&}8SiTJ;%RF2cz}~XJ6NDb<=rK#j zVHko2=aA8x+I!P%vZ!O9)e9UMJ0?eeR#JpbX0d512u#wxBlv;hf62v?LqwumZ%wcg zHVp25KY-e>DBPKKKy-JtDgj!RZ(S-1&dd=Xfl&QQQBJ6^qysCBFAbkG_9f#dv+)s1 z-L3APDR&JQ*PJ&s9> zB@&43RN*^1zQA-|GKN~I4qBYTZiMEPc`j3U596%W1rSO;yzSV-svR6&RH9>mD7B=u z8}eph-j#vh0v4B6McTDb$}TryMb+$sTV5 zi}_AlY6U+=R!x+it_{Fws^cQRi&m1^#pnUclQP{S=|M!jX6e!UuBpP(5qVg`=VuE5 zSpDtgx;0OGi1AVvVZScV;hZR4>PKLNj0j~Daguy8P6p8aJ#Wk2&=#n`iu={^&Cuoy z-OsacXUkkO&0G=_vb3pgg0D+_3b#{KW7s4b3?1@R)oPF<|d zG_ke%UusA5tAf>hpXrV2XKnZ|oQZ$?y0G!zbdF41MIG$yJ~1FUD|@rgG{@}|75Z;9 zC`IibDim;0C(9(jCO=WZUxP;=Hp0PKO>Q?1=4@jTW27?wUSwYJ5=htt-^akbm08Acywa z?nLL@sHAx-9N~vRRHk5`7W$g&)+fS=7KXruHCEE+=h`IRE~j?$(+$Nuv|ud;8rc|h zjdgESU_~0ZjvT}PN$$DBE25Xd!H!-qq-$f;-@rXwG-;l9#g7}!%cbSj%7`g-jyxA_ z0$^z@B zu8A=6hEd*PVO0if!FvNKOXTxHr=b0u@#o{$PVZQee5{z+S>bCizS`MmieM)ykX4gZhRpUGL6F zOkE$%^Gm`Lbd9qfXKCCp+^1dWmdg-NcoY+kwC`Rb+&@P{ix_T1_FL9HZn=tICT|&< z$H{Fd^@RXGa-_mGD1nN-V{GI0VrHfZ-iIa5NBVY7d=2t7+GO%A8@~x-5WU&2kH3_D zqk`_7tUqx{tWQlZ-v4d6|80u@L?!?4Mp>n?rirVL^s#1|6k-NPhJuub9zPdcC}t;X zlSfrFHxP;_4{1f~)}Y-ZvKZ5b3;!(mc+UO%q3O5S6&}Cuz2Hp2pO&BT6t;!bgS)$a zV_9(B5LMlN&4d5ZT`tN%!FUkZm!{_`EP1t|i5H*9W6l-hV^L zx!qJXeRAxC%aOh`>VU)L$Lc!pX&4TJA|Y^ok|g zGfQh;Rq}&N2EcF_JpyGSyGxM67#h+Ah=vdzPjUHZ_san!2g91j89&82?co8PbaI{{V*nJH-6oY-Z7TN1S54VidmMQ1IuCPAZY34*eyYOy*dkm= zWBmKt^*?yxjMko^(;OB+>mxwSTDg_&Nl3kTd_i5(x1YIH)T#2#9z=oU?&C~X&VJh* zC&dao)x@Os%2go&Td7bn6)YQM?7DCgOVd$hW<_kcf^{WhDRMGkvZ{&qjlF;(tv{(W z7$>A%gQ_qOYF&LitAX_s zomK?d5dU)Ok%o9z@e`X9dtYzo3)In;lfq*F;iGLslrQFTj^L#bFN^{P8Tk8zAsf z#keSh$;y9iM*Sqr_l1wz=EFXba$=NjYTWp-_yIAkN(S$eb$CC-PN#PoowN+o!DMey z#1(8Z4#=6dGYIRbLJMW+NVx09_`a_oo2N5P6Z`Tkkoz#_$XUhstzb@kZOA5N-Y!&% zw`TU0oGR(@E?u*=*M7z>?Wu^u7Z1R*c26GLw>%x<^sLJa@s8Z>F+cnGE%Ai`xC$d^wpgSo<>ze4WIAUE6Lvdxh;telK?xt9P)*x!)dTu6T=j*xL zkiLe*hoAV9l5hLoLxsK<7T_|lg=&wrp z*p>*BX3Uskrs5!gzfdod;X7^vSzcbzyR-0=!S>ltmUOBo(|z6E{s8j`iup7Rq~vE7 zRnWHm0f!Stlaf!zjvNbv9ylRrAYS{z{=tAs9k;ZNLce>*n4SX8jOywN_%rLNaG}t~ z3h7z*K+BU_xjdJ`t2JLTP$_d_le(Q74H##t9LWR}SnS@N19=Bkcl~6^qYRq5j{F_{(HdqNhjv^v)WoRlgkB#D!dh)d)H`V7AzDMv^$;{C4^ z(Dq~@#uN*gj+&HwR7MHYDiPnX`kXeGWIfJ9eqj8bvQ2arlrH)hxXo0QSh5|MBTKeE zn5cG-Uw&+L!y!~bvoll=Czr{~1HZ_c!tHx2zp8bUQBFMx795^CHcZ}?I3aiRZ8Jt@ z_{Hn+8>RJw9-4C{0#Rp|wR+54)ebE0`@9tpTE5X1Xwi_`zv5^+*X5_|WJ80m%iU#! zT$4bGhj}sl7l<6Z0^tq*6CTg}-@Q72iy{Bz{wn^9sb^_OyU%K%z3+0RnnaOdp-_&A zQpL(UuCU2T_aYTHVh0pT!zd})&LdL+6U;(qJd1Bq<=yFVF^WpMKADb6Dj1$ITTdnr zkEq|WD~GPtoLj?PH)h*5-p)HVd?zkG0du&3gDZJxTqlEp5F{V2jX(sCDo9KxX{~aP zv9JUY9(aVBC`pL{5iA~t(Polf=)9)gCaTKHT4&*1Q6EEeIM(pMN8<=dWxi^di<509 z(Sc7PN2z!hPuWQ`IF#i9hKhwb)9IO*-DGnF8Ot9ttlIN585zN6DTZM(vZCYWiK?k( z7OX+Nw@PZPs(N$ve{RS5vNXIEVz8|9x=3v*9zwT!STp~?Qmg(NmI|Nik%c~5QgbqB zYEC2?PcR%9L%(TgZ6eC+%rKl7BV#Sj;Ak`*nMxvU=@)1JNif^6T!`Pdk1J#2sVZBR znwpA)HPg__PDhM$6HM5|rkcgs*u9Po^PZrmgIYu~Cg$X1z*^GJDa@6o5`#TI*T1|3 zznkgm;}!R_d3@?ilQRYNV-;l9{Kma&PfC-Er}SYZ{KO0|#PQyAu1iHR9Xr5GZ+xX1 z$YVe3p(Ocvf+RYOR}K zqi8EWh=!!)B@I*IE%9u;V<-m1N_NcrdL8g z?a`g{d?N z(w+7w)4f1)n_7Zi9{9NXYDO>am#{o);@PlG(P+lnkeTc2M^U1R`+n3=5-SaTeBM0) z%kNRG@}o6-%AToQ(590ntVT?F6@U)=&6Isy2)}N*L1f4m5LPgamROcTYv*(iPyZ7c z#oWFCg`-d6eUw=UClhNO#vmqk7d}WW7zq;B057V=1_yWz^`sQ|iCPKK-*76K4e|ht!@`_yeX!1BAATkU7xFeYV z1PZo?&s`Us8+@fNYnk8(bz&7v_8NI9_DcEqlA8O-SC!D9g9; ze)c@z0tWx5DPDXxE&%#5N?4|>b4aw8>yRvSSEiX0?vLOiRHB=2|NhsXiZGo^5&B@< zeI31A+X0#Tx|c~iFv?`0v!=blr=KbwgLb78Gt8U_OIAAE2z9eNK&!s5F3F0>=8W!r zKT;oYg44jC_`bW%@*i!jZbKwGRx%8gdl9{Hbb1jDI`x3IjAJZW5Ei6(S>l@9E&B&0 zB3*=O@#A7@kk#)a|5-MdEKD-rCeGj6t~5#M&W2oS;K0izF)(Eg#omlB(Rx#OB)aoT z#GwXoK_5A|4xhFvu3CMq($#~xb8~18q6z}|Mk(d{j*7ZYQanRcz1UwW+(Xbs<`luO zHb8f`LI0u?3T)Otb_0X6$!xt|`V&k)`37wFO)&S%>7x!C60RXywvpkR*hEEuATHLB zx@Mc;`Zkyu+td&XI? zbu%d4p@UVsAW5iTL@C%3XR+Bptl=TbDEL_lvW3tV3l)rQ*yEL9_5{2}*ri^pn2SG} zR+-zw0QeD)q(v=8w55$|>$m^`e=SRmAT^m5fBNae&*Lv;slWJ>PpPj@Hs}8)xC)6D z{+kM@_=jba4xHOwYq(92K^_%!WFTeunUd}dMB?$5o(Bjbd2zGrme0Pwz*zf#={HE= zk-#G(=Qp%0W&TPr?xACqCk52iu;mm2Y}17p~)Pp;4!j)g8pxkGAfftTfDxEj~L%JS-YlQ79DmS zN^OP@{~`ohPv?81{MqY#@>z!a4@vL8_|AX)S7Gx{=taWH*~L{AVEm8Me{X*6*Emr? zRYrPOpr*5hLko^{?~9y*>xc*tZ&YiM%KMfA@nN^p#E|?c8W35t>GBAcZmA?4{UPUr zmeY-OaEd_%oDz|Gb=lAS!M&m9W`6(rdUJ;x06jy(gJfSoPLhvmgsi*@_=ffX5ej3s65C6K;Qq$m8<98QKQ&(2=PnxU-p zy1o$8j9+3oDY6_(6~00AZvJDQX{iOaWATzEh(B-7G*n?ii^k5}^sObC8mWZ$GqLO` zFQk3dGhc3LgXh1}46U4`@|u=PV=ro6Gk-U&3KzERYKq8iQ&`M{ z66z)|kDF*;2!t0`h2%3jtiMmCM!^ZbbEazf%%%b%rN^OWL#s=lwAd}0e;=qX?usTA z9(Zn-UmlKH6$@~yBkPop@gA+{^6&}OC$4EF1IHAN{w%|uvsCbY>|1Y3+n*y}m=gfM_MD2y2ybg5Ee#G4-0q!EQiw8pk8 zajMzrRw<+V4n|~tR*qNe&{ACV!QlqG+Tu_laOhYoqD#AJ;#RB7epfO@XP3?5L=4w| zHUPUmS;`H7X9qE!R2UvMsm6A;@=1O#5XSU1sWSQI@4a zZGFgOeXx}tmJs?=@*}5@_Cw*EWqjMYiP;ArX6+xYip?F}`38=k++5@zfoItr7BvNp zF4AQz;o;d5e2Pd(OFTD+j|Q|942$uF+L(@u_{M20MhtWi8oj``eZXbdJ;tUMbs@T5 z2y5LW6wZ&jO#>UCoMKMSy6g6DP)D&BF@YE9UtKg?xrubeFm**3WxIPdoUuJm6|>fa+?m%l%uRVj9gvr3LL<9h zzwJCHAAzE&-HEze3O~GobD}0Q8+EwwOWusWqu$p8zx0Xc)rsjG`nO_2#mkonxKUW8 zdT^tvODb;w?|v&f4=o3rG4P^EMVhblocIjZ`>hvC`9QX&{`gG;d5Q(*;i-d2Xpw&Q z(C@{o(K1N_^R@FKtK=F!$oRG`ANJ|~1L!u@kE-(fHSnoz^B9DTIMV%qFHDsLJLx;a z{kiDL9o$beEYbKDFhRicb1(FhJbGP|=3Wa8j344(w4YiN#2MMp;ozg{ZV|3@nlHrC zW^uW#Wd@qdwly%Kn#Y-3@(E1S1%~fg$8y?v55Ejv(DaH8Mi2lDLbwD&5!bxl1li;o z(LdPNVw+uqJe!`sO+I-1;BEVZO!%Dz_O@S66!?*QN}cGHJ0w6VOK24*rD{2LcnT6} z?;~uSqXzkQdoCHMAs~sk5Ds?W8B0!Ldi>wV}UtY5jdD4LGbGekgSgCxr;tWYlL{X}jf-~Z+7*=_Z1Km-EIkFnc0w}d*@k;T?0~RO(X-cMt?gUsdi*&sn>-7~!6{jts1NIoIy~YrX86%dgI}?$~|o75S{0+o3V$9hED;=AC2cw%Uuz zn%c_kE}cfHoSWej)Zc!aoh-n&ZK3_#(~$eJS8R2BuOn~A=IX3_35k7z6YhpHcdy?T zKih&CDm+TZQ+|d2B7GxKmyr)L^LpH%>r{7P+NA>@T2c_uw_wh}K= z{~#_+Nj<<2q>=ewjhBlt2DB&B#;NNHLLb&fj9u06uW|Ud5K!YyMi_OJ%*>q>C92EM z;>IlY(CJs-@UI?NF>1~-TU(XGwu|5~DS1{Lf9-8?OV3s@sIuccBOP*vKf>i@a+@$VGIzJD@${J?%^ zbWR$Kh@|3gAi3o+$wOkin1d7AoX>tYxR^ft5(7R*bJfR)v>mbg6-;nitLx>KfB0b0 z^R~_tVhPem2#B0P>L0Ca+st1MG&OmIKG0GA=mB{yop&crMUe&u{f>E@M9R(+e8Ni% z*kG=uijDODHo=eQsQfCP4ijs#+ve{s^Ck58tsW-rT2IDABK( zeZdFd?BB}%F6P((0YEmP3v&Vnlj%yt>UUG<0=6c-yY4qn()-Z5_dBePVW5rSoXDv6 zv8I!H;5&?F&m}_q9}C63GW9WD8U(lJ|8ioI7FNCX;8Vp}8QfcR?|g8Q>Enk2oF z%&lWU`bbvMjQq9e!|U7LrSj=juRk{#iT|GsM%2i~OxoVX%-+Sy^;6eO^>gme-r_S3 zb~O5Iyma_Si+Yi&yu<7#aChR<4D%Ji3O83tM<(wnUtt6^PYoRjhFS$ys_g$z_7+fi zC0Q3J1h?Ss?(QDk-3jjQuEE{i-Q6L$JA~kF!GaT9-`9W7yzXXt`pv7g?&7i*wd+#% zRNYfm=j`pVNwQiy*i_M^bg6a^-)2XN1Tm228%TlQ(5#}Y2#Ex7J~7qh&TQN9^zalC z1H^Vo0E6t>kUAp;eRo}NlV8|xjI4spihPIp{qy&vUN)h8%} zz?D7T5Tc;y#e*q4HO2E?Jtj9&@8CVOJCW6!pyTmRco8Kv0Xe@6$Aa0@irX*O@&*?;0Xf=JVLq>VInqATRQrg0KFw6m) zYg7;|g=VSrv)PxGi8one{g1!M%v@sL?hdjIV?Y@vbPGfEogW)9_IE1kkDEfOO9HE> zYwdcQW>QETgH6=aL}R#kOEDiOF+E%)Fg#=%8_Y}-im<;Z@9{>u{=gWSNna4S1xp!i zAp$Z{_|iqq(#N5J$R*J%UzJ5r*LjUrR#bPJU>Hs&SnMxaTLXxHH(F*_2V~o8hA|nc zp3>%Gs8VfFxr5*6ZDUmI(nJcX0m( zYBNX@GlF#qx-^JPA^N33M@fAMI*Z(nd!S}V)@;#^^kg&FUafSD$R=LIXP^A9zF-U( zH$4Wx4}3%f0^fE3yj8TPNFT;nA0(Zw3*4 zrB&9mN&Yb5^O_1&=JFLH13`qCvwlv+Q_`9U>}z+ZaViQ51E_P&%67bG!@m8FJg-oA z(H`d$B-%*g$70WK@hf+v7$rs^YtUhvm zHNWOcwjm+ukW6e!ptxSP#z>z}0xX0Yz%+@Algwn)EqKbBhT=UeQ#cuNu`WYx%-Bnl zt29^>_UO?mZfPJheZdvvf?K5wkq2;ys>AL{1du4}apz}9PKeB>gLKFs8-Lt6Bk{L$ z6_P1=jn$8sIE!1$aC+3U=C6J{O}hRGCFHD#Mp>QK-1+@Uwp=uSp5GOs!tv3$z4&y3 z{EkQOEa__=H|_`ig#*(ZW0Wi69Q?y&zvXY_2!~9&feRWFNHTC%-zzibWhC+w#U@hI zPn2l0y1fm)%pjF&8K(9JAIvA3Rgav1vQg+`Gs4PJC1TCRjP9AgS>CotwJrypkL;^-V)FCwm@eg^K46Nze^kOIrx>Xm8;V1!@~5 zjePDRBu#2!$$GR&S@dX{ss-0edeZ{El>0Y0=SODhhkB;oX$+_ui6vV77$DHsXMPfE zpR*zx19U6vU42UUQy!XKeNK4v%ToprR+MHPX5+y|OJ~`bF`8_&k6Do)wI~fqtGDKL z{2q{jPaA2Ru{ZfTn&gIx)Cmg^tC&`5m5aL?rH34}hzcMS{Dx+q5~oU3J{zXzfQ~<( z?vtESZ-7w3vlkP#kfY<$ZR{|F~eYQaL!%@WRn^)=9Suhl8TN zY)-M#liNT`Tnt;$%w(1( zg}2^JS8f-j6fSZtO&|A5Gw6M zYKO*RxVR%@k##Du;j)qW1$B2tW+d5e%ZiNjk+~9>xOq3Pbf*7D8PDDd&M9 z{!%^(kHTc$I_nSki$=X~yO&{Vq0%Nb4HI))Tv@YL8z`rpSTGZ5f&_?C*bE^|NvfX3 zwMCad0|fcQ`mPfyF!t6C%~Ym3r?Se{+nAksT#IeQYvRYvw7-mxkF^GUjR#v(Fh8Jr zTnQ4)2a?$yLPQB1#DMN6M^NVv&PPNE$q*$7$`C_<;SDb$IjIQ4L_m1M7!}bdpV_h~lgB{l{?ze1J5!l0w-9X3U zGyVmIb>DbJScwTXf=NEc-JS0U+GF7EKz<#3I)kF(Jx)UwuESdYv3k?^F;{QYK(j_* z;Le43=8!W~vmPBsWDrleZqHsB`lL4#S-mw|pYQ2VnS7rKVF!7K3tGhMCss1ANZ0nU zwoV>GTsCu8lS_IU<>BWi2ILHb;)FaX5dqz}t>FN2dc{E6-B)bGb_nMLt(z~EV^Bs= zzW8EIrp^ij$lM_t>IEE&+E%bQl0vl{xQV1~0Zg(GqH?nwQ-%$wjU2jL*jfnIR(K+l z+rFvcKjtjLmwaD+YVNR18KQj~A*&|TsN58f?N z`sBJk#VpbL3`tzVbfI_ekY8p*s6phlB-CGkhdUCw=pot+$OIls^wlm-E)yp{;YHQ{ zvOn$l)r#42pH>%Ie~Pjoe#jk!1actbgIwzI}$(lrU6Co)9xQL(kItc^-ug$3N+ zN)toZeqHnQ(ill$2%O4%yV~Y1LUIV#M`5&emYxdJwM}HOB1(RpS}(zpFc=NJ*nq0z z)Jzl-ea6fF%bWXhv}Ne7YPtg2fMEJL#9LbfE;mTtdt!+AFU!-vZNJkH0I@(B28pvLecY{H*DArFRNkf%@R`Pa}@rm?Qm zZlL8~M%iA^0(N482GD(g_!BSJnkRszhLXunIa>~%rwmsBVQVko3=ycfP$*6$3exc` zRdX3!im3{wq@+o^sZqOV0sB^-$;3OUh8P~(qW?EyPRz80IZ54jFgA+9}W-3;&y@QUu8Qnb3`fPU#*+ymcX zqURlh7>E(hjLDVwT-mLb4{!7;te)HK;$drFN%uKLHbuLbg&+i%WY4j#~h|Vxt1INLW8So(L_McXXgO7AHCm2>eK`_a_wgl+^ zMCpgZ%Bo%K$Nm1|XS-Sqtu%Gh!SHo6Jgb}iE*?>$2Eadh8obE?;t(Mgun@J&I3 zf$2cf`-~vn#gk`p^&#{;hvUtgRhBktk9~HNoIsR(L^wB@LWC_5V)}=fBL}Ro}t*KOD{~mH*p@^f^;qsG_zZ znn3sJWi+zt(UXit*ZmSoD9e(j;lFv-%tifK%7%L;XNUeG0-ptuHU76ChapF)-ndDW zFkO!`&V#mTM~~^Y(`nsJUmywt)?khymcv#;wOuS;0Qp$#Z0vAhI3*kvG?fXe3Ckmf86&t4znPfK40DOkk2q9Y>{k6doM4N=0G z@nYkzu9$cx0o%P-$f)4PlhsOfP?$?rE#<*(LlrXNu!$#FwyLcRMduKx8gxQGN24uQ z7RKn%yEK>g==N^l#+e2*6S$)VT7!D1m^;%BwG(Jxn=N9=*Fa$V<(sd=yZ3|0TCjrZ zsiiCGSS~XOCq#tM){+X7mllexaghdMP}^4`=vsGnjc;f3n_p7T-N=7L`KdOq=9^Sz zTn#8{gU%`{i+zy5HD#$Tl!;Mf^tgGDpSUTzGH(1$W2UlkUJxtqD;ghak ztEOJQZkWo2dC(iD0DmK^=CEd(%5VG`lk9EJO{J3Ii$0Ir3Uk8-iV^(6nKu$i<`Di9r@K zFQ!;FXBGi`FBD|75XU1tFz*`bYRQEMc1qG@Y5 zVvZ@gH(q(_QzV1JO`P#2f_umu-yH4HD69&ecgz5v!RM|D@9Pa!3yXL^8N#t*Zl?&b zuOhm4TvaN8LwIH4$VPM2Tmdjfj>@8$ulxr|2)I^wizpB1V}|JnjP(s9Ok!xGhqiwm z3e4s^PrZPlPz4wY?ElN!>-VAXev2UK--BRbMu82ZX3R^#ehfO2=@UXY`W^~>E;c`Y4<6|DZq~W?QzYtE)dOD zkUxtF%5{VozKQV!Wh_HYZYUUL1XD5!$sk{tF(&ngSK*=ZNLEZPq3N&Y8L!|%JT+%b z;-scI%&^MR8Mf@$o@?HQCmMyAelx#@(; ztyb4)HG&W91!+`qTB_%@4L5f*Cz)9L*kC<%1Kq7#@mw8KI4RiM7FHB;)gGuJKgjW7 zxKT?n4Jd?ciIyc1750xn;*Tz0nVGNst; zRbA|!Qy@zaJb;pCFgVf_mU_|3OMd(o5$o6n;h7UNgVJi7b8=(Pg~3WRmp*$vT9r8aMf`?_kijY9*qyhS?hiFHQmAhqx4k zWTMe7LXER#MdLvO*OUhM5~2F3*}Q_IUHXAPl!1CEYy`E0EEEo({YH=)>83LYe87)r zxkYx6J*Eh4r(H@H3Ykd;yIL6NvOaNkg)YQ!Ao>n7Jo!=HHlR9F>U}JLK0>o;VbU1F zjSoBkSsMg>ke%s0iz6{^rf7fCccC^S)F~`6otj~ndP6RZuHi7?f=ov2))KFmw4|wo zKi0{q1G0-V{{Vj(dO}3+H!WmcHQOq1OfpXs^}*d(f=<4Y#2k7ql*Zcu+AZ?r-KfZh zx!NxU#JCmzCvVo@pHBUk&4?sL?caE_cpEetj>v{c=Eb|M=1>YkD|R9ZA=%_LAvMJ> z^K280mSmSE#!d?F(VscJsjhng@%%{VRv!e222OY~xm~AuQ#{Ys_@BE$>>}m(n3gWK z4f=&9`^kiE8W9b3_L%3NJB9m;|k zUY9SQ0b_4C<$S0gLHJfUt#9bsb*-epuUg281#OJc#j*nO8Ulf+rvHsmv%I#g)_@UZ zA6u@t+-Se15m7})tPc_%;M**jPb~6TtjKV%hrr&X)Rrlb;~iz+Q=KZ7GiQQu>jO)T zc$6~Z(04%xf1fKFKl^lTHu55(Ww4aa4=rSkH(E7=?4sXIgTsy7_H%}ofFz=>@eY1U z7aHe>V*JeuS`7tVB-BM6Y-=N1qEh9Sb9jZiRGq~y(s3_lM1E2yvYiw6%b%$XXmSND zZYjx~au4{Wyc8*UzYyIQhoSYu?6MGw)`@S=2L)%H^LZG=HL5;&!u7@O3TB(wp+0q+qbWt(23#?l3&o1 zdu)^dCgS(B6leE^YS)++mSC*+R?77Tl(TwZdpiYkMz<*piGX(~65AxVH>ir2dH4 zw!4eGy*tK=6W}CKV6qad6P!YA&$_h0&g zCdw1q=PKJc`EAprZSd~;!o5J>Qzd_uE_ZPLB(0ds0}nCsyIg7>zItBRcMgg1Fv{7q z_%0m}M{gtR_@vy1VGhB*RIX3oQ~7{aQ_5bLXeG`QUI~kH6G&tAC17KHS!DYOs(}@e zjZ^1@34@$gL>r_jto3H@gN^8%L!;?2UV)u|L7MBk#OKV|L!MFxN7H|u(mGM_5p?*8 zpe~)nbB)n5x(n`2l^E7SW%GS-1PVAo7BQ9SW8Qg|6FTuxNvtBHqN)?$g0xP-R|!8W zX&HQhW&VulO{VowAzAQzgAPsvRCi8b!b?(yFr9%LzR{&q_LdS=}sc%(-pEdt>W z`Q(=fEI0z`M?D~qeEY%h z%M|A(CwGf(SLYj~9%2R8W87@sxR8*JkU~hf*j4JH-k4=P43;Do8fN@)vtyNSeN?d7f@_Ht)J~b(8)&nLa!yS6wtuvge+wlA38{lW$mYA|j@a zO+xlW(qgSL%%aKdybn}^ZVJuuMw?)*9mztFA9?sma6BLS32e*p!iOrzcUospllr(l zLsW@rTs^N;;G|$fFLy+P zQ@)8@UQ9V)`f<6HE-w);J%yLot%V^850q`D3`0W2E1`#Q`w+krMzhG!{}j8+CFunu z#e<5d86DvQDRGKsBSz9<7s4X@Bbgz%J&`%We2rL!6b>beg>6|4gNEt=`D#6a_F9udtCDAgC| zxg}dx+7r~enD`(xecQC#)^=YIuAe!c0jYMi&p)76BQn}mY1YB-7|<@aq;nBqU(~ zohC}+GxO*aO3n#t4h>#jd?BywPK$lU9vPFDVt=@~qbQuKhD}{y!W+zA%_n zRyKgcE&l(-tW<0)|KVt>Q$X`bTscPqxp5f~6#Q9Zu8N*PgS#zBahO zJ)Lp`xv!}r^tbwdly>??MLto;ptM6!qld+;pcS=)6`*z7S|Y|cjNm)4UVl~{1{Cnv z)9mcJyt7xYW0IxkA8 zwU&O6-Yg(?*+-bHe^1dctyH;7E^gG@C}SHZAct>iCHqb1GR-;oqF$+R=c~w=MNwl} zd(1;|Q3N_Cm`#=ABFYm1#%*>w$@d=Qr?%6MMtmFhV#7C5Qy9`r(BcDE%&)FFDJfb7 zir=kc=44FSC{C6Vw>|woBNy*OGwWMuv?G_`z!^Fo z;o+>ZdH2{gRB|Pe4CsX0j_c#(R*GYqlH|qX)A`Hw-4N8%a&_ zRT2d`|4<_nrg|zKT|@ES`7}E;wAPldMw1uL4Rgwn;nV(y!pc+Pt9{6OPh9nCKl)fE zl?xpABa#bv{LFH)IUSPS{5K-9A?{p_LL7S$!Bx^G7sM5@#7wV|Qb@F0Wc%BS>O$e9 zB(Cof#Zkt?@I5Zk$~V2k)5?w(DuZ^U-#CM30K|shyQU11F1d;ICrrol z6P_7Fc2a||(B4uTIAm0Gh++aUGBmW{seRw&UXPFpwH6@(0Vz=Z2Wjo!F2a8Iyt6di z^%Ccs-m)gHWV*bp{D2B*5RpbDfd~cFL4?61fCBW?2M8a;!GqH{m=SlPrL-;b7K*?u zEzMcyEsjNj3YMs~MN$+-cFd?Ic-CR2+u}j1O5s$#@P~MM#DRKH6jMuni=T>o7{E?l8wu zw*{w?1xx83{0~A~n!#sP1YEsY&rzNcgl~nRQ%RgU;E)DUJ~RK)*?ACjm9MQn_DhKDok6 zvF6(5V$|ZsGm6kshJ~^>Wt1VhFitFY!Xh3?XyM_9gYlvV@@L}!EbZ+Cvc0URVypPc zVyif6?|K#UzF)0liC?UKNi=9$F%F=8(yM|DIX$eGCqQd3^slQ}-R%``WyFIE{+uG> z(gcz3=SE^N;?n!W*e|t{2&bXHPLIbeYCT7s;rq7ifhB5WH%|vM&N8kG+9GH^Blijh z{D8I4O6zWssRj(RsBzi`Aw?;){=M((#5~y4v^>F@<{o5fHx-g~l|>Y|rl5<8BZYcWt+fh+75CVbu5enxhdg;B zS8uzR^?19KPi)^m@aEX-Xkls><`b9u(!vjYSQTW;I@Cshh1iV%t&abG^Wm;uJfiCQ zKo$_<-rT`ELLBtNtYxI0o+g;5}Z<-WB!e^q9=7I@Z$hA?}Ge1+_0ZljRpD2ub4x14Mz zs7Ucar1@!l0-|Inr6`w7SahQ)8VqQJOGT!OSVFam+PtvKaYH{a>oG$`3y zMAJ%f@crm8;m;>#Ov{-XMY^7I8`aY!oXkuz-73AQipx#2XCxh3$dJxF9p~rK3ahQi?VPCCNpUK2z1|1{~C=jNsdCcTxe&jfy znt}=LFkqw81hQfG1W>h*HB$a0cs!;;7-FeND(S0Zg{h~A^|Pd|JNignb+El_m__!fl2 z+Qw*S$5TPf&5|o`e&)}J&&5L|e%}Qz7H62tuNO0047f6u>LP-m;Vi|uj6G@jQE^pE zs+;gc`@mH?One2m(?J@N*!T*;K~PHjQ0x_vq=|N~EO4bd1Y8rb!UnI-;27$xy7?sR zey1?cV&Oet0hoR>`7Z=2HnkmW~*tApcum_s%BG zL$t$I!c`*aW)eB?1o9`Y8=s}7ufvcbp1 zubAR>eS(8}qlihCh7CeFgkq>KjA$_CO-KS&tOy1&D|HdB#^pLDa6eLYII1|W^%^3fZmmW+cU%|O@fZhQHglOrY=~QiDD-A{L(!joMUy?i{di-Wt%SbW;usj$Zw~C=kWj*P8Pxo1jB;w z?hT2c^q$5xJ#WiHHom=Wt45b`{O9oFWS4o7dKpbGzyj9KlYedl;Jw^q#TsRn!yZUo$%Vf7B9h4YgHnTY9M-UJZk?{K6;Cm;FVxW{htB)QqiR?#>r-XUN-w1j26pdz zXWR&lUJRIwjXnm9MiTP0K6$$`_-~_m#(225n}3IP&ZMr-FtNCpF{e;ZKQ-e!-f$0F zrEn?pi1q;C5(>lCFwQCZSb(9+6YqhNVx;2jR)K5EJ6qCqG$%;-c{`EaDCG05HJ9|! zmk#k(LL^zdEpeGNmIB$M0}GXJ4nECG<7i8C8xyeE3uc7{-a_)H2|3v}KZ*Ur8_Wa9 zor#E^{6w!7W-WDWRI#DGq3aoVrLkf?{9?w$bq^APuNED+7jWRnx{I4CO5WCJ$lzz7 zHnLnwM1O31N8AAK!N!EMe_b!>7Bs`cZ_z#X%D8Yi6b||2oOh0!<b_~5R!$;2kxcsIITT^RU^G~Pi_}lxBBYK07*XZ|rS1TJ z(vpT}U!Vhh2s)6hUe5BLdlX{4$%OYEc$@wFT^ToS-9N>m)nd3`@kFusikCNrb)~j< zLdT88w&;%iN{%2qLgIc!?sw#z+9?7#ZVhQgj@WMlzt-d6@r2ShY>v0w0V`6w!z>@v zPSaBJLldlq?gIUU>qZmf|kw*@C@A4IGmWgF}&U99xR~zeB_**D8O)qcgXP2 zV@u+V$ut~6#_@9o?f>b?&{0QiXUjx~)=?z-|3h@J%bqw7Lzrd0w$w!WT z2q(7WIs4h)CX)9{952RVq53ep(`bL@t?OxNJ?=Xt@zHJ&N(byV@RpI)i$7&mzNfHaRwbVn9q9~{9 zE<`zqXl+D6&&!owK6tN}@_g~?rZ=Zk>0P(*@CYd3Y9UZ-tNe+u|DEbp(FJuOHH~O8 zP@I|6!K2^0?fblEK1@VeL}5jS`nlkxo(Cn768>^za5XbCRXbzDjyWzNRd%)r*lH8T zv~X&;=$rwr>W)M6F=7w+$pGr1FtSabXmLN;(7FjvIISC=+7850IQ}lxb9f@Y9`)4(v? z!S}$knJ+s0`b!vwKe=w7nD5Hw1s2Sz_b&9rDb1adpk*0p`S|~GknJ1S*X-i1bxzzh zbRz_ob>t{u=%;YR53Z<$mz0LXe=-|-W#M5$GJ!O02#*COIx7f$Y6xA5!0R{+jg?%n zv9oCq%qC7%(cO@D?^ro4zeRC_UJFT`1IyN6-3T{w(TNp8HaXDix5hK+c|sj#5c?*7 z)Pp#rLiVjxQ(swxo$lo4OKBy2dC5h`r|$d11PS3D%##ZDa7#>5Y`34-m|&8dlRTFa zkt7FNGW&f}!t&_bUqOc@4u&XDeg(qM^feW_rG5SiHH~~z*4`LM@@QkiM{#|_=&I9O zaV>pSnU#i|sbI>BdZrV8gXK2aa}2(rNA0vaOuzYa=-3!78~1Uffqfbw`}Kb7vgTVAvYk_m!c|woPx# z;oQ(i_jORr9?CTjnmTc5F|NcIKQOL49@)mXdXpzuN;}*KoLFpKq9SoplDj4xt7@Hu zRnp89#SH~T6<5T&Da5`|9Sgj^u|!>!njWVgYqFZ1zlF%R>WNfq;fEqjl>d-TWr4si zs`y(iStaPun&V&W9HQ<_BN=N@VIK|8c_SC8vn2+9Hbs6yAa@8u@yQpav^PLAG=-ZX z>S| z)1UD@yv2xpBl*QmOs7BQhfD|cIRasV_#;8`u60mEYuZw^0e6Zge{{D#4))p$Uq=8w zQ#8LIqL1)bturpfbBk!!xuS@Tt95VQfeRWzl$T_CRnUzJ(n@5P9QH_`!hl&F%Uw2$$5xrg|YA zAosxu7#3bR#C%EMK#k#&!LD5T*(U<44bA!HHPYV27@tg5jX)6p z>Ciag6<4-9GJlimunzNDg>_>XX=7Ka%pR9-uC6Y0MY(qB8S+h5?uk=&&7~6Y738hV z-j?(=g1k!JhSDc$(<~yHf$z3x(NvW4ZM@QGrJ&{^ddk^m=f{PkTtLePkwez+_qS-5+mGxLRRa|BEPyr-P zFB_TBc1Tu^Di@A;CFSM@}5c4wSMEw4G-a+7F*HY$+#?UTn zn)I$BNL75_P*bFGgjn(6b4!N4sVNAuo);3_Bcz!e2{yvyfVOypHm z7h7+0Q%0}IwAdq=vu|+;Sr5CF+~Wu?#kPDByvr6h&~{U1Cx=6_8;oakt=iN27Cwg* zF1!%!=a>7+oQ|oq^DAQ4&$Xm|qY3Fh=*<=x`26KNg^tz7UoE;Q3r-AA4jN(_&h>oZ z22V}8Lo%~YYMe7#qhD?^@rPf*Z`td+!;brxHz$1PpFXc~wkEw;7j|d89Ei7QcHDoq zJ$rkXwcbE;2J-^gA~pnUc9H$(Hu3+RH5mOXIsG@zz<(Vvs~zj&sA2k;&`;D$L(0?n zksXok)ze6QBUu5WO!_tu2n0}XBAGu7%%Vx4<2G_d6S9=~T%~#LDpR#s?iQ9l2P%1a zE92{P_qqEfN8a}VEXUErWyv@MynCYKVB(4Iz&q#8!R5{U{Ina0Ba~lc#vcqdCz9w( zkOhgo%Af&?zUgJA8&A!Sl7ccfH~rk!Y^!Pj`enRZN97JP6(6<;E?WLln3}}}r9crpBED>xpqWg3=UtWLP&^z{^p_ahC7Rw7tz3 z#oRE2>Atgt5NCPdD7rDSGNsz}d?C?aJl4O*%?BZwo5^TOi$Mury3lHIaJ{Ydl|jtQ zW-e(fG7UiI*JW-Ab5dSlvd|cU(l{W6BD*Xq+nve?-abtU8Kq7ssYMbo-zONfJcx*IkSvFubJA6=28~V^^CZY%cW9YEg#0diCV% zB%99)q36QH)1m5?l3G)EBl{y`VQyPy@ZbXxs+iYx%*G~fTrzG#Gv6;7OL@V%RF!Ap zLAk7CMTWzaN^60LKvAoTCHSaIn{FI)HRxn(SW~5fWXh{8U2LCZ6?b$E=fDnenci&r zC1_1**l5%V=`n;fwaI5F=9H3T2OW|PdY+sQ`%7EG3U*GbXk9vL(?1^!W>^QQS-&1B ztyi9*?Q4|aN+3@LH$;exFStpl#Hgo5G7@W`FK{!fdQ7M@FzFz(KT%VQ-}@}(`+B}i zU&FsVljVocSa(nUoDKH&n!PZmSdc%uKdM|>Bl?2tK}Cu32L@nwz3~6lnf@r! zM}L2~(GB$)W5;TGg*JU$iXqN-c+JXXj_SZX1f?YHw-0>}(q|4QcEODFRp7e>FaLP- z;w4G>YHuC4>P84<|CjasMtO#liCo^ zY0hJ5iYOr{NgbclRCT*cfpb#4DVupU+s_a1gH9%D-amPx3;7@vEJaD2_(gTPVZv{t z4%{>Q;zxhqApxmZh!A58q|*9?j@KV@FJ=@U+Rq`{p|BIPWgq+snVqN$;{O3>80wQG zK3TZGQX*?tR+fTf31tg$qila}I3wyV71L1e8L?5sD^Y@xe^#_h=M1fyN^ zN8)cDSm_n7k;zAT{;;LgORSu@NCr_T{eqE@m$Z!=i46W9hZ}{04>{&{xo{8yrYB8f z&#BI`w1u!6F1FmvMn>m8iC@q-+Nq1%eC+eo5n@@c^~Cfnj)(Kyt6p)a=y z;Q~%c9@P;65}#?~e@buO&}@*wDoe7Y1FtK_;bdt3vc3gJ&pr7=Em0G@Z9}elWz+~= z14WFybXGKEz%T#YQ0LOs^USHgr>K4ho!dOc9!XxqEgs( z_T?66y$W0I6}Nri8{_&n%=n^B;&M+gZC{!2K4{5BY@-Rv+iHOar1k71n_-+DBy`*% z3r;9uF^ED-L<-lLL9!ny<8BMa^>R!wfg--vXT{PI>_OUYDnQ^5mEC{i-WXlSDj-;=LKdg zesdllPgSy-wnyTZbJf{Wag0hCkI44)osR$e#Q^-p!%qR#tP-7 z_rOGa?0RZn0!uwbd8#s&=!f@ zROV>B9%OFObFdYv=r{!myU8WFC3b95T(L&Olx@D3QZ@|i%Ab-uRbuH@;Y#{)phjJ` zaE=m?B!u8SP@S@Bwe4`4X(=rag=GO6D=4s8PTFiTHVg?gm-pYFpzrD^h=C^6tk3po zSI2E@X|qiiTsFFK66$Aa!$Yu47%Fo4rOEdnH2bfG*MA5UOO?fZnw@T@n!mvKg@s0v zH}i&lPMMf=BcnqIzbY3Kd=^RV^5Hz$yl8t&frec-C^xY(`g@NiII2%VS4E$8`Fy9f zR-P|~6h8)>^jGn7IxdlKQ5>hE4x04xMjsVcfR}gp5_brRET2MsL{1uVyyH|Kbp5Fe zlxM}bX-9@hub=KgT5$|c1J!2-Z9~uVPZ7eJGQY%SNP)xqiOgU3 z+ifY+PuCOD=v*DDn?sUkfuHg{@=A9{wNC`RjKW++>4ZPR%6{a{N|+3izHZdT2IAw` z_=kls__3-{xFmH!7-TC7Lobqy3;?eXxy@RPVK50-PM4e<1iLw~`&;tCeeERN`4y{5 zXIG%zOE%aEWKAfy)t5Yo%_H)F)X z*237(>3^X^&We|k>-&TfGz|tS?8PtNpMTN=nvUVTORNw{olk;sC&Zo1XdMCz0`(@T zMn?CW4DK#UIpdP>F3s6dCg1s&0BjCvG(kmvO6v57Q2( zVh%|crSI2B6Ok9dqmeG7gQ9V$LUhAQ_d5A+7DBlwh(dV$Rss!tCFi4Vq0n)wtCqr@ zu1t<~sHE;%=W(Gon~LGoRW>fLR6B7a3)ajT@ECnZEaCckeLqIoaRg+!LTJ`)aws#H zp7CR0%3tdjPi3T8Cq_=4@&;s22tk7>H6T0U!W5&G02f3cdqIseYQ=0{YyPwcr}Y+^ z)jgE_ke)3v9(HK)Aw5lm8mjccmAvfcofJ3pGzaf*@AMfk_i_H`JAJRa_opS)J8IIb z_;JbpPbk6DOBL2l%?lRuB5SOI$npb0=&@+%iuCeFKIwR~aU{rOvw|CvYW^_zJt0Ws z<_Kj10~(pkzoy?NGut|RJGy{-fUQyp;G>AFQ1UbaCqG!B=86#bj`5I9Lm90+#(ruZ z9~RGDF~!@EUPlb~%X5~5OPksYYato_oXkOQ;Y2!_jTrumT>LZ4u!6M0RH z5EESc?CTu1ScFR(yAn}2@&{IIV*_Yg@6lGV+?j=^7$;Gg5RYcgSbz8C`eq+>PYOy$ zJ83<3W4c;UDODP{du4UE(fsh6?nDz|Fy&kzkq?Dpxi|yz!)hpgyTFpx)n-2RRYUkJ zoC2p7ZdFY)wQyClj{Ro06L6+;Y56t?9M8k7Wvkk`bfSJJbMf7dwGf;)TMFYJ!lv?f z>ao(Okdqvr=s#tvm_kWX?Hks8G)AR%3>c$k?1G*LJtMIz?z(RL!q%OaM(;!mHc6Au zU1kRONtdq)UCw8DqWSiYT^9bWUk#w21O!+L|DU@0zxezC0U!U&<-hly!5@fLjA+b1NfS2V+BHb33O$s{%;TQcX=v|Dv9hk)*9>ondDA#{2;gkpcl}`P7z# z2B`VlW64Vae?a-|?oa3dEBoDMjsUu1pKiY;Q9^rk3tE! z{eP>;2*^r^iYO`5$%wv3_^rmj8wLa|{;6aE?thah_@^2G{-HmW-hb8jm$1P;Ww3A6od` zUwaSd?kAm}2Y?v^T)&ZI|526!=Kc?Gfaf)JFm`m52B^Io+x%OA;ypa2M`3>lpew^* zf6s;Z1AY|qZ{YzH+*Zzx04^C(b1P#3Lqk9dGWs_9rvI&htlLpg4?u?p13LUSMZiDG z0>R%lAm*SCP)}6>Fjb1%S{qB-+FCl>{e9PvZ4aY80Bo)U&=G(bvOkp!fUW#Z*ZdBx z1~5E;QtNNF_xHGuI~e=r0JK%WMf4|BAfPq6zr~gKx7GbU9``Cak1xQw*b(024blHS zo{giEzLnK~v*BOHH&%3jX~l>d2#DY>&ldzp@%x+q8^8ec8{XeP-9eLe z{$J28rT!L8+Sc^HzU@GBexQ25pjQQWVH|$}%aZ+DFnNG>i-4n}v9$p}F_%Qz)==L{ z7+|mt<_6Ax@Vvh_+V^tze>7Ai|Nq^}-*>}%o!>t&fzO6ZBt23g4r?*WLL8)z|!gQsH?I_!|Jg%KoqXrnK`% z*#H3k$!LFz{d`~fz3$E*mEkP@qw>F{PyV|*_#XbfmdYRSsaF3L{(o6Yyl?2e;=vyc zeYXFPhW_;Y|3&}cJ^Xv>{y*R^9sUXaowxiR_B~_$AFv8e{{;KzZHV`n?^%ogz|8ab zC(PdyGydDm_?{p5|Ec8cRTBuJD7=ktkw-{nV;#0k5o;S?!9D>&LLkM0AP6Feg`f{0 zDQpB`k<`JrvB<<-J;OKd%+1!z`DQP}{M_XnsTQvW)#kKd4xjO+0(FK~P*t8f?34gT zNeb{dG5{jMk|Z%xPNd?)Kr$uFk;z0bG4oFYGnNlV6q8Vd`WhQhkz5p#m^vZSc48n^ z)8XlE1_e=c^$WG1no(|j8Tc`PgwP}{$Z2MV1V$=SXvP)gXKtqW)?5PUcJu&?e*#h! zqs>gH(jDQk$9cz8;-w$cc*dE1}qLepfsBCXA@(bAJ66ft0aCq$Wrcq)WXX{0nm+#w=uBj1o9rLyA i;x|p)^~-yfPOPa3(|vBayXKz \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradlew.bat b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradlew.bat new file mode 100644 index 00000000000..e95643d6a2c --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega From c2f5038d754bac614f5141a4381a3c3778dab228 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 6 Jun 2019 15:36:00 -0400 Subject: [PATCH 31/73] Add/update new core team member: etherealjoy (#3116) --- README.md | 2 +- website/dynamic/team.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73fde0dcfc4..744ad200d7d 100644 --- a/README.md +++ b/README.md @@ -604,7 +604,7 @@ OpenAPI Generator core team members are contributors who have been making signif * [@cbornet](https://github.com/cbornet) (2016/05) * [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview) * [@jmini](https://github.com/jmini) (2018/04) -* [@sunn](https://github.com/sunn) (2019/06) +* [@etherealjoy](https://github.com/etherealjoy) (2019/06) :heart: = Link to support the contributor directly diff --git a/website/dynamic/team.yml b/website/dynamic/team.yml index 9ddd77b78cc..c3a2d9509f2 100644 --- a/website/dynamic/team.yml +++ b/website/dynamic/team.yml @@ -18,3 +18,6 @@ core: - name: Jérémie Bresson github: jmini joined: 2018/04 + - name: sunn + github: etherealjoy + joined: 2019/06 From 3df525ee339a368ec59d945447e5677f004a8619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20F=C3=A9ron?= <420581+gferon@users.noreply.github.com> Date: Fri, 7 Jun 2019 18:28:43 +0200 Subject: [PATCH 32/73] Add enum support to `rust` and skip none option serialization in clients (#2244) * Add support for enum schemas and properties to the rust generator Also: * Skip serializing a field with serde if it's optional and empty * Fix borrow checker error when using &std::path::Path (should be std::path::PathBuf) * Add script to generate sample with rust-reqwest * Regenerate petstore sample for both rust targets * Remove go code from README.md * Fix formatting of serde skip_serializing_if attribute --- .../codegen/languages/RustClientCodegen.java | 25 +++--- .../src/main/resources/rust/README.mustache | 65 +--------------- .../src/main/resources/rust/model.mustache | 44 ++++++++--- .../client/petstore/rust-reqwest/README.md | 43 ++--------- .../petstore/rust-reqwest/docs/ApiResponse.md | 1 + .../petstore/rust-reqwest/docs/Category.md | 1 + .../petstore/rust-reqwest/docs/Order.md | 1 + .../client/petstore/rust-reqwest/docs/Pet.md | 1 + .../petstore/rust-reqwest/docs/PetApi.md | 77 +++++++++++++------ .../petstore/rust-reqwest/docs/StoreApi.md | 36 ++++++--- .../client/petstore/rust-reqwest/docs/Tag.md | 1 + .../client/petstore/rust-reqwest/docs/User.md | 1 + .../petstore/rust-reqwest/docs/UserApi.md | 72 +++++++++++------ samples/client/petstore/rust-reqwest/pom.xml | 2 +- .../petstore/rust-reqwest/src/apis/pet_api.rs | 4 +- .../rust-reqwest/src/models/api_response.rs | 9 ++- .../rust-reqwest/src/models/category.rs | 7 +- .../petstore/rust-reqwest/src/models/order.rs | 25 ++++-- .../petstore/rust-reqwest/src/models/pet.rs | 21 ++++- .../petstore/rust-reqwest/src/models/tag.rs | 7 +- .../petstore/rust-reqwest/src/models/user.rs | 19 +++-- samples/client/petstore/rust/README.md | 43 ++--------- .../client/petstore/rust/docs/ApiResponse.md | 1 + samples/client/petstore/rust/docs/Category.md | 1 + .../client/petstore/rust/docs/InlineObject.md | 11 --- .../petstore/rust/docs/InlineObject1.md | 11 --- samples/client/petstore/rust/docs/Order.md | 1 + samples/client/petstore/rust/docs/Pet.md | 1 + samples/client/petstore/rust/docs/PetApi.md | 77 +++++++++++++------ samples/client/petstore/rust/docs/StoreApi.md | 36 ++++++--- samples/client/petstore/rust/docs/Tag.md | 1 + samples/client/petstore/rust/docs/User.md | 1 + samples/client/petstore/rust/docs/UserApi.md | 72 +++++++++++------ .../client/petstore/rust/examples/client.rs | 39 ---------- .../petstore/rust/examples/error_handling.rs | 49 ------------ .../client/petstore/rust/src/apis/pet_api.rs | 4 +- .../petstore/rust/src/models/api_response.rs | 9 ++- .../petstore/rust/src/models/category.rs | 7 +- .../petstore/rust/src/models/inline_object.rs | 32 -------- .../rust/src/models/inline_object_1.rs | 32 -------- .../client/petstore/rust/src/models/order.rs | 25 ++++-- .../client/petstore/rust/src/models/pet.rs | 21 ++++- .../client/petstore/rust/src/models/tag.rs | 7 +- .../client/petstore/rust/src/models/user.rs | 19 +++-- 44 files changed, 458 insertions(+), 504 deletions(-) delete mode 100644 samples/client/petstore/rust/docs/InlineObject.md delete mode 100644 samples/client/petstore/rust/docs/InlineObject1.md delete mode 100644 samples/client/petstore/rust/examples/client.rs delete mode 100644 samples/client/petstore/rust/examples/error_handling.rs delete mode 100644 samples/client/petstore/rust/src/models/inline_object.rs delete mode 100644 samples/client/petstore/rust/src/models/inline_object_1.rs diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 03b0c865eae..6bd358bd234 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -123,8 +123,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { // TODO(bcourtine): review file mapping. // I tried to map as "std::io::File", but Reqwest multipart file requires a "AsRef" param. // Getting a file from a Path is simple, but the opposite is difficult. So I map as "std::path::Path". - // Reference is required here because Path does not implement the "Sized" trait. - typeMapping.put("file", "&std::path::Path"); + typeMapping.put("file", "std::path::PathBuf"); typeMapping.put("binary", "::models::File"); typeMapping.put("ByteArray", "String"); typeMapping.put("object", "Value"); @@ -151,6 +150,12 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { setLibrary(HYPER_LIBRARY); } + @Override + public Map postProcessModels(Map objs) { + // process enum in models + return postProcessModelsEnum(objs); + } + @Override public void processOpts() { super.processOpts(); @@ -488,25 +493,25 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { @Override public String toEnumVarName(String name, String datatype) { if (name.length() == 0) { - return "EMPTY"; + return "Empty"; } // number if ("int".equals(datatype) || "double".equals(datatype) || "float".equals(datatype)) { String varName = name; - varName = varName.replaceAll("-", "MINUS_"); - varName = varName.replaceAll("\\+", "PLUS_"); - varName = varName.replaceAll("\\.", "_DOT_"); + varName = varName.replaceAll("-", "Minus"); + varName = varName.replaceAll("\\+", "Plus"); + varName = varName.replaceAll("\\.", "Dot"); return varName; } // for symbol, e.g. $, # if (getSymbolName(name) != null) { - return getSymbolName(name).toUpperCase(Locale.ROOT); + return getSymbolName(name); } // string - String enumName = sanitizeName(underscore(name).toUpperCase(Locale.ROOT)); + String enumName = sanitizeName(camelize(name)); enumName = enumName.replaceFirst("^_", ""); enumName = enumName.replaceFirst("_$", ""); @@ -519,7 +524,9 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { @Override public String toEnumName(CodegenProperty property) { - String enumName = underscore(toModelName(property.name)).toUpperCase(Locale.ROOT); + // camelize the enum name + // phone_number => PhoneNumber + String enumName = camelize(toModelName(property.name)); // remove [] for array or map of enum enumName = enumName.replace("[]", ""); diff --git a/modules/openapi-generator/src/main/resources/rust/README.mustache b/modules/openapi-generator/src/main/resources/rust/README.mustache index 83f83acdc96..62aa006644d 100644 --- a/modules/openapi-generator/src/main/resources/rust/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust/README.mustache @@ -20,10 +20,10 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Installation -Put the package under your project folder and add the following in import: +Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: ``` - "./{{{packageName}}}" + openapi = { path = "./generated" } ``` ## Documentation for API Endpoints @@ -40,69 +40,12 @@ Class | Method | HTTP request | Description {{#models}}{{#model}} - [{{{classname}}}]({{{modelDocPath}}}{{{classname}}}.md) {{/model}}{{/models}} -## Documentation For Authorization - -{{^authMethods}} Endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} -{{#authMethods}} - -## {{{name}}} - -{{#isApiKey}}- **Type**: API key - -Example -``` - auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. - }) - r, err := client.Service.Operation(auth, args) -``` -{{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication - -Example +To get access to the crate's generated documentation, use: ``` - auth := context.WithValue(context.TODO(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", - }) - r, err := client.Service.Operation(auth, args) +cargo doc --open ``` -{{/isBasic}} -{{#isOAuth}} - -- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} - -Example - -``` - auth := context.WithValue(context.TODO(), sw.ContextAccessToken, "ACCESSTOKENSTRING") - r, err := client.Service.Operation(auth, args) -``` - -Or via OAuth2 module to automatically refresh tokens and perform user authentication. - -``` - import "golang.org/x/oauth2" - - / .. Perform OAuth2 round trip request and obtain a token .. // - - tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) - auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) - r, err := client.Service.Operation(auth, args) -``` - -{{/isOAuth}} -{{/authMethods}} - ## Author {{#apiInfo}}{{#apis}}{{^hasMore}}{{{infoEmail}}} diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index ba7d821a117..4c6b8dff10c 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -8,13 +8,28 @@ #[allow(unused_imports)] use serde_json::Value; +{{!-- for enum schemas --}} +{{#isEnum}} +/// {{{description}}} +#[derive(Debug, Serialize, Deserialize)] +pub enum {{classname}} { +{{#allowableValues}} +{{#enumVars}} + #[serde(rename = "{{{value}}}")] + {{name}}, +{{/enumVars}}{{/allowableValues}} +} +{{/isEnum}} + +{{!-- for non-enum schemas --}} +{{^isEnum}} #[derive(Debug, Serialize, Deserialize)] pub struct {{{classname}}} { {{#vars}} {{#description}} /// {{{description}}} {{/description}} - #[serde(rename = "{{{baseName}}}")] + #[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})] pub {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}}, {{/vars}} } @@ -31,16 +46,23 @@ impl {{{classname}}} { } } } -{{#isEnum}} -// TODO enum -// List of {{{name}}} -//const ( -// {{#allowableValues}} -// {{#enumVars}} -// {{{name}}} {{{classname}}} = "{{{value}}}" -// {{/enumVars}} -// {{/allowableValues}} -//) {{/isEnum}} + +{{!-- for properties that are of enum type --}} +{{#vars}} +{{#isEnum}} +/// {{{description}}} +#[derive(Debug, Serialize, Deserialize)] +pub enum {{enumName}} { +{{#allowableValues}} +{{#enumVars}} + #[serde(rename = "{{{value}}}")] + {{name}}, +{{/enumVars}} +{{/allowableValues}} +} +{{/isEnum}} +{{/vars}} + {{/model}} {{/models}} diff --git a/samples/client/petstore/rust-reqwest/README.md b/samples/client/petstore/rust-reqwest/README.md index 9d256c59927..d8591a2cb9f 100644 --- a/samples/client/petstore/rust-reqwest/README.md +++ b/samples/client/petstore/rust-reqwest/README.md @@ -3,6 +3,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. ## Overview + This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 @@ -10,9 +11,11 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - Build package: org.openapitools.codegen.languages.RustClientCodegen ## Installation -Put the package under your project folder and add the following in import: + +Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: + ``` - "./petstore_client" + openapi = { path = "./generated" } ``` ## Documentation for API Endpoints @@ -53,42 +56,10 @@ Class | Method | HTTP request | Description - [User](docs/User.md) -## Documentation For Authorization +To get access to the crate's generated documentation, use: -## api_key -- **Type**: API key - -Example ``` - auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. - }) - r, err := client.Service.Operation(auth, args) -``` -## petstore_auth -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - -Example -``` - auth := context.WithValue(context.TODO(), sw.ContextAccessToken, "ACCESSTOKENSTRING") - r, err := client.Service.Operation(auth, args) -``` - -Or via OAuth2 module to automatically refresh tokens and perform user authentication. -``` - import "golang.org/x/oauth2" - - / .. Perform OAuth2 round trip request and obtain a token .. // - - tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) - auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) - r, err := client.Service.Operation(auth, args) +cargo doc --open ``` ## Author diff --git a/samples/client/petstore/rust-reqwest/docs/ApiResponse.md b/samples/client/petstore/rust-reqwest/docs/ApiResponse.md index 3af9a16ab36..fe896d1a86d 100644 --- a/samples/client/petstore/rust-reqwest/docs/ApiResponse.md +++ b/samples/client/petstore/rust-reqwest/docs/ApiResponse.md @@ -1,6 +1,7 @@ # ApiResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **i32** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/Category.md b/samples/client/petstore/rust-reqwest/docs/Category.md index 39aaee2b052..5890848827d 100644 --- a/samples/client/petstore/rust-reqwest/docs/Category.md +++ b/samples/client/petstore/rust-reqwest/docs/Category.md @@ -1,6 +1,7 @@ # Category ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/Order.md b/samples/client/petstore/rust-reqwest/docs/Order.md index f350a8b5b4e..6d27453a76b 100644 --- a/samples/client/petstore/rust-reqwest/docs/Order.md +++ b/samples/client/petstore/rust-reqwest/docs/Order.md @@ -1,6 +1,7 @@ # Order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/Pet.md b/samples/client/petstore/rust-reqwest/docs/Pet.md index 097c4390288..53a462e68b9 100644 --- a/samples/client/petstore/rust-reqwest/docs/Pet.md +++ b/samples/client/petstore/rust-reqwest/docs/Pet.md @@ -1,6 +1,7 @@ # Pet ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/PetApi.md b/samples/client/petstore/rust-reqwest/docs/PetApi.md index 89a95eebaf1..a74635038e7 100644 --- a/samples/client/petstore/rust-reqwest/docs/PetApi.md +++ b/samples/client/petstore/rust-reqwest/docs/PetApi.md @@ -14,12 +14,15 @@ Method | HTTP request | Description [**upload_file**](PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image -# **add_pet** + +## add_pet + > add_pet(ctx, body) Add a new pet to the store ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -35,17 +38,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_pet** + +## delete_pet + > delete_pet(ctx, pet_id, optional) Deletes a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -53,6 +59,7 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes @@ -70,12 +77,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **find_pets_by_status** + +## find_pets_by_status + > Vec<::models::Pet> find_pets_by_status(ctx, status) Finds Pets by status @@ -83,6 +92,7 @@ Multiple status values can be provided with comma separated strings ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -98,12 +108,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **find_pets_by_tags** + +## find_pets_by_tags + > Vec<::models::Pet> find_pets_by_tags(ctx, tags) Finds Pets by tags @@ -111,6 +123,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -126,12 +139,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_pet_by_id** + +## get_pet_by_id + > ::models::Pet get_pet_by_id(ctx, pet_id) Find pet by ID @@ -139,6 +154,7 @@ Returns a single pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -154,17 +170,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_pet** + +## update_pet + > update_pet(ctx, body) Update an existing pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -180,17 +199,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_pet_with_form** + +## update_pet_with_form + > update_pet_with_form(ctx, pet_id, optional) Updates a pet in the store with form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -198,6 +220,7 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes @@ -216,17 +239,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file** + +## upload_file + > ::models::ApiResponse upload_file(ctx, pet_id, optional) uploads an image ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -234,13 +260,14 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pet_id** | **i64**| ID of pet to update | **additional_metadata** | **String**| Additional data to pass to server | - **file** | **&std::path::Path**| file to upload | + **file** | **std::path::PathBuf**| file to upload | ### Return type @@ -252,8 +279,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust-reqwest/docs/StoreApi.md b/samples/client/petstore/rust-reqwest/docs/StoreApi.md index 7451dacfd6d..e57378b9f84 100644 --- a/samples/client/petstore/rust-reqwest/docs/StoreApi.md +++ b/samples/client/petstore/rust-reqwest/docs/StoreApi.md @@ -10,7 +10,9 @@ Method | HTTP request | Description [**place_order**](StoreApi.md#place_order) | **post** /store/order | Place an order for a pet -# **delete_order** + +## delete_order + > delete_order(order_id) Delete purchase order by ID @@ -18,6 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **String**| ID of the order that needs to be deleted | @@ -32,18 +35,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_inventory** + +## get_inventory + > ::std::collections::HashMap get_inventory(ctx, ) Returns pet inventories by status Returns a map of status codes to quantities ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -56,12 +62,14 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_order_by_id** + +## get_order_by_id + > ::models::Order get_order_by_id(order_id) Find purchase order by ID @@ -69,6 +77,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **i64**| ID of pet that needs to be fetched | @@ -83,17 +92,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **place_order** + +## place_order + > ::models::Order place_order(body) Place an order for a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Order**](Order.md)| order placed for purchasing the pet | @@ -108,8 +120,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust-reqwest/docs/Tag.md b/samples/client/petstore/rust-reqwest/docs/Tag.md index d1118479b90..cc377c0ef4b 100644 --- a/samples/client/petstore/rust-reqwest/docs/Tag.md +++ b/samples/client/petstore/rust-reqwest/docs/Tag.md @@ -1,6 +1,7 @@ # Tag ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/User.md b/samples/client/petstore/rust-reqwest/docs/User.md index 33aa9693902..8f0a63847cc 100644 --- a/samples/client/petstore/rust-reqwest/docs/User.md +++ b/samples/client/petstore/rust-reqwest/docs/User.md @@ -1,6 +1,7 @@ # User ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust-reqwest/docs/UserApi.md b/samples/client/petstore/rust-reqwest/docs/UserApi.md index c6353d423e3..17d278b4b5c 100644 --- a/samples/client/petstore/rust-reqwest/docs/UserApi.md +++ b/samples/client/petstore/rust-reqwest/docs/UserApi.md @@ -14,7 +14,9 @@ Method | HTTP request | Description [**update_user**](UserApi.md#update_user) | **put** /user/{username} | Updated user -# **create_user** + +## create_user + > create_user(body) Create user @@ -22,6 +24,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**User**](User.md)| Created user object | @@ -36,17 +39,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_users_with_array_input** + +## create_users_with_array_input + > create_users_with_array_input(body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Vec<::models::User>**](array.md)| List of user object | @@ -61,17 +67,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_users_with_list_input** + +## create_users_with_list_input + > create_users_with_list_input(body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Vec<::models::User>**](array.md)| List of user object | @@ -86,12 +95,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_user** + +## delete_user + > delete_user(username) Delete user @@ -99,6 +110,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The name that needs to be deleted | @@ -113,17 +125,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_user_by_name** + +## get_user_by_name + > ::models::User get_user_by_name(username) Get user by user name ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The name that needs to be fetched. Use user1 for testing. | @@ -138,17 +153,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **login_user** + +## login_user + > String login_user(username, password) Logs user into the system ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The user name for login | @@ -164,16 +182,19 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **logout_user** + +## logout_user + > logout_user() Logs out current logged in user session ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -186,12 +207,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_user** + +## update_user + > update_user(username, body) Updated user @@ -199,6 +222,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | @@ -214,8 +238,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust-reqwest/pom.xml b/samples/client/petstore/rust-reqwest/pom.xml index 299a9058f7c..8ef695226a9 100644 --- a/samples/client/petstore/rust-reqwest/pom.xml +++ b/samples/client/petstore/rust-reqwest/pom.xml @@ -4,7 +4,7 @@ RustReqwestPetstoreClientTests pom 1.0-SNAPSHOT - Rust Reqwest Petstore Client + Rust (reqwest) Petstore Client diff --git a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs index edea306534e..2bf993408e2 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs @@ -35,7 +35,7 @@ pub trait PetApi { fn get_pet_by_id(&self, pet_id: i64) -> Result<::models::Pet, Error>; fn update_pet(&self, body: ::models::Pet) -> Result<(), Error>; fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: &std::path::Path) -> Result<::models::ApiResponse, Error>; + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result<::models::ApiResponse, Error>; } impl PetApi for PetApiClient { @@ -197,7 +197,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: &std::path::Path) -> Result<::models::ApiResponse, Error> { + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result<::models::ApiResponse, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/samples/client/petstore/rust-reqwest/src/models/api_response.rs b/samples/client/petstore/rust-reqwest/src/models/api_response.rs index 7d33d285b87..c256dd541f2 100644 --- a/samples/client/petstore/rust-reqwest/src/models/api_response.rs +++ b/samples/client/petstore/rust-reqwest/src/models/api_response.rs @@ -13,13 +13,14 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct ApiResponse { - #[serde(rename = "code")] + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, - #[serde(rename = "type")] + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub _type: Option, - #[serde(rename = "message")] + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, } @@ -33,3 +34,5 @@ impl ApiResponse { } } } + + diff --git a/samples/client/petstore/rust-reqwest/src/models/category.rs b/samples/client/petstore/rust-reqwest/src/models/category.rs index d18877e805f..c65206929e3 100644 --- a/samples/client/petstore/rust-reqwest/src/models/category.rs +++ b/samples/client/petstore/rust-reqwest/src/models/category.rs @@ -13,11 +13,12 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Category { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "name")] + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, } @@ -30,3 +31,5 @@ impl Category { } } } + + diff --git a/samples/client/petstore/rust-reqwest/src/models/order.rs b/samples/client/petstore/rust-reqwest/src/models/order.rs index f5c7ceb74d7..b3cfb487b8d 100644 --- a/samples/client/petstore/rust-reqwest/src/models/order.rs +++ b/samples/client/petstore/rust-reqwest/src/models/order.rs @@ -13,20 +13,21 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Order { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "petId")] + #[serde(rename = "petId", skip_serializing_if = "Option::is_none")] pub pet_id: Option, - #[serde(rename = "quantity")] + #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, - #[serde(rename = "shipDate")] + #[serde(rename = "shipDate", skip_serializing_if = "Option::is_none")] pub ship_date: Option, /// Order Status - #[serde(rename = "status")] + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - #[serde(rename = "complete")] + #[serde(rename = "complete", skip_serializing_if = "Option::is_none")] pub complete: Option, } @@ -43,3 +44,15 @@ impl Order { } } } + +/// Order Status +#[derive(Debug, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "placed")] + Placed, + #[serde(rename = "approved")] + Approved, + #[serde(rename = "delivered")] + Delivered, +} + diff --git a/samples/client/petstore/rust-reqwest/src/models/pet.rs b/samples/client/petstore/rust-reqwest/src/models/pet.rs index e7d4466d2d9..73189d5bcfc 100644 --- a/samples/client/petstore/rust-reqwest/src/models/pet.rs +++ b/samples/client/petstore/rust-reqwest/src/models/pet.rs @@ -13,20 +13,21 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Pet { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "category")] + #[serde(rename = "category", skip_serializing_if = "Option::is_none")] pub category: Option<::models::Category>, #[serde(rename = "name")] pub name: String, #[serde(rename = "photoUrls")] pub photo_urls: Vec, - #[serde(rename = "tags")] + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] pub tags: Option>, /// pet status in the store - #[serde(rename = "status")] + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } @@ -43,3 +44,15 @@ impl Pet { } } } + +/// pet status in the store +#[derive(Debug, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "available")] + Available, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "sold")] + Sold, +} + diff --git a/samples/client/petstore/rust-reqwest/src/models/tag.rs b/samples/client/petstore/rust-reqwest/src/models/tag.rs index e5964cc9ea1..cb76addf6e6 100644 --- a/samples/client/petstore/rust-reqwest/src/models/tag.rs +++ b/samples/client/petstore/rust-reqwest/src/models/tag.rs @@ -13,11 +13,12 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Tag { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "name")] + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, } @@ -30,3 +31,5 @@ impl Tag { } } } + + diff --git a/samples/client/petstore/rust-reqwest/src/models/user.rs b/samples/client/petstore/rust-reqwest/src/models/user.rs index bfa6bfb96e4..08bb9db1b6c 100644 --- a/samples/client/petstore/rust-reqwest/src/models/user.rs +++ b/samples/client/petstore/rust-reqwest/src/models/user.rs @@ -13,24 +13,25 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct User { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "username")] + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] pub username: Option, - #[serde(rename = "firstName")] + #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")] pub first_name: Option, - #[serde(rename = "lastName")] + #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")] pub last_name: Option, - #[serde(rename = "email")] + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, - #[serde(rename = "password")] + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] pub password: Option, - #[serde(rename = "phone")] + #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] pub phone: Option, /// User Status - #[serde(rename = "userStatus")] + #[serde(rename = "userStatus", skip_serializing_if = "Option::is_none")] pub user_status: Option, } @@ -49,3 +50,5 @@ impl User { } } } + + diff --git a/samples/client/petstore/rust/README.md b/samples/client/petstore/rust/README.md index b18581982b2..a1149b09036 100644 --- a/samples/client/petstore/rust/README.md +++ b/samples/client/petstore/rust/README.md @@ -3,6 +3,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. ## Overview + This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 @@ -10,9 +11,11 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - Build package: org.openapitools.codegen.languages.RustClientCodegen ## Installation -Put the package under your project folder and add the following in import: + +Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: + ``` - "./petstore_client" + openapi = { path = "./generated" } ``` ## Documentation for API Endpoints @@ -53,42 +56,10 @@ Class | Method | HTTP request | Description - [User](docs/User.md) -## Documentation For Authorization +To get access to the crate's generated documentation, use: -## api_key -- **Type**: API key - -Example ``` - auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. - }) - r, err := client.Service.Operation(auth, args) -``` -## petstore_auth -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - -Example -``` - auth := context.WithValue(context.TODO(), sw.ContextAccessToken, "ACCESSTOKENSTRING") - r, err := client.Service.Operation(auth, args) -``` - -Or via OAuth2 module to automatically refresh tokens and perform user authentication. -``` - import "golang.org/x/oauth2" - - / .. Perform OAuth2 round trip request and obtain a token .. // - - tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) - auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) - r, err := client.Service.Operation(auth, args) +cargo doc --open ``` ## Author diff --git a/samples/client/petstore/rust/docs/ApiResponse.md b/samples/client/petstore/rust/docs/ApiResponse.md index 3af9a16ab36..fe896d1a86d 100644 --- a/samples/client/petstore/rust/docs/ApiResponse.md +++ b/samples/client/petstore/rust/docs/ApiResponse.md @@ -1,6 +1,7 @@ # ApiResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **i32** | | [optional] diff --git a/samples/client/petstore/rust/docs/Category.md b/samples/client/petstore/rust/docs/Category.md index 39aaee2b052..5890848827d 100644 --- a/samples/client/petstore/rust/docs/Category.md +++ b/samples/client/petstore/rust/docs/Category.md @@ -1,6 +1,7 @@ # Category ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust/docs/InlineObject.md b/samples/client/petstore/rust/docs/InlineObject.md deleted file mode 100644 index ae2c737efca..00000000000 --- a/samples/client/petstore/rust/docs/InlineObject.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Updated name of the pet | [optional] -**status** | **String** | Updated status of the pet | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/rust/docs/InlineObject1.md b/samples/client/petstore/rust/docs/InlineObject1.md deleted file mode 100644 index 02ca4d03484..00000000000 --- a/samples/client/petstore/rust/docs/InlineObject1.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additional_metadata** | **String** | Additional data to pass to server | [optional] -**file** | [***&std::path::Path**](&std::path::Path.md) | file to upload | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/rust/docs/Order.md b/samples/client/petstore/rust/docs/Order.md index f350a8b5b4e..6d27453a76b 100644 --- a/samples/client/petstore/rust/docs/Order.md +++ b/samples/client/petstore/rust/docs/Order.md @@ -1,6 +1,7 @@ # Order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust/docs/Pet.md b/samples/client/petstore/rust/docs/Pet.md index 097c4390288..53a462e68b9 100644 --- a/samples/client/petstore/rust/docs/Pet.md +++ b/samples/client/petstore/rust/docs/Pet.md @@ -1,6 +1,7 @@ # Pet ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust/docs/PetApi.md b/samples/client/petstore/rust/docs/PetApi.md index 1603f57f4ee..e690c805185 100644 --- a/samples/client/petstore/rust/docs/PetApi.md +++ b/samples/client/petstore/rust/docs/PetApi.md @@ -14,12 +14,15 @@ Method | HTTP request | Description [**upload_file**](PetApi.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image -# **add_pet** + +## add_pet + > add_pet(ctx, body) Add a new pet to the store ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -35,17 +38,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_pet** + +## delete_pet + > delete_pet(ctx, pet_id, optional) Deletes a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -53,6 +59,7 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes @@ -70,12 +77,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **find_pets_by_status** + +## find_pets_by_status + > Vec<::models::Pet> find_pets_by_status(ctx, status) Finds Pets by status @@ -83,6 +92,7 @@ Multiple status values can be provided with comma separated strings ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -98,12 +108,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **find_pets_by_tags** + +## find_pets_by_tags + > Vec<::models::Pet> find_pets_by_tags(ctx, tags) Finds Pets by tags @@ -111,6 +123,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -126,12 +139,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_pet_by_id** + +## get_pet_by_id + > ::models::Pet get_pet_by_id(ctx, pet_id) Find pet by ID @@ -139,6 +154,7 @@ Returns a single pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -154,17 +170,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_pet** + +## update_pet + > update_pet(ctx, body) Update an existing pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -180,17 +199,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_pet_with_form** + +## update_pet_with_form + > update_pet_with_form(ctx, pet_id, optional) Updates a pet in the store with form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -198,6 +220,7 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes @@ -216,17 +239,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file** + +## upload_file + > ::models::ApiResponse upload_file(ctx, pet_id, optional) uploads an image ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication @@ -234,13 +260,14 @@ Name | Type | Description | Notes **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pet_id** | **i64**| ID of pet to update | **additional_metadata** | **String**| Additional data to pass to server | - **file** | **&std::path::Path**| file to upload | + **file** | **std::path::PathBuf**| file to upload | ### Return type @@ -252,8 +279,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/docs/StoreApi.md b/samples/client/petstore/rust/docs/StoreApi.md index 507a0c4300c..1e4bdc3e14a 100644 --- a/samples/client/petstore/rust/docs/StoreApi.md +++ b/samples/client/petstore/rust/docs/StoreApi.md @@ -10,7 +10,9 @@ Method | HTTP request | Description [**place_order**](StoreApi.md#place_order) | **Post** /store/order | Place an order for a pet -# **delete_order** + +## delete_order + > delete_order(order_id) Delete purchase order by ID @@ -18,6 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **String**| ID of the order that needs to be deleted | @@ -32,18 +35,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_inventory** + +## get_inventory + > ::std::collections::HashMap get_inventory(ctx, ) Returns pet inventories by status Returns a map of status codes to quantities ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -56,12 +62,14 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_order_by_id** + +## get_order_by_id + > ::models::Order get_order_by_id(order_id) Find purchase order by ID @@ -69,6 +77,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **i64**| ID of pet that needs to be fetched | @@ -83,17 +92,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **place_order** + +## place_order + > ::models::Order place_order(body) Place an order for a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Order**](Order.md)| order placed for purchasing the pet | @@ -108,8 +120,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/docs/Tag.md b/samples/client/petstore/rust/docs/Tag.md index d1118479b90..cc377c0ef4b 100644 --- a/samples/client/petstore/rust/docs/Tag.md +++ b/samples/client/petstore/rust/docs/Tag.md @@ -1,6 +1,7 @@ # Tag ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust/docs/User.md b/samples/client/petstore/rust/docs/User.md index 33aa9693902..8f0a63847cc 100644 --- a/samples/client/petstore/rust/docs/User.md +++ b/samples/client/petstore/rust/docs/User.md @@ -1,6 +1,7 @@ # User ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] diff --git a/samples/client/petstore/rust/docs/UserApi.md b/samples/client/petstore/rust/docs/UserApi.md index 69e7bc50627..2ec2362730d 100644 --- a/samples/client/petstore/rust/docs/UserApi.md +++ b/samples/client/petstore/rust/docs/UserApi.md @@ -14,7 +14,9 @@ Method | HTTP request | Description [**update_user**](UserApi.md#update_user) | **Put** /user/{username} | Updated user -# **create_user** + +## create_user + > create_user(body) Create user @@ -22,6 +24,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**User**](User.md)| Created user object | @@ -36,17 +39,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_users_with_array_input** + +## create_users_with_array_input + > create_users_with_array_input(body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Vec<::models::User>**](array.md)| List of user object | @@ -61,17 +67,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_users_with_list_input** + +## create_users_with_list_input + > create_users_with_list_input(body) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Vec<::models::User>**](array.md)| List of user object | @@ -86,12 +95,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_user** + +## delete_user + > delete_user(username) Delete user @@ -99,6 +110,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The name that needs to be deleted | @@ -113,17 +125,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_user_by_name** + +## get_user_by_name + > ::models::User get_user_by_name(username) Get user by user name ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The name that needs to be fetched. Use user1 for testing. | @@ -138,17 +153,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **login_user** + +## login_user + > String login_user(username, password) Logs user into the system ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| The user name for login | @@ -164,16 +182,19 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **logout_user** + +## logout_user + > logout_user() Logs out current logged in user session ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -186,12 +207,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **update_user** + +## update_user + > update_user(username, body) Updated user @@ -199,6 +222,7 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | @@ -214,8 +238,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/examples/client.rs b/samples/client/petstore/rust/examples/client.rs deleted file mode 100644 index a729ec297c5..00000000000 --- a/samples/client/petstore/rust/examples/client.rs +++ /dev/null @@ -1,39 +0,0 @@ -extern crate futures; -extern crate hyper; -extern crate petstore_client; -extern crate tokio_core; - -use futures::Future; -use hyper::client::HttpConnector; -use hyper::Client; -use tokio_core::reactor::Core; - -fn main() { - let mut core = Core::new().expect("failed to init core"); - let handle = core.handle(); - - let apicli = petstore_client::apis::client::APIClient::new( - petstore_client::apis::configuration::Configuration::new( - Client::configure() - .connector(HttpConnector::new(4, &handle)) - .build(&handle), - ), - ); - - let new_pet = petstore_client::models::Pet::new("ferris".to_owned(), vec![]).with_id(128149); - let work = apicli - .pet_api() - .add_pet(new_pet) - .and_then(|_| { - apicli - .pet_api() - .update_pet_with_form(128149, "ferris", "rusted") - }) - .and_then(|_| apicli.pet_api().get_pet_by_id(128149)) - .and_then(|pet| { - println!("pet: {:?}", pet); - futures::future::ok(()) - }); - - core.run(work).expect("failed to run core"); -} diff --git a/samples/client/petstore/rust/examples/error_handling.rs b/samples/client/petstore/rust/examples/error_handling.rs deleted file mode 100644 index dbd03d0e720..00000000000 --- a/samples/client/petstore/rust/examples/error_handling.rs +++ /dev/null @@ -1,49 +0,0 @@ -extern crate futures; -extern crate hyper; -extern crate petstore_client; -extern crate tokio_core; - -use futures::Future; -use hyper::client::HttpConnector; -use hyper::Client; -use petstore_client::apis::client::APIClient; -use petstore_client::apis::Error; -use tokio_core::reactor::Core; - -fn main() { - let mut core = Core::new().expect("failed to init core"); - let handle = core.handle(); - - let mut configuration = petstore_client::apis::configuration::Configuration::new( - Client::configure() - .connector(HttpConnector::new(4, &handle)) - .build(&handle), - ); - if let Ok(env_override) = std::env::var("PETSTORE_BASEPATH") { - configuration.base_path = env_override; - } - - let apicli = APIClient::new(configuration); - let work = apicli - .user_api() - .delete_user("404") - .then(|resp| match resp { - Ok(resp) => { - panic!(format!( - "update for nonexistent pet should fail, but got: {:?}", - resp - )); - } - Err(Error::ApiError(s)) => { - println!("got expected error: {:?}", s); - futures::future::ok::<(), ()>(()) - } - Err(Error::Hyper(e)) => { - println!("network error: {}", e); - futures::future::ok::<(), ()>(()) - } - Err(e) => panic!("unexpected error: {:?}", e), - }); - - core.run(work).expect("failed to run core"); -} diff --git a/samples/client/petstore/rust/src/apis/pet_api.rs b/samples/client/petstore/rust/src/apis/pet_api.rs index 03c00f05291..fddbf5a569d 100644 --- a/samples/client/petstore/rust/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/src/apis/pet_api.rs @@ -38,7 +38,7 @@ pub trait PetApi { fn get_pet_by_id(&self, pet_id: i64) -> Box>>; fn update_pet(&self, body: ::models::Pet) -> Box>>; fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: &std::path::Path) -> Box>>; + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>>; } @@ -103,7 +103,7 @@ implPetApi for PetApiClient { .execute(self.configuration.borrow()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: &std::path::Path) -> Box>> { + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_path_param("petId".to_string(), pet_id.to_string()) diff --git a/samples/client/petstore/rust/src/models/api_response.rs b/samples/client/petstore/rust/src/models/api_response.rs index 7d33d285b87..c256dd541f2 100644 --- a/samples/client/petstore/rust/src/models/api_response.rs +++ b/samples/client/petstore/rust/src/models/api_response.rs @@ -13,13 +13,14 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct ApiResponse { - #[serde(rename = "code")] + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, - #[serde(rename = "type")] + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub _type: Option, - #[serde(rename = "message")] + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, } @@ -33,3 +34,5 @@ impl ApiResponse { } } } + + diff --git a/samples/client/petstore/rust/src/models/category.rs b/samples/client/petstore/rust/src/models/category.rs index d18877e805f..c65206929e3 100644 --- a/samples/client/petstore/rust/src/models/category.rs +++ b/samples/client/petstore/rust/src/models/category.rs @@ -13,11 +13,12 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Category { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "name")] + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, } @@ -30,3 +31,5 @@ impl Category { } } } + + diff --git a/samples/client/petstore/rust/src/models/inline_object.rs b/samples/client/petstore/rust/src/models/inline_object.rs deleted file mode 100644 index 2fa0cfa4f63..00000000000 --- a/samples/client/petstore/rust/src/models/inline_object.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] -pub struct InlineObject { - /// Updated name of the pet - #[serde(rename = "name")] - pub name: Option, - /// Updated status of the pet - #[serde(rename = "status")] - pub status: Option, -} - -impl InlineObject { - pub fn new() -> InlineObject { - InlineObject { - name: None, - status: None, - } - } -} diff --git a/samples/client/petstore/rust/src/models/inline_object_1.rs b/samples/client/petstore/rust/src/models/inline_object_1.rs deleted file mode 100644 index a7e3b098fe7..00000000000 --- a/samples/client/petstore/rust/src/models/inline_object_1.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] -pub struct InlineObject1 { - /// Additional data to pass to server - #[serde(rename = "additionalMetadata")] - pub additional_metadata: Option, - /// file to upload - #[serde(rename = "file")] - pub file: Option<&std::path::Path>, -} - -impl InlineObject1 { - pub fn new() -> InlineObject1 { - InlineObject1 { - additional_metadata: None, - file: None, - } - } -} diff --git a/samples/client/petstore/rust/src/models/order.rs b/samples/client/petstore/rust/src/models/order.rs index f5c7ceb74d7..b3cfb487b8d 100644 --- a/samples/client/petstore/rust/src/models/order.rs +++ b/samples/client/petstore/rust/src/models/order.rs @@ -13,20 +13,21 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Order { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "petId")] + #[serde(rename = "petId", skip_serializing_if = "Option::is_none")] pub pet_id: Option, - #[serde(rename = "quantity")] + #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, - #[serde(rename = "shipDate")] + #[serde(rename = "shipDate", skip_serializing_if = "Option::is_none")] pub ship_date: Option, /// Order Status - #[serde(rename = "status")] + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - #[serde(rename = "complete")] + #[serde(rename = "complete", skip_serializing_if = "Option::is_none")] pub complete: Option, } @@ -43,3 +44,15 @@ impl Order { } } } + +/// Order Status +#[derive(Debug, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "placed")] + Placed, + #[serde(rename = "approved")] + Approved, + #[serde(rename = "delivered")] + Delivered, +} + diff --git a/samples/client/petstore/rust/src/models/pet.rs b/samples/client/petstore/rust/src/models/pet.rs index e7d4466d2d9..73189d5bcfc 100644 --- a/samples/client/petstore/rust/src/models/pet.rs +++ b/samples/client/petstore/rust/src/models/pet.rs @@ -13,20 +13,21 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Pet { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "category")] + #[serde(rename = "category", skip_serializing_if = "Option::is_none")] pub category: Option<::models::Category>, #[serde(rename = "name")] pub name: String, #[serde(rename = "photoUrls")] pub photo_urls: Vec, - #[serde(rename = "tags")] + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] pub tags: Option>, /// pet status in the store - #[serde(rename = "status")] + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } @@ -43,3 +44,15 @@ impl Pet { } } } + +/// pet status in the store +#[derive(Debug, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "available")] + Available, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "sold")] + Sold, +} + diff --git a/samples/client/petstore/rust/src/models/tag.rs b/samples/client/petstore/rust/src/models/tag.rs index e5964cc9ea1..cb76addf6e6 100644 --- a/samples/client/petstore/rust/src/models/tag.rs +++ b/samples/client/petstore/rust/src/models/tag.rs @@ -13,11 +13,12 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct Tag { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "name")] + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, } @@ -30,3 +31,5 @@ impl Tag { } } } + + diff --git a/samples/client/petstore/rust/src/models/user.rs b/samples/client/petstore/rust/src/models/user.rs index bfa6bfb96e4..08bb9db1b6c 100644 --- a/samples/client/petstore/rust/src/models/user.rs +++ b/samples/client/petstore/rust/src/models/user.rs @@ -13,24 +13,25 @@ #[allow(unused_imports)] use serde_json::Value; + #[derive(Debug, Serialize, Deserialize)] pub struct User { - #[serde(rename = "id")] + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "username")] + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] pub username: Option, - #[serde(rename = "firstName")] + #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")] pub first_name: Option, - #[serde(rename = "lastName")] + #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")] pub last_name: Option, - #[serde(rename = "email")] + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, - #[serde(rename = "password")] + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] pub password: Option, - #[serde(rename = "phone")] + #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] pub phone: Option, /// User Status - #[serde(rename = "userStatus")] + #[serde(rename = "userStatus", skip_serializing_if = "Option::is_none")] pub user_status: Option, } @@ -49,3 +50,5 @@ impl User { } } } + + From a96ab1cf9d1528e11b815fea020e4f4290591297 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 7 Jun 2019 13:07:52 -0400 Subject: [PATCH 33/73] [core] GeneratorSettings, WorkflowSettings, and cleanup in CodegenConfigurator (#2946) * Introduce GeneratorSettings + cleanup GeneratorSettings is an immutable settings object, intended to limit the manipulation of generator settings. To move to GeneratorSettings, lots of modification was done to CodegenConfigurator. The goal here is that CodegenConfigurator would create the contextual information required to initiate a generator run: * GeneratorSettings * Workflow related settings * Configuring "system" GeneratorProperties (ThreadLocal properties) * Deserializing from file to config object * Input spec document (OpenAPI, intending to target others) ClientOpts was generally unused, and the few places it was being used have been updated to pass the properties to codegen.additionalProperties. * Add sanity to system properties The -D argument for the generate command is an application argument which is easily confused for Java System Properties. This isn't the case, as setting values here doesn't update the configuration in System.getProperties(). This adds a warning and deprecation to that option, as defining these values as system properties will also continue to work as expected. This makes the -D application argument redundant and confusing. * Contextualize generator/workflow settings This splits settings relevant to generator configuration (the what) and workflow configuration (the how) in an attempt to make configuration easier to conceptualize. * Update Gradle task w/ CodegenConfigurator setters * Remove -D usage in scripts * Add -p option for additional properties * Regnerate samples --- bin/ada-petstore.sh | 2 +- bin/android-petstore-httpclient.sh | 2 +- bin/dart-flutter-petstore.sh | 8 +- bin/dart-jaguar-petstore.sh | 8 +- bin/dart-petstore.sh | 8 +- bin/dart2-petstore.sh | 8 +- bin/erlang-petstore-client.sh | 2 +- bin/erlang-petstore-proper.sh | 2 +- bin/go-gin-petstore-server.sh | 2 +- bin/go-petstore-server.sh | 2 +- bin/go-petstore-withxml.sh | 2 +- bin/go-petstore.sh | 2 +- bin/graphql-nodejs-express-server.sh | 2 +- bin/graphql-schema-petstore.sh | 2 +- bin/groovy-petstore.sh | 2 +- bin/java-inflector-petstore-server.sh | 2 +- bin/java-msf4j-petstore-server.sh | 2 +- bin/java-petstore-feign-10x.sh | 2 +- bin/java-petstore-feign.sh | 2 +- bin/java-petstore-google-api-client.sh | 2 +- bin/java-petstore-jersey1.sh | 2 +- bin/java-petstore-jersey2-java6.sh | 2 +- bin/java-petstore-jersey2.sh | 2 +- bin/java-petstore-okhttp-gson-parcelable.sh | 2 +- bin/java-petstore-okhttp-gson.sh | 2 +- bin/java-petstore-rest-assured.sh | 2 +- bin/java-petstore-resteasy.sh | 2 +- bin/java-petstore-resttemplate-withxml.sh | 2 +- bin/java-petstore-resttemplate.sh | 2 +- bin/java-petstore-retrofit.sh | 2 +- bin/java-petstore-retrofit2-play24.sh | 2 +- bin/java-petstore-retrofit2-play25.sh | 2 +- bin/java-petstore-retrofit2-play26.sh | 2 +- bin/java-petstore-retrofit2.sh | 2 +- bin/java-petstore-retrofit2rx.sh | 2 +- bin/java-petstore-retrofit2rx2.sh | 2 +- bin/java-petstore-vertx.sh | 2 +- bin/java-petstore-webclient.sh | 2 +- bin/java-pkmst-petstore-server.sh | 2 +- ...rk-petstore-server-api-package-override.sh | 2 +- ...va-play-framework-petstore-server-async.sh | 2 +- ...amework-petstore-server-controller-only.sh | 2 +- ...ramework-petstore-server-fake-endpoints.sh | 2 +- ...work-petstore-server-no-bean-validation.sh | 2 +- ...k-petstore-server-no-exception-handling.sh | 2 +- ...-framework-petstore-server-no-interface.sh | 2 +- ...framework-petstore-server-no-swagger-ui.sh | 2 +- ...framework-petstore-server-no-wrap-calls.sh | 2 +- bin/java-play-framework-petstore-server.sh | 2 +- bin/java-vertx-async-petstore-server.sh | 2 +- bin/java-vertx-rx-petstore-server.sh | 2 +- bin/java8-petstore-jersey2.sh | 2 +- bin/javascript-es6-petstore.sh | 3 +- bin/javascript-flowtyped-petstore.sh | 2 +- bin/javascript-petstore.sh | 2 +- bin/javascript-promise-es6-petstore.sh | 4 +- bin/javascript-promise-petstore.sh | 2 +- bin/jaxrs-cxf-cdi-petstore-server.sh | 2 +- ...cxf-petstore-server-annotated-base-path.sh | 2 +- ...-petstore-server-non-spring-application.sh | 2 +- bin/jaxrs-cxf-petstore-server-test-data.sh | 2 +- bin/jaxrs-cxf-petstore-server.sh | 2 +- bin/jaxrs-jersey1-petstore-server.sh | 2 +- bin/jaxrs-jersey1-usetags-petstore-server.sh | 2 +- bin/jaxrs-petstore-server-datelib-j8.sh | 2 +- bin/jaxrs-petstore-server.sh | 2 +- ...axrs-resteasy-eap-java8-petstore-server.sh | 2 +- ...jaxrs-resteasy-eap-joda-petstore-server.sh | 2 +- bin/jaxrs-resteasy-eap-petstore-server.sh | 2 +- bin/jaxrs-resteasy-joda-petstore-server.sh | 2 +- bin/jaxrs-resteasy-petstore-server.sh | 2 +- ...ore-server-interface-returning-response.sh | 8 +- bin/jaxrs-spec-petstore-server-interface.sh | 6 +- bin/jaxrs-spec-petstore-server.sh | 4 +- bin/jaxrs-usetags-petstore-server.sh | 2 +- bin/kotlin-client-petstore.sh | 2 +- bin/kotlin-client-string.sh | 2 +- bin/kotlin-client-threetenbp.sh | 2 +- bin/kotlin-server-petstore.sh | 2 +- bin/lua-petstore.sh | 2 +- bin/nodejs-petstore-google-cloud-functions.sh | 4 +- bin/nodejs-petstore-server.sh | 4 +- bin/objc-petstore-coredata.sh | 5 +- bin/openapi3/android-petstore-httpclient.sh | 2 +- bin/openapi3/dart-petstore.sh | 8 +- bin/openapi3/erlang-petstore-client.sh | 2 +- bin/openapi3/go-gin-petstore-server.sh | 2 +- bin/openapi3/go-petstore-server.sh | 2 +- bin/openapi3/go-petstore.sh | 2 +- bin/openapi3/graphql-nodejs-express-server.sh | 2 +- bin/openapi3/groovy-petstore.sh | 2 +- bin/openapi3/javascript-es6-petstore.sh | 4 +- bin/openapi3/jaxrs-jersey-petstore.sh | 2 +- bin/openapi3/kotlin-client-petstore.sh | 2 +- bin/openapi3/lua-petstore.sh | 2 +- .../nodejs-petstore-google-cloud-functions.sh | 4 +- bin/openapi3/nodejs-petstore-server.sh | 4 +- bin/openapi3/objc-petstore-coredata.sh | 5 +- bin/openapi3/objc-petstore.sh | 2 +- bin/openapi3/perl-petstore.sh | 2 +- bin/openapi3/python-flask-petstore-python2.sh | 2 +- bin/openapi3/python-flask-petstore.sh | 4 +- bin/openapi3/python-petstore.sh | 2 +- bin/openapi3/r-petstore.sh | 2 +- bin/openapi3/ruby-client-petstore.sh | 2 +- bin/openapi3/rust-petstore.sh | 2 +- .../typescript-angular-petstore-all.sh | 2 +- ...pescript-angular-v2-petstore-interfaces.sh | 2 +- .../typescript-fetch-petstore-interfaces.sh | 2 +- bin/perl-deep-module-petstore.sh | 2 +- bin/perl-petstore.sh | 2 +- bin/python-asyncio-petstore.sh | 2 +- bin/python-petstore.sh | 2 +- bin/python-server-aiohttp-petstore.sh | 4 +- bin/python-server-blueplanet-petstore.sh | 4 +- bin/python-server-flask-petstore-python2.sh | 3 +- bin/python-server-flask-petstore.sh | 4 +- bin/python-tornado-petstore.sh | 2 +- bin/r-petstore.sh | 2 +- bin/rust-petstore.sh | 2 +- bin/rust-reqwest-petstore.sh | 2 +- bin/rust-server-petstore.sh | 2 +- bin/spring-cloud-feign-petstore.sh | 2 +- bin/spring-delegate-j8.sh | 2 +- bin/spring-delegate.sh | 2 +- bin/spring-mvc-petstore-j8-async-server.sh | 2 +- bin/spring-mvc-petstore-j8-localdatetime.sh | 2 +- bin/spring-mvc-petstore-server.sh | 2 +- bin/spring-stubs.sh | 2 +- ...ringboot-petstore-server-beanvalidation.sh | 2 +- ...ingboot-petstore-server-implicitHeaders.sh | 2 +- bin/springboot-petstore-server-reactive.sh | 2 +- bin/springboot-petstore-server-useOptional.sh | 2 +- bin/springboot-petstore-server.sh | 2 +- bin/springboot-virtualan-petstore-server.sh | 2 +- bin/tests/test-debug-supporting-files.sh | 4 +- ...pescript-angular-v2-petstore-interfaces.sh | 2 +- ...-petstore-not-provided-in-root-with-npm.sh | 2 +- ...ngular-v6-petstore-not-provided-in-root.sh | 2 +- ...-petstore-not-provided-in-root-with-npm.sh | 2 +- ...ngular-v7-petstore-not-provided-in-root.sh | 2 +- bin/typescript-axios-petstore-interfaces.sh | 2 +- bin/typescript-fetch-petstore-interfaces.sh | 2 +- bin/typescript-rxjs-petstore-interfaces.sh | 2 +- bin/windows/dart-client-petstore.bat | 4 +- bin/windows/dart-petstore.bat | 6 +- bin/windows/go-gin-petstore-server.bat | 2 +- bin/windows/go-petstore-server.bat | 2 +- bin/windows/go-petstore-withxml.bat | 2 +- bin/windows/go-petstore.bat | 2 +- bin/windows/java-petstore-feign-10x.bat | 2 +- bin/windows/java-petstore-feign.bat | 2 +- .../java-petstore-google-api-client.bat | 2 +- bin/windows/java-petstore-jersey1.bat | 2 +- bin/windows/java-petstore-jersey2-java6.bat | 2 +- bin/windows/java-petstore-jersey2.bat | 2 +- .../java-petstore-okhttp-gson-parcelable.bat | 2 +- bin/windows/java-petstore-okhttp-gson.bat | 2 +- bin/windows/java-petstore-rest-assured.bat | 2 +- .../java-petstore-resttemplate-resteasy.bat | 2 +- .../java-petstore-resttemplate-webclient.bat | 2 +- .../java-petstore-resttemplate-withxml.bat | 2 +- bin/windows/java-petstore-resttemplate.bat | 2 +- bin/windows/java-petstore-retrofit.bat | 2 +- .../java-petstore-retrofit2-play24.bat | 2 +- .../java-petstore-retrofit2-play25.bat | 2 +- .../java-petstore-retrofit2-play26.bat | 2 +- bin/windows/java-petstore-retrofit2.bat | 2 +- bin/windows/java-petstore-retrofit2rx.bat | 2 +- bin/windows/java-petstore-retrofit2rx2.bat | 2 +- bin/windows/java-petstore-vertx.bat | 2 +- bin/windows/java-pkmst-petstore-server.bat | 2 +- .../java-play-framework-petstore-server.bat | 2 +- .../java-vertx-async-petstore-server.bat | 2 +- bin/windows/java-vertx-rx-petstore-server.bat | 2 +- bin/windows/javascript-es6-petstore.bat | 2 +- bin/windows/javascript-petstore.bat | 2 +- .../javascript-promise-es6-petstore.bat | 2 +- bin/windows/javascript-promise-petstore.bat | 2 +- bin/windows/jaxrs-cxf-cdi-petstore-server.bat | 2 +- ...xf-petstore-server-annotated-base-path.bat | 2 +- ...petstore-server-non-spring-application.bat | 2 +- .../jaxrs-cxf-petstore-server-test-data.bat | 2 +- bin/windows/jaxrs-cxf-petstore-server.bat | 2 +- .../jaxrs-spec-petstore-server-interface.bat | 2 +- bin/windows/jaxrs-spec-petstore-server.bat | 2 +- bin/windows/objc-petstore.bat | 2 +- bin/windows/python-petstore.bat | 2 +- bin/windows/python2-flask-petstore.bat | 2 +- bin/windows/python3-flask-petstore.bat | 2 +- .../spring-mvc-petstore-j8-async-server.bat | 2 +- bin/windows/spring-mvc-petstore-server.bat | 2 +- bin/windows/springboot-petstore-server.bat | 2 +- .../typescript-angular-v2-interfaces.bat | 2 +- ...gular-v6-not-provided-in-root-with-npm.bat | 2 +- ...script-angular-v6-not-provided-in-root.bat | 2 +- ...gular-v7-not-provided-in-root-with-npm.bat | 2 +- ...script-angular-v7-not-provided-in-root.bat | 2 +- .../typescript-axios-petstore-interfaces.bat | 2 +- .../typescript-fetch-petstore-interfaces.bat | 2 +- .../typescript-rxjs-petstore-interfaces.bat | 2 +- .../openapitools/codegen/cmd/Generate.java | 7 +- .../codegen/cmd/GenerateTest.java | 83 +- modules/openapi-generator-core/pom.xml | 18 + .../openapitools/codegen/config/Context.java | 68 ++ .../codegen/config/GeneratorSettings.java | 872 ++++++++++++++++++ .../codegen/config/WorkflowSettings.java | 534 +++++++++++ .../codegen/meta/GeneratorMetadata.java | 16 + .../openapitools/codegen/meta/Stability.java | 16 + .../gradle/plugin/tasks/GenerateTask.kt | 81 +- .../examples/java-client.xml | 1 + .../examples/multi-module/java-client/pom.xml | 1 + .../codegen/plugin/CodeGenMojo.java | 32 +- .../codegen/online/service/Generator.java | 6 +- modules/openapi-generator/pom.xml | 5 + .../openapitools/codegen/ClientOptInput.java | 22 +- .../org/openapitools/codegen/ClientOpts.java | 93 -- .../openapitools/codegen/DefaultCodegen.java | 4 +- .../codegen/DefaultGenerator.java | 44 +- .../codegen/config/CodegenConfigurator.java | 824 ++++++----------- .../codegen/config/DynamicSettings.java | 77 ++ ...torProperties.java => GlobalSettings.java} | 7 +- .../languages/JavaInflectorServerCodegen.java | 6 +- .../languages/JavaUndertowServerCodegen.java | 14 +- .../languages/NodeJSServerCodegen.java | 4 +- .../codegen/utils/ModelUtils.java | 3 + .../codegen/AbstractIntegrationTest.java | 5 +- .../codegen/DefaultGeneratorTest.java | 3 - .../codegen/config/DynamicSettingsTest.java | 107 +++ .../codegen/java/JavaClientCodegenTest.java | 4 - .../codegen/java/JavaModelTest.java | 1 - .../JavaJAXRSCXFExtServerCodegenTest.java | 12 +- .../codegen/java/jaxrs/JavaJaxrsBaseTest.java | 17 +- .../jaxrs/JavaJerseyServerCodegenTest.java | 5 - .../codegen/ruby/RubyClientCodegenTest.java | 4 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumClass.java | 2 +- .../openapitools/client/model/EnumTest.java | 8 +- .../openapitools/client/model/MapTest.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../openapitools/client/model/OuterEnum.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumClass.java | 2 +- .../openapitools/client/model/EnumTest.java | 8 +- .../openapitools/client/model/MapTest.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../openapitools/client/model/OuterEnum.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../openapi3/client/petstore/ruby/README.md | 6 + .../client/petstore/ruby/docs/InlineObject.md | 19 + .../petstore/ruby/docs/InlineObject1.md | 19 + .../petstore/ruby/docs/InlineObject2.md | 19 + .../petstore/ruby/docs/InlineObject3.md | 43 + .../petstore/ruby/docs/InlineObject4.md | 19 + .../petstore/ruby/docs/InlineObject5.md | 19 + .../client/petstore/ruby/lib/petstore.rb | 6 + .../ruby/lib/petstore/models/inline_object.rb | 207 +++++ .../lib/petstore/models/inline_object1.rb | 207 +++++ .../lib/petstore/models/inline_object2.rb | 245 +++++ .../lib/petstore/models/inline_object3.rb | 528 +++++++++++ .../lib/petstore/models/inline_object4.rb | 217 +++++ .../lib/petstore/models/inline_object5.rb | 212 +++++ .../ruby/spec/models/inline_object1_spec.rb | 47 + .../ruby/spec/models/inline_object2_spec.rb | 55 ++ .../ruby/spec/models/inline_object3_spec.rb | 119 +++ .../ruby/spec/models/inline_object4_spec.rb | 47 + .../ruby/spec/models/inline_object5_spec.rb | 47 + .../ruby/spec/models/inline_object_spec.rb | 47 + .../php-symfony/SymfonyBundle-php/.gitignore | 54 -- 270 files changed, 4515 insertions(+), 1187 deletions(-) create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOpts.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java rename modules/openapi-generator/src/main/java/org/openapitools/codegen/config/{GeneratorProperties.java => GlobalSettings.java} (85%) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/config/DynamicSettingsTest.java create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject.md create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject1.md create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject2.md create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject3.md create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject4.md create mode 100644 samples/openapi3/client/petstore/ruby/docs/InlineObject5.md create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb create mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb create mode 100644 samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb delete mode 100644 samples/server/petstore/php-symfony/SymfonyBundle-php/.gitignore diff --git a/bin/ada-petstore.sh b/bin/ada-petstore.sh index 87005f0ee1b..5441bd13ec3 100755 --- a/bin/ada-petstore.sh +++ b/bin/ada-petstore.sh @@ -30,7 +30,7 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" model="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" ags="generate --template-dir modules/openapi-generator/src/main/resources/Ada -g ada $@" ags="$ags -i $model -t modules/openapi-generator/src/main/resources/Ada -o samples/client/petstore/ada" -ags="$ags -DprojectName=Petstore --model-package Samples.Petstore" +ags="$ags --additional-properties projectName=Petstore --model-package Samples.Petstore" java $JAVA_OPTS -jar $executable $ags rm -rf samples/client/petstore/ada/src/server diff --git a/bin/android-petstore-httpclient.sh b/bin/android-petstore-httpclient.sh index c2e03a737fa..d0982cec14f 100755 --- a/bin/android-petstore-httpclient.sh +++ b/bin/android-petstore-httpclient.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android -Dlibrary=httpclient -o samples/client/petstore/android/httpclient $@" +ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dart-flutter-petstore.sh b/bin/dart-flutter-petstore.sh index af7a58af75f..af3aaca2bec 100755 --- a/bin/dart-flutter-petstore.sh +++ b/bin/dart-flutter-petstore.sh @@ -28,18 +28,18 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ## Generate non-browserClient -#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger -DhideGenerationTimestamp=true -DbrowserClient=false $@" +#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@" # ## then options to generate the library for vm would be: -##ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger_vm -DbrowserClient=false -DpubName=swagger_vm $@" +##ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger_vm --additional-properties browserClient=false,pubName=swagger_vm $@" #java $JAVA_OPTS -jar $executable $ags # ## Generate browserClient -#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@" +#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@" #java $JAVA_OPTS -jar $executable $ags # Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/swagger -DhideGenerationTimestamp=true -DbrowserClient=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@" java $JAVA_OPTS -jar $executable $ags # There is a proposal to allow importing different libraries depending on the environment: diff --git a/bin/dart-jaguar-petstore.sh b/bin/dart-jaguar-petstore.sh index ffec056c46e..c5348cd34be 100755 --- a/bin/dart-jaguar-petstore.sh +++ b/bin/dart-jaguar-petstore.sh @@ -28,19 +28,19 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # Generate client -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi -DhideGenerationTimestamp=true -DpubName=openapi" +ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi" java $JAVA_OPTS -jar $executable $ags # Generate non-browserClient and put it to the flutter sample app -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi -DhideGenerationTimestamp=true -DpubName=openapi" +ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi" java $JAVA_OPTS -jar $executable $ags # Generate proto and put it to the flutter sample app -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi -Dserialization=proto -DhideGenerationTimestamp=true -DpubName=openapi" +ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi" java $JAVA_OPTS -jar $executable $ags # Generate proto and put it to the sample -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi_proto -Dserialization=proto -DhideGenerationTimestamp=true -DpubName=openapi" +ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi_proto --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi" java $JAVA_OPTS -jar $executable $ags # There is a proposal to allow importing different libraries depending on the environment: diff --git a/bin/dart-petstore.sh b/bin/dart-petstore.sh index 669105c6ae5..ee60cb6c4f8 100755 --- a/bin/dart-petstore.sh +++ b/bin/dart-petstore.sh @@ -29,18 +29,18 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@" # then options to generate the library for vm would be: -#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm --additional-properties supportDart2=false $@" +#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm --additional-properties supportDart2=false $@" java $JAVA_OPTS -jar $executable $ags # Generate browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true --additional-properties supportDart2=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true,supportDart2=false $@" java $JAVA_OPTS -jar $executable $ags # Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@" java $JAVA_OPTS -jar $executable $ags # There is a proposal to allow importing different libraries depending on the environment: diff --git a/bin/dart2-petstore.sh b/bin/dart2-petstore.sh index 8fa61715ada..e8a57ffca7e 100755 --- a/bin/dart2-petstore.sh +++ b/bin/dart2-petstore.sh @@ -29,18 +29,18 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" # then options to generate the library for vm would be: -#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@" +#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@" java $JAVA_OPTS -jar $executable $ags # Generate browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@" java $JAVA_OPTS -jar $executable $ags # Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" java $JAVA_OPTS -jar $executable $ags # There is a proposal to allow importing different libraries depending on the environment: diff --git a/bin/erlang-petstore-client.sh b/bin/erlang-petstore-client.sh index 7afeffd2e3f..77ee5acf0ef 100755 --- a/bin/erlang-petstore-client.sh +++ b/bin/erlang-petstore-client.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-client -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/erlang-petstore-proper.sh b/bin/erlang-petstore-proper.sh index 409b5f2eae4..4c19eec46df 100755 --- a/bin/erlang-petstore-proper.sh +++ b/bin/erlang-petstore-proper.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-gin-petstore-server.sh b/bin/go-gin-petstore-server.sh index 1ac7605d791..b18bffcdff7 100755 --- a/bin/go-gin-petstore-server.sh +++ b/bin/go-gin-petstore-server.sh @@ -35,7 +35,7 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags #!/usr/bin/env bash \ No newline at end of file diff --git a/bin/go-petstore-server.sh b/bin/go-petstore-server.sh index 32dfa8e93c4..3e5c19e436b 100755 --- a/bin/go-petstore-server.sh +++ b/bin/go-petstore-server.sh @@ -35,6 +35,6 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-petstore-withxml.sh b/bin/go-petstore-withxml.sh index 50b8cb27833..4c575497254 100755 --- a/bin/go-petstore-withxml.sh +++ b/bin/go-petstore-withxml.sh @@ -34,6 +34,6 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore,withXml=true,withGoCodegenComment=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore,withXml=true,withGoCodegenComment=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-petstore.sh b/bin/go-petstore.sh index 865212c93ba..7dc5fe4907b 100755 --- a/bin/go-petstore.sh +++ b/bin/go-petstore.sh @@ -34,6 +34,6 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/graphql-nodejs-express-server.sh b/bin/graphql-nodejs-express-server.sh index b257e529935..69ee4a3bf55 100755 --- a/bin/graphql-nodejs-express-server.sh +++ b/bin/graphql-nodejs-express-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/graphql-schema-petstore.sh b/bin/graphql-schema-petstore.sh index 10dfb5a5dc9..c6f36de2b5e 100755 --- a/bin/graphql-schema-petstore.sh +++ b/bin/graphql-schema-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/groovy-petstore.sh b/bin/groovy-petstore.sh index 99fa2e940a5..1a9db858a3c 100755 --- a/bin/groovy-petstore.sh +++ b/bin/groovy-petstore.sh @@ -27,5 +27,5 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Groovy/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Groovy/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-inflector-petstore-server.sh b/bin/java-inflector-petstore-server.sh index 1456a7457fd..b37e444a923 100755 --- a/bin/java-inflector-petstore-server.sh +++ b/bin/java-inflector-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-inflector -o samples/server/petstore/java-inflector -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-inflector -o samples/server/petstore/java-inflector --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-msf4j-petstore-server.sh b/bin/java-msf4j-petstore-server.sh index 8df820296c2..46ae1caef9a 100755 --- a/bin/java-msf4j-petstore-server.sh +++ b/bin/java-msf4j-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/java-msf4j-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@" +ags="generate -t modules/openapi-generator/src/main/resources/java-msf4j-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ --additional-properties hideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@" echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main" rm -rf samples/server/petstore/java-msf4j/src/main diff --git a/bin/java-petstore-feign-10x.sh b/bin/java-petstore-feign-10x.sh index 3ee6bd937e1..15b1b40e214 100755 --- a/bin/java-petstore-feign-10x.sh +++ b/bin/java-petstore-feign-10x.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-10x.json -o samples/client/petstore/java/feign10x -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-10x.json -o samples/client/petstore/java/feign10x --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@" echo "Removing files and folders under samples/client/petstore/java/feign10x/src/main" rm -rf samples/client/petstore/java/feign10x/src/main diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh index f6ead964ace..abac67deb9d 100755 --- a/bin/java-petstore-feign.sh +++ b/bin/java-petstore-feign.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@" echo "Removing files and folders under samples/client/petstore/java/feign/src/main" rm -rf samples/client/petstore/java/feign/src/main diff --git a/bin/java-petstore-google-api-client.sh b/bin/java-petstore-google-api-client.sh index ace4eb43870..20e3577f197 100755 --- a/bin/java-petstore-google-api-client.sh +++ b/bin/java-petstore-google-api-client.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/google-api-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-google-api-client.json -o samples/client/petstore/java/google-api-client -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/google-api-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-google-api-client.json -o samples/client/petstore/java/google-api-client --additional-properties hideGenerationTimestamp=true $@" 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 diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh index 2a6e6ab8f71..cb6e0ea3a6b 100755 --- a/bin/java-petstore-jersey1.sh +++ b/bin/java-petstore-jersey1.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@" +ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@" echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main" rm -rf samples/client/petstore/java/jersey1/src/main diff --git a/bin/java-petstore-jersey2-java6.sh b/bin/java-petstore-jersey2-java6.sh index b0d32f84db6..4a5b032d0db 100755 --- a/bin/java-petstore-jersey2-java6.sh +++ b/bin/java-petstore-jersey2-java6.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is $@" +ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 --additional-properties hideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is $@" echo "Removing files and folders under samples/client/petstore/java/jersey2-java6/src/main" rm -rf samples/client/petstore/java/jersey2-java6/src/main diff --git a/bin/java-petstore-jersey2.sh b/bin/java-petstore-jersey2.sh index 05fc95fbc9e..e91dba6ff00 100755 --- a/bin/java-petstore-jersey2.sh +++ b/bin/java-petstore-jersey2.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main" rm -rf samples/client/petstore/java/jersey2/src/main diff --git a/bin/java-petstore-okhttp-gson-parcelable.sh b/bin/java-petstore-okhttp-gson-parcelable.sh index 183aa87693a..ae4fbfd8d2b 100755 --- a/bin/java-petstore-okhttp-gson-parcelable.sh +++ b/bin/java-petstore-okhttp-gson-parcelable.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true $@" +ags="generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel --additional-properties hideGenerationTimestamp=true,parcelableModel=true $@" rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/main find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} + diff --git a/bin/java-petstore-okhttp-gson.sh b/bin/java-petstore-okhttp-gson.sh index 3d788766122..8e7e7ac84e4 100755 --- a/bin/java-petstore-okhttp-gson.sh +++ b/bin/java-petstore-okhttp-gson.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson --additional-properties hideGenerationTimestamp=true $@" rm -rf samples/client/petstore/java/okhttp-gson/src/main find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} + diff --git a/bin/java-petstore-rest-assured.sh b/bin/java-petstore-rest-assured.sh index 012f2dced08..cacc3cf3c27 100755 --- a/bin/java-petstore-rest-assured.sh +++ b/bin/java-petstore-rest-assured.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured -DhideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured --additional-properties hideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is $@" echo "Removing files and folders under samples/client/petstore/java/rest-assured/src/main" rm -rf samples/client/petstore/java/rest-assured/src/main diff --git a/bin/java-petstore-resteasy.sh b/bin/java-petstore-resteasy.sh index c0a0b0c188c..ae611374131 100755 --- a/bin/java-petstore-resteasy.sh +++ b/bin/java-petstore-resteasy.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resteasy.json -o samples/client/petstore/java/resteasy -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resteasy.json -o samples/client/petstore/java/resteasy --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/resteasy/src/main" rm -rf samples/client/petstore/java/resteasy/src/main diff --git a/bin/java-petstore-resttemplate-withxml.sh b/bin/java-petstore-resttemplate-withxml.sh index fe44afde84d..19c142a2d4f 100755 --- a/bin/java-petstore-resttemplate-withxml.sh +++ b/bin/java-petstore-resttemplate-withxml.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id petstore-resttemplate-withxml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id petstore-resttemplate-withxml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml --additional-properties hideGenerationTimestamp=true,withXml=true $@" echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" rm -rf samples/client/petstore/java/resttemplate-withXml/src/main diff --git a/bin/java-petstore-resttemplate.sh b/bin/java-petstore-resttemplate.sh index e1cf8ac27bc..d37d40059ff 100755 --- a/bin/java-petstore-resttemplate.sh +++ b/bin/java-petstore-resttemplate.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" rm -rf samples/client/petstore/java/resttemplate/src/main diff --git a/bin/java-petstore-retrofit.sh b/bin/java-petstore-retrofit.sh index e368e1b1b3a..127f16b44eb 100755 --- a/bin/java-petstore-retrofit.sh +++ b/bin/java-petstore-retrofit.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit -DhideGenerationTimestamp=true,dateLibrary=joda $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda $@" echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main" rm -rf samples/client/petstore/java/retrofit/src/main diff --git a/bin/java-petstore-retrofit2-play24.sh b/bin/java-petstore-retrofit2-play24.sh index fa37a6f0d4b..4b94855865e 100755 --- a/bin/java-petstore-retrofit2-play24.sh +++ b/bin/java-petstore-retrofit2-play24.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main" rm -rf samples/client/petstore/java/retrofit2-play24/src/main diff --git a/bin/java-petstore-retrofit2-play25.sh b/bin/java-petstore-retrofit2-play25.sh index f06506493f6..1954c2e045e 100755 --- a/bin/java-petstore-retrofit2-play25.sh +++ b/bin/java-petstore-retrofit2-play25.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main" rm -rf samples/client/petstore/java/retrofit2-play25/src/main diff --git a/bin/java-petstore-retrofit2-play26.sh b/bin/java-petstore-retrofit2-play26.sh index edec7c1d214..0c582d09af1 100755 --- a/bin/java-petstore-retrofit2-play26.sh +++ b/bin/java-petstore-retrofit2-play26.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2-play26/src/main" rm -rf samples/client/petstore/java/retrofit2-play26/src/main diff --git a/bin/java-petstore-retrofit2.sh b/bin/java-petstore-retrofit2.sh index 18251325cfe..2dce65f2724 100755 --- a/bin/java-petstore-retrofit2.sh +++ b/bin/java-petstore-retrofit2.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2/src/main" rm -rf samples/client/petstore/java/retrofit2/src/main diff --git a/bin/java-petstore-retrofit2rx.sh b/bin/java-petstore-retrofit2rx.sh index fd29f093902..74729919db1 100755 --- a/bin/java-petstore-retrofit2rx.sh +++ b/bin/java-petstore-retrofit2rx.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx.json -o samples/client/petstore/java/retrofit2rx -DuseRxJava=true,hideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx.json -o samples/client/petstore/java/retrofit2rx --additional-properties useRxJava=true,hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2rx/src/main" rm -rf samples/client/petstore/java/retrofit2rx/src/main diff --git a/bin/java-petstore-retrofit2rx2.sh b/bin/java-petstore-retrofit2rx2.sh index 33c35a9a6d3..05d6acb7bd0 100755 --- a/bin/java-petstore-retrofit2rx2.sh +++ b/bin/java-petstore-retrofit2rx2.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx2.json -o samples/client/petstore/java/retrofit2rx2 -DuseRxJava2=true,hideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx2.json -o samples/client/petstore/java/retrofit2rx2 --additional-properties useRxJava2=true,hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/retrofit2rx2/src/main" rm -rf samples/client/petstore/java/retrofit2rx2/src/main diff --git a/bin/java-petstore-vertx.sh b/bin/java-petstore-vertx.sh index badb9eff0f6..8eeb623b278 100755 --- a/bin/java-petstore-vertx.sh +++ b/bin/java-petstore-vertx.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/vertx -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-vertx.json -o samples/client/petstore/java/vertx -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/vertx -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-vertx.json -o samples/client/petstore/java/vertx --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/vertx/src/main" rm -rf samples/client/petstore/java/vertx/src/main diff --git a/bin/java-petstore-webclient.sh b/bin/java-petstore-webclient.sh index 7c737060192..c9402c60c0a 100755 --- a/bin/java-petstore-webclient.sh +++ b/bin/java-petstore-webclient.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/webclient/src/main" rm -rf samples/client/petstore/java/webclient/src/main diff --git a/bin/java-pkmst-petstore-server.sh b/bin/java-pkmst-petstore-server.sh index 9d98201b688..25d1c953197 100755 --- a/bin/java-pkmst-petstore-server.sh +++ b/bin/java-pkmst-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/java-pkmst -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-pkmst -o samples/server/petstore/java-pkmst/ -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/java-pkmst -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-pkmst -o samples/server/petstore/java-pkmst/ --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main" rm -rf samples/server/petstore/java-pkmst/src/main diff --git a/bin/java-play-framework-petstore-server-api-package-override.sh b/bin/java-play-framework-petstore-server-api-package-override.sh index d5069d98257..cba7507689e 100755 --- a/bin/java-play-framework-petstore-server-api-package-override.sh +++ b/bin/java-play-framework-petstore-server-api-package-override.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-api-package-override -DhideGenerationTimestamp=true,apiPackage=com.puppies.store.apis $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-api-package-override --additional-properties hideGenerationTimestamp=true,apiPackage=com.puppies.store.apis $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-async.sh b/bin/java-play-framework-petstore-server-async.sh index 86d5baf77f4..c09f9772fa3 100755 --- a/bin/java-play-framework-petstore-server-async.sh +++ b/bin/java-play-framework-petstore-server-async.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-controller-only.sh b/bin/java-play-framework-petstore-server-controller-only.sh index 94bf0b72777..85a23261221 100755 --- a/bin/java-play-framework-petstore-server-controller-only.sh +++ b/bin/java-play-framework-petstore-server-controller-only.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-controller-only -DhideGenerationTimestamp=true,controllerOnly=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-controller-only --additional-properties hideGenerationTimestamp=true,controllerOnly=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-fake-endpoints.sh b/bin/java-play-framework-petstore-server-fake-endpoints.sh index d9c45fca07a..0ae05412047 100755 --- a/bin/java-play-framework-petstore-server-fake-endpoints.sh +++ b/bin/java-play-framework-petstore-server-fake-endpoints.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-no-bean-validation.sh b/bin/java-play-framework-petstore-server-no-bean-validation.sh index b824bc82fbd..92b924b73d0 100755 --- a/bin/java-play-framework-petstore-server-no-bean-validation.sh +++ b/bin/java-play-framework-petstore-server-no-bean-validation.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation -DhideGenerationTimestamp=true,useBeanValidation=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation --additional-properties hideGenerationTimestamp=true,useBeanValidation=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-no-exception-handling.sh b/bin/java-play-framework-petstore-server-no-exception-handling.sh index c798713aacc..b9fe281c4c1 100755 --- a/bin/java-play-framework-petstore-server-no-exception-handling.sh +++ b/bin/java-play-framework-petstore-server-no-exception-handling.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling -DhideGenerationTimestamp=true,handleExceptions=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling --additional-properties hideGenerationTimestamp=true,handleExceptions=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-no-interface.sh b/bin/java-play-framework-petstore-server-no-interface.sh index 42fb56f7a1c..dbc4b8734ab 100755 --- a/bin/java-play-framework-petstore-server-no-interface.sh +++ b/bin/java-play-framework-petstore-server-no-interface.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-interface -DhideGenerationTimestamp=true,useInterfaces=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-interface --additional-properties hideGenerationTimestamp=true,useInterfaces=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-no-swagger-ui.sh b/bin/java-play-framework-petstore-server-no-swagger-ui.sh index 09e3936bbbb..494a0253161 100755 --- a/bin/java-play-framework-petstore-server-no-swagger-ui.sh +++ b/bin/java-play-framework-petstore-server-no-swagger-ui.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui -DhideGenerationTimestamp=true,useSwaggerUI=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui --additional-properties hideGenerationTimestamp=true,useSwaggerUI=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-no-wrap-calls.sh b/bin/java-play-framework-petstore-server-no-wrap-calls.sh index 215dcf48ea1..7de56cc566e 100755 --- a/bin/java-play-framework-petstore-server-no-wrap-calls.sh +++ b/bin/java-play-framework-petstore-server-no-wrap-calls.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls -DhideGenerationTimestamp=true,wrapCalls=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls --additional-properties hideGenerationTimestamp=true,wrapCalls=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server.sh b/bin/java-play-framework-petstore-server.sh index cb26c3c0836..b187c2e47b9 100755 --- a/bin/java-play-framework-petstore-server.sh +++ b/bin/java-play-framework-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-vertx-async-petstore-server.sh b/bin/java-vertx-async-petstore-server.sh index bdedff11270..519dd79c2b3 100755 --- a/bin/java-vertx-async-petstore-server.sh +++ b/bin/java-vertx-async-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx -o samples/server/petstore/java-vertx/async -DvertxSwaggerRouterVersion=1.4.0 -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx -o samples/server/petstore/java-vertx/async --additional-properties vertxSwaggerRouterVersion=1.4.0,hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-vertx-rx-petstore-server.sh b/bin/java-vertx-rx-petstore-server.sh index 051798c8d45..651f03f777d 100755 --- a/bin/java-vertx-rx-petstore-server.sh +++ b/bin/java-vertx-rx-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx --artifact-id java-vertx-rx-server -o samples/server/petstore/java-vertx/rx -DvertxSwaggerRouterVersion=1.4.0,rxInterface=true -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx --artifact-id java-vertx-rx-server -o samples/server/petstore/java-vertx/rx --additional-properties vertxSwaggerRouterVersion=1.4.0,rxInterface=true --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java8-petstore-jersey2.sh b/bin/java8-petstore-jersey2.sh index 739f75334e6..488fe202f29 100755 --- a/bin/java8-petstore-jersey2.sh +++ b/bin/java8-petstore-jersey2.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@" +ags="generate --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" echo "Removing files and folders under samples/client/petstore/java/jersey2-java8/src/main" rm -rf samples/client/petstore/java/jersey2-java8/src/main diff --git a/bin/javascript-es6-petstore.sh b/bin/javascript-es6-petstore.sh index 8def380b258..7c80155bb15 100755 --- a/bin/javascript-es6-petstore.sh +++ b/bin/javascript-es6-petstore.sh @@ -29,6 +29,7 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \ +--additional-properties appName=PetstoreClient \ -o samples/client/petstore/javascript-es6 $@" -java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-flowtyped-petstore.sh b/bin/javascript-flowtyped-petstore.sh index 92d88319821..061837a6384 100755 --- a/bin/javascript-flowtyped-petstore.sh +++ b/bin/javascript-flowtyped-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Flowtyped -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-flowtyped -o samples/client/petstore/javascript-flowtyped -DappName=PetstoreClient $@" +ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Flowtyped -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-flowtyped -o samples/client/petstore/javascript-flowtyped --additional-properties appName=PetstoreClient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-petstore.sh b/bin/javascript-petstore.sh index 3b73aa4be6b..f2313a0c198 100755 --- a/bin/javascript-petstore.sh +++ b/bin/javascript-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Javascript -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples/client/petstore/javascript -DappName=PetstoreClient --additional-properties useES6=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/Javascript -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples/client/petstore/javascript --additional-properties appName=PetstoreClient,useES6=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-promise-es6-petstore.sh b/bin/javascript-promise-es6-petstore.sh index 3dd0d7a4fca..c953eb99dad 100755 --- a/bin/javascript-promise-es6-petstore.sh +++ b/bin/javascript-promise-es6-petstore.sh @@ -30,6 +30,6 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \ -o samples/client/petstore/javascript-promise-es6 \ ---additional-properties usePromises=true,useES6=true $@" +--additional-properties appName=PetstoreClient,usePromises=true,useES6=true $@" -java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-promise-petstore.sh b/bin/javascript-promise-petstore.sh index f6eb25b5c43..6702e60b2a3 100755 --- a/bin/javascript-promise-petstore.sh +++ b/bin/javascript-promise-petstore.sh @@ -33,6 +33,6 @@ ags="generate \ -g javascript \ -o samples/client/petstore/javascript-promise \ --additional-properties usePromises=true,useES6=false \ --DappName=PetstoreClient $@" +--additional-properties appName=PetstoreClient $@" 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 ee5d3d29a26..3d1e538c394 100755 --- a/bin/jaxrs-cxf-cdi-petstore-server.sh +++ b/bin/jaxrs-cxf-cdi-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi --additional-properties hideGenerationTimestamp=true $@" 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 8eac07795eb..3c8b96a2e64 100755 --- a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh +++ b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-annotated-basepath -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 $@" +ags="generate --artifact-id cxf-annotated-basepath -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 $@" 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 6ed2e5a05fe..6db712b74bb 100755 --- a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh +++ b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-server-non-spring -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 $@" +ags="generate --artifact-id cxf-server-non-spring -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app --additional-properties hideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-test-data.sh b/bin/jaxrs-cxf-petstore-server-test-data.sh index 5b187c65fbf..6844b7bcf84 100755 --- a/bin/jaxrs-cxf-petstore-server-test-data.sh +++ b/bin/jaxrs-cxf-petstore-server-test-data.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data -DhideGenerationTimestamp=true -DuseAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@" +ags="generate --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server.sh b/bin/jaxrs-cxf-petstore-server.sh index 9efff273fa9..4081b01e862 100755 --- a/bin/jaxrs-cxf-petstore-server.sh +++ b/bin/jaxrs-cxf-petstore-server.sh @@ -30,6 +30,6 @@ rm -rf samples/server/petstore/jaxrs-cxf # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-jersey1-petstore-server.sh b/bin/jaxrs-jersey1-petstore-server.sh index 67576239847..3cc7cc87615 100755 --- a/bin/jaxrs-jersey1-petstore-server.sh +++ b/bin/jaxrs-jersey1-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-server $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-server $@" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main" rm -rf samples/server/petstore/jaxrs/jersey1/src/main diff --git a/bin/jaxrs-jersey1-usetags-petstore-server.sh b/bin/jaxrs-jersey1-usetags-petstore-server.sh index 3e1c6bf6c06..00746c68db1 100755 --- a/bin/jaxrs-jersey1-usetags-petstore-server.sh +++ b/bin/jaxrs-jersey1-usetags-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-useTags --additional-properties useTags=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-useTags --additional-properties useTags=true $@" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main" rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main diff --git a/bin/jaxrs-petstore-server-datelib-j8.sh b/bin/jaxrs-petstore-server-datelib-j8.sh index ef8e27e98df..64e9caff3bf 100755 --- a/bin/jaxrs-petstore-server-datelib-j8.sh +++ b/bin/jaxrs-petstore-server-datelib-j8.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-petstore-server.sh b/bin/jaxrs-petstore-server.sh index df248d61288..a75e5d3e55b 100755 --- a/bin/jaxrs-petstore-server.sh +++ b/bin/jaxrs-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-jersey-petstore-server -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 -DhideGenerationTimestamp=true,serverPort=8082 $@" +ags="generate --artifact-id jaxrs-jersey-petstore-server -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 --additional-properties hideGenerationTimestamp=true,serverPort=8082 $@" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main" rm -rf samples/server/petstore/jaxrs/jersey2/src/main diff --git a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh index 4a99e7c8851..8b85c903722 100755 --- a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-resteasy-eap-java8-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-java8 -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-java8-petstore-server.json $@" +ags="generate --artifact-id jaxrs-resteasy-eap-java8-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-java8 --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-java8-petstore-server.json $@" 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 diff --git a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh index 656774e441f..af9885025d6 100755 --- a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh @@ -26,7 +26,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-resteasy-eap-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-joda-petstore-server.json $@" +ags="generate --artifact-id jaxrs-resteasy-eap-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-joda-petstore-server.json $@" 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 diff --git a/bin/jaxrs-resteasy-eap-petstore-server.sh b/bin/jaxrs-resteasy-eap-petstore-server.sh index 39c2bff75d9..7cc23202f48 100755 --- a/bin/jaxrs-resteasy-eap-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/eap/src/main diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh index 086dd81c241..66bb1c3fffa 100755 --- a/bin/jaxrs-resteasy-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-joda-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-resteasy-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json $@" +ags="generate --artifact-id jaxrs-resteasy-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-petstore-server.sh b/bin/jaxrs-resteasy-petstore-server.sh index d6eabb20e75..6b40673aebd 100755 --- a/bin/jaxrs-resteasy-petstore-server.sh +++ b/bin/jaxrs-resteasy-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh b/bin/jaxrs-spec-petstore-server-interface-returning-response.sh index d964fa44e59..c4cc314bb4f 100755 --- a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh +++ b/bin/jaxrs-spec-petstore-server-interface-returning-response.sh @@ -28,9 +28,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate --artifact-id jaxrs-spec-interface-response-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface-response --DhideGenerationTimestamp=true --DserializableModel=true --DinterfaceOnly=true --DreturnResponse=true $@" +--additional-properties hideGenerationTimestamp=true +--additional-properties serializableModel=true +--additional-properties interfaceOnly=true +--additional-properties returnResponse=true $@" 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 73c2479977c..570443e26ee 100755 --- a/bin/jaxrs-spec-petstore-server-interface.sh +++ b/bin/jaxrs-spec-petstore-server-interface.sh @@ -28,8 +28,8 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate --artifact-id jaxrs-spec-interface-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface --DhideGenerationTimestamp=true --DserializableModel=true --DinterfaceOnly=true $@" +--additional-properties hideGenerationTimestamp=true +--additional-properties serializableModel=true +--additional-properties interfaceOnly=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server.sh b/bin/jaxrs-spec-petstore-server.sh index 296b03b4fab..9d0c75513bd 100755 --- a/bin/jaxrs-spec-petstore-server.sh +++ b/bin/jaxrs-spec-petstore-server.sh @@ -28,7 +28,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate --artifact-id jaxrs-spec-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec --DhideGenerationTimestamp=true --DserializableModel=true $@" +--additional-properties hideGenerationTimestamp=true +--additional-properties serializableModel=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-usetags-petstore-server.sh b/bin/jaxrs-usetags-petstore-server.sh index bd811f3a7e8..1c84b29a033 100755 --- a/bin/jaxrs-usetags-petstore-server.sh +++ b/bin/jaxrs-usetags-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags -DhideGenerationTimestamp=true,serverPort=8082 --artifact-id=jaxrs-jersey2-useTags --additional-properties useTags=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --artifact-id=jaxrs-jersey2-useTags --additional-properties useTags=true $@" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main" rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main diff --git a/bin/kotlin-client-petstore.sh b/bin/kotlin-client-petstore.sh index fdcdb59b196..cad4be6995e 100755 --- a/bin/kotlin-client-petstore.sh +++ b/bin/kotlin-client-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client -D dateLibrary=java8 -o samples/client/petstore/kotlin $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/client/petstore/kotlin $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-string.sh b/bin/kotlin-client-string.sh index 2011e52e5e8..410ddbab399 100755 --- a/bin/kotlin-client-string.sh +++ b/bin/kotlin-client-string.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string -D dateLibrary=string -o samples/client/petstore/kotlin-string $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string -o samples/client/petstore/kotlin-string $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-threetenbp.sh b/bin/kotlin-client-threetenbp.sh index c207268d8c3..0cb7f27da09 100755 --- a/bin/kotlin-client-threetenbp.sh +++ b/bin/kotlin-client-threetenbp.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp -D dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp --additional-properties dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-server-petstore.sh b/bin/kotlin-server-petstore.sh index 43ab67d264c..dbdf48b2bbd 100755 --- a/bin/kotlin-server-petstore.sh +++ b/bin/kotlin-server-petstore.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor --additional-properties hideGenerationTimestamp=true $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/lua-petstore.sh b/bin/lua-petstore.sh index b7adaaac460..44b5cc38637 100755 --- a/bin/lua-petstore.sh +++ b/bin/lua-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g lua -o samples/client/petstore/lua -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g lua -o samples/client/petstore/lua --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/nodejs-petstore-google-cloud-functions.sh index 80e12027058..c3db5f9bcb1 100755 --- a/bin/nodejs-petstore-google-cloud-functions.sh +++ b/bin/nodejs-petstore-google-cloud-functions.sh @@ -26,7 +26,7 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nodejs-petstore-server.sh b/bin/nodejs-petstore-server.sh index 2dfc8f327c7..9c8f945116f 100755 --- a/bin/nodejs-petstore-server.sh +++ b/bin/nodejs-petstore-server.sh @@ -26,7 +26,7 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/objc-petstore-coredata.sh b/bin/objc-petstore-coredata.sh index 124f800da21..ffa6d198822 100755 --- a/bin/objc-petstore-coredata.sh +++ b/bin/objc-petstore-coredata.sh @@ -26,7 +26,8 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -c bin/objc-petstore.json $@" +export GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}" +ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true -c bin/objc-petstore.json $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/android-petstore-httpclient.sh b/bin/openapi3/android-petstore-httpclient.sh index e1616221492..a16ff89917a 100755 --- a/bin/openapi3/android-petstore-httpclient.sh +++ b/bin/openapi3/android-petstore-httpclient.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android -Dlibrary=httpclient -o samples/client/petstore/android/httpclient $@" +ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/dart-petstore.sh b/bin/openapi3/dart-petstore.sh index f9da99019e0..2bab8d1abac 100755 --- a/bin/openapi3/dart-petstore.sh +++ b/bin/openapi3/dart-petstore.sh @@ -29,18 +29,18 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" # then options to generate the library for vm would be: -#ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@" +#ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@" #java $JAVA_OPTS -jar $executable $ags # Generate browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@" #java $JAVA_OPTS -jar $executable $ags # Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" java $JAVA_OPTS -jar $executable $ags # There is a proposal to allow importing different libraries depending on the environment: diff --git a/bin/openapi3/erlang-petstore-client.sh b/bin/openapi3/erlang-petstore-client.sh index 102cc342d07..fc75014a41e 100755 --- a/bin/openapi3/erlang-petstore-client.sh +++ b/bin/openapi3/erlang-petstore-client.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-client -DpackageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/go-gin-petstore-server.sh b/bin/openapi3/go-gin-petstore-server.sh index a3f14d4b622..8ab2b8397e0 100755 --- a/bin/openapi3/go-gin-petstore-server.sh +++ b/bin/openapi3/go-gin-petstore-server.sh @@ -35,7 +35,7 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags #!/usr/bin/env bash \ No newline at end of file diff --git a/bin/openapi3/go-petstore-server.sh b/bin/openapi3/go-petstore-server.sh index bbe46e70383..7909ec7d5db 100755 --- a/bin/openapi3/go-petstore-server.sh +++ b/bin/openapi3/go-petstore-server.sh @@ -35,6 +35,6 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@" +ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/go-petstore.sh b/bin/openapi3/go-petstore.sh index 872fcb610eb..ad921deae9c 100755 --- a/bin/openapi3/go-petstore.sh +++ b/bin/openapi3/go-petstore.sh @@ -34,6 +34,6 @@ rm -rf $STUB_DIR # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/graphql-nodejs-express-server.sh b/bin/openapi3/graphql-nodejs-express-server.sh index 0e1291c8a6d..41a69511601 100755 --- a/bin/openapi3/graphql-nodejs-express-server.sh +++ b/bin/openapi3/graphql-nodejs-express-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/groovy-petstore.sh b/bin/openapi3/groovy-petstore.sh index 1dd1d9c8021..c0c1ddda051 100755 --- a/bin/openapi3/groovy-petstore.sh +++ b/bin/openapi3/groovy-petstore.sh @@ -27,5 +27,5 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g groovy -o samples/client/petstore/groovy --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/javascript-es6-petstore.sh b/bin/openapi3/javascript-es6-petstore.sh index fac3a9039f6..96e45b4b8e7 100755 --- a/bin/openapi3/javascript-es6-petstore.sh +++ b/bin/openapi3/javascript-es6-petstore.sh @@ -29,6 +29,6 @@ fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \ --o samples/openapi3/client/petstore/javascript-es6 $@" +-o samples/openapi3/client/petstore/javascript-es6 --additional-properties appName=PetstoreClient $@" -java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/jaxrs-jersey-petstore.sh b/bin/openapi3/jaxrs-jersey-petstore.sh index ddb1968cdb3..2b1e71f73e1 100755 --- a/bin/openapi3/jaxrs-jersey-petstore.sh +++ b/bin/openapi3/jaxrs-jersey-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore.sh b/bin/openapi3/kotlin-client-petstore.sh index cfd443d43e2..5ffd829b05d 100755 --- a/bin/openapi3/kotlin-client-petstore.sh +++ b/bin/openapi3/kotlin-client-petstore.sh @@ -26,7 +26,7 @@ then fi export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client -D dateLibrary=java8 -o samples/openapi3/client/petstore/kotlin $@" +ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/openapi3/client/petstore/kotlin $@" echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin" rm -rf samples/openapi3/client/petstore/kotlin diff --git a/bin/openapi3/lua-petstore.sh b/bin/openapi3/lua-petstore.sh index aa70c3b0696..f598c67aa02 100755 --- a/bin/openapi3/lua-petstore.sh +++ b/bin/openapi3/lua-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g lua -o samples/client/petstore/lua -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g lua -o samples/client/petstore/lua --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh index a11e8da6c5d..33018310a43 100755 --- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh +++ b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh @@ -26,7 +26,7 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/openapi3/nodejs-petstore-server.sh index df83e4ebfa6..408bd20fba2 100755 --- a/bin/openapi3/nodejs-petstore-server.sh +++ b/bin/openapi3/nodejs-petstore-server.sh @@ -26,7 +26,7 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore-coredata.sh b/bin/openapi3/objc-petstore-coredata.sh index 97fa054794f..ec36e2f510a 100755 --- a/bin/openapi3/objc-petstore-coredata.sh +++ b/bin/openapi3/objc-petstore-coredata.sh @@ -26,7 +26,8 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -D appName=PetstoreClient $@" +export GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}" +ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true,appName=PetstoreClient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore.sh b/bin/openapi3/objc-petstore.sh index 11313e903d4..5840e39a450 100755 --- a/bin/openapi3/objc-petstore.sh +++ b/bin/openapi3/objc-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@" +ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/default --additional-properties appName=PetstoreClient $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/perl-petstore.sh b/bin/openapi3/perl-petstore.sh index 02293ae8b6f..7707591647b 100755 --- a/bin/openapi3/perl-petstore.sh +++ b/bin/openapi3/perl-petstore.sh @@ -28,6 +28,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # complex module name used for testing -ags="generate -t modules/openapi-generator/src/main/resources/perl -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/perl -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/python-flask-petstore-python2.sh b/bin/openapi3/python-flask-petstore-python2.sh index c98569d10c4..2f303a57e3d 100755 --- a/bin/openapi3/python-flask-petstore-python2.sh +++ b/bin/openapi3/python-flask-petstore-python2.sh @@ -32,7 +32,7 @@ resources=modules/openapi-generator/src/main/resources/python-flask # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g python-flask -o $out_folder -c bin/supportPython2.json -D service $@" +ags="generate -t $resources -i $input -g python-flask -o $out_folder -c bin/supportPython2.json $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/openapi3/python-flask-petstore.sh b/bin/openapi3/python-flask-petstore.sh index 473c69a7b2c..fda1f6a5743 100755 --- a/bin/openapi3/python-flask-petstore.sh +++ b/bin/openapi3/python-flask-petstore.sh @@ -31,8 +31,8 @@ out_folder=samples/server/openapi3/petstore/python-flask resources=modules/openapi-generator/src/main/resources/python-flask # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g python-flask -o $out_folder -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t $resources -i $input -g python-flask -o $out_folder $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/openapi3/python-petstore.sh b/bin/openapi3/python-petstore.sh index b1c5144bdfa..c1dce94f9c2 100755 --- a/bin/openapi3/python-petstore.sh +++ b/bin/openapi3/python-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ -DpackageName=petstore_api $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ --additional-properties packageName=petstore_api $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/r-petstore.sh b/bin/openapi3/r-petstore.sh index cfc0d262acd..9ca5ed61d00 100755 --- a/bin/openapi3/r-petstore.sh +++ b/bin/openapi3/r-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g r -o samples/client/petstore/R -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/ruby-client-petstore.sh b/bin/openapi3/ruby-client-petstore.sh index 237b8ca6ae9..0be84e7eca8 100755 --- a/bin/openapi3/ruby-client-petstore.sh +++ b/bin/openapi3/ruby-client-petstore.sh @@ -38,6 +38,6 @@ find samples/openapi3/client/petstore/ruby/spec -type f -not -name petstore_help # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby -DskipFormModel=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby --additional-properties skipFormModel=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/rust-petstore.sh b/bin/openapi3/rust-petstore.sh index c252daaf1e6..a4812fc9093 100755 --- a/bin/openapi3/rust-petstore.sh +++ b/bin/openapi3/rust-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o samples/client/petstore/rust -DpackageName=petstore_client $@" +ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/openapi3/typescript-angular-petstore-all.sh b/bin/openapi3/typescript-angular-petstore-all.sh index cf0116c6b25..bb0d6d2479c 100755 --- a/bin/openapi3/typescript-angular-petstore-all.sh +++ b/bin/openapi3/typescript-angular-petstore-all.sh @@ -37,7 +37,7 @@ ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml java $JAVA_OPTS -jar $executable $ags echo "Typescript Petstore API client (with interfaces generated)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags echo "Typescript Petstore API client (v4 { Adding InjectionToken Over OpaqueToken })" diff --git a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh b/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh index deff9fdba5c..3d74ccc1a95 100755 --- a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh +++ b/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore-interfaces.sh b/bin/openapi3/typescript-fetch-petstore-interfaces.sh index bf56d7ba9e4..d1e21dfbca7 100755 --- a/bin/openapi3/typescript-fetch-petstore-interfaces.sh +++ b/bin/openapi3/typescript-fetch-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces -D withInterfaces=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/perl-deep-module-petstore.sh b/bin/perl-deep-module-petstore.sh index 25837a8fe9d..8e47a7d3b82 100755 --- a/bin/perl-deep-module-petstore.sh +++ b/bin/perl-deep-module-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # complex module name used for testing -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl/deep_module_test -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl/deep_module_test --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags --additional-properties moduleName=Something::Deep -o samples/client/petstore/perl/deep_module_test diff --git a/bin/perl-petstore.sh b/bin/perl-petstore.sh index 36ac10a4ddd..48974454b73 100755 --- a/bin/perl-petstore.sh +++ b/bin/perl-petstore.sh @@ -28,6 +28,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" # complex module name used for testing -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl -DhideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-asyncio-petstore.sh b/bin/python-asyncio-petstore.sh index b551a8d4345..4219e51927e 100755 --- a/bin/python-asyncio-petstore.sh +++ b/bin/python-asyncio-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-asyncio -DpackageName=petstore_api --library asyncio $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-asyncio --additional-properties packageName=petstore_api --library asyncio $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-petstore.sh b/bin/python-petstore.sh index 96f67e76586..651fda1e721 100755 --- a/bin/python-petstore.sh +++ b/bin/python-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python -DpackageName=petstore_api $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python --additional-properties packageName=petstore_api $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-aiohttp-petstore.sh b/bin/python-server-aiohttp-petstore.sh index 38aae23d5f3..f5cc9bc711b 100755 --- a/bin/python-server-aiohttp-petstore.sh +++ b/bin/python-server-aiohttp-petstore.sh @@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator resources=modules/openapi-generator/src/main/resources/$generator # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t $resources -i $input -g $generator -o $out_folder $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/python-server-blueplanet-petstore.sh b/bin/python-server-blueplanet-petstore.sh index ece725e1c1b..074c53f8788 100755 --- a/bin/python-server-blueplanet-petstore.sh +++ b/bin/python-server-blueplanet-petstore.sh @@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator resources=modules/openapi-generator/src/main/resources/$generator # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t $resources -i $input -g $generator -o $out_folder $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/python-server-flask-petstore-python2.sh b/bin/python-server-flask-petstore-python2.sh index debbb458a15..f720fd5d4f4 100755 --- a/bin/python-server-flask-petstore-python2.sh +++ b/bin/python-server-flask-petstore-python2.sh @@ -30,9 +30,8 @@ input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml out_folder=samples/server/petstore/$generator-python2 resources=modules/openapi-generator/src/main/resources/$generator -# if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g $generator -o $out_folder -c bin/supportPython2.json -D service $@" +ags="generate -t $resources -i $input -g $generator -o $out_folder -c bin/supportPython2.json $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/python-server-flask-petstore.sh b/bin/python-server-flask-petstore.sh index 915aacd540a..eead0ce0d4f 100755 --- a/bin/python-server-flask-petstore.sh +++ b/bin/python-server-flask-petstore.sh @@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator resources=modules/openapi-generator/src/main/resources/$generator # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" +ags="generate -t $resources -i $input -g $generator -o $out_folder $@" rm -rf $out_folder/.openapi* rm -rf $out_folder/openapi_server diff --git a/bin/python-tornado-petstore.sh b/bin/python-tornado-petstore.sh index 5ee9e2cc8bd..1d51e798fe9 100755 --- a/bin/python-tornado-petstore.sh +++ b/bin/python-tornado-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-tornado -DpackageName=petstore_api --library tornado $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-tornado --additional-properties packageName=petstore_api --library tornado $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/r-petstore.sh b/bin/r-petstore.sh index ac9d2427b6a..4decf28f72f 100755 --- a/bin/r-petstore.sh +++ b/bin/r-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g r -o samples/client/petstore/R -DpackageName=petstore $@" +ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/rust-petstore.sh b/bin/rust-petstore.sh index b58d3de7dd6..f8002951208 100755 --- a/bin/rust-petstore.sh +++ b/bin/rust-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust -DpackageName=petstore_client --library=hyper $@" +ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client --library=hyper $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/rust-reqwest-petstore.sh b/bin/rust-reqwest-petstore.sh index 054a757c5fa..7a5fc8d8cdd 100755 --- a/bin/rust-reqwest-petstore.sh +++ b/bin/rust-reqwest-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust-reqwest -DpackageName=petstore_client --library=reqwest $@" +ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust-reqwest --additional-properties packageName=petstore_client --library=reqwest $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/rust-server-petstore.sh b/bin/rust-server-petstore.sh index 5aa1344766c..e0a459d59e7 100755 --- a/bin/rust-server-petstore.sh +++ b/bin/rust-server-petstore.sh @@ -32,7 +32,7 @@ for spec_path in modules/openapi-generator/src/test/resources/*/rust-server/* ; --input-spec $spec_path --generator-name rust-server --output samples/server/petstore/rust-server/output/$spec - -DpackageName=$spec + --additional-properties packageName=$spec --additional-properties hideGenerationTimestamp=true --generate-alias-as-model $@" diff --git a/bin/spring-cloud-feign-petstore.sh b/bin/spring-cloud-feign-petstore.sh index 2c0c758e806..2dfef88064f 100755 --- a/bin/spring-cloud-feign-petstore.sh +++ b/bin/spring-cloud-feign-petstore.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud -DhideGenerationTimestamp=true,responseWrapper=HystrixCommand $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud --additional-properties hideGenerationTimestamp=true,responseWrapper=HystrixCommand $@" echo "Removing files and folders under samples/client/petstore/spring-cloud/src/main" rm -rf samples/client/petstore/spring-cloud/src/main diff --git a/bin/spring-delegate-j8.sh b/bin/spring-delegate-j8.sh index 56146e282ba..df75a5d169b 100755 --- a/bin/spring-delegate-j8.sh +++ b/bin/spring-delegate-j8.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-delegate-j8 -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate-j8 -DdelegatePattern=true,hideGenerationTimestamp=true $@" +ags="generate --artifact-id springboot-delegate-j8 -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate-j8 --additional-properties delegatePattern=true,hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot-delegate-j8/src/main" rm -rf samples/server/petstore/springboot-delegate-j8/src/main diff --git a/bin/spring-delegate.sh b/bin/spring-delegate.sh index 4cf133072c2..2404c24cedc 100755 --- a/bin/spring-delegate.sh +++ b/bin/spring-delegate.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-delegate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate -DdelegatePattern=true,hideGenerationTimestamp=true,java8=false $@" +ags="generate --artifact-id springboot-delegate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate --additional-properties delegatePattern=true,hideGenerationTimestamp=true,java8=false $@" echo "Removing files and folders under samples/server/petstore/springboot-delegate/src/main" rm -rf samples/server/petstore/springboot-delegate/src/main diff --git a/bin/spring-mvc-petstore-j8-async-server.sh b/bin/spring-mvc-petstore-j8-async-server.sh index e55cfe647a4..fdbb35d4b41 100755 --- a/bin/spring-mvc-petstore-j8-async-server.sh +++ b/bin/spring-mvc-petstore-j8-async-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,async=true --additional-properties serverPort=8002 $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json --additional-properties hideGenerationTimestamp=true,async=true --additional-properties serverPort=8002 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-j8-localdatetime.sh b/bin/spring-mvc-petstore-j8-localdatetime.sh index e5a32b7dc7a..ae3b16177af 100755 --- a/bin/spring-mvc-petstore-j8-localdatetime.sh +++ b/bin/spring-mvc-petstore-j8-localdatetime.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime -DhideGenerationTimestamp=true -DbooleanGetterPrefix=get --additional-properties serverPort=8002 $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=get,serverPort=8002 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-server.sh b/bin/spring-mvc-petstore-server.sh index 71e6d73fac3..ddbb1b4d64f 100755 --- a/bin/spring-mvc-petstore-server.sh +++ b/bin/spring-mvc-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc -DhideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc --additional-properties hideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-stubs.sh b/bin/spring-stubs.sh index 1586459d3aa..79edfa1820e 100755 --- a/bin/spring-stubs.sh +++ b/bin/spring-stubs.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id spring-stubs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -o samples/client/petstore/spring-stubs -DinterfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true $@" +ags="generate --artifact-id spring-stubs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -o samples/client/petstore/spring-stubs --additional-properties interfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-beanvalidation.sh b/bin/springboot-petstore-server-beanvalidation.sh index 18f232ef6bd..33b1fdce58b 100755 --- a/bin/springboot-petstore-server-beanvalidation.sh +++ b/bin/springboot-petstore-server-beanvalidation.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-beanvalidation -c bin/springboot-petstore-server-beanvalidation.json -DhideGenerationTimestamp=true,java8=false $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-beanvalidation -c bin/springboot-petstore-server-beanvalidation.json --additional-properties hideGenerationTimestamp=true,java8=false $@" echo "Removing files and folders under samples/server/petstore/springboot-beanvalidation/src/main" rm -rf samples/server/petstore/springboot-beanvalidation/src/main diff --git a/bin/springboot-petstore-server-implicitHeaders.sh b/bin/springboot-petstore-server-implicitHeaders.sh index 8c56ade82ce..277c57fcbdd 100755 --- a/bin/springboot-petstore-server-implicitHeaders.sh +++ b/bin/springboot-petstore-server-implicitHeaders.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-implicitHeaders -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-implicitHeaders.json -o samples/server/petstore/springboot-implicitHeaders -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id springboot-implicitHeaders -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-implicitHeaders.json -o samples/server/petstore/springboot-implicitHeaders --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot-implicitHeaders/src/main" rm -rf samples/server/petstore/springboot-implicitHeaders/src/main diff --git a/bin/springboot-petstore-server-reactive.sh b/bin/springboot-petstore-server-reactive.sh index 9938be6aba5..6cc531e66e2 100755 --- a/bin/springboot-petstore-server-reactive.sh +++ b/bin/springboot-petstore-server-reactive.sh @@ -26,7 +26,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-reactive -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-reactive -Dreactive=true,delegatePattern=true,hideGenerationTimestamp=true $@" +ags="generate --artifact-id springboot-reactive -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-reactive --additional-properties reactive=true,delegatePattern=true,hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot-reactive/src/main" rm -rf samples/server/petstore/springboot-reactive/src/main diff --git a/bin/springboot-petstore-server-useOptional.sh b/bin/springboot-petstore-server-useOptional.sh index 35336dce752..029f923862a 100755 --- a/bin/springboot-petstore-server-useOptional.sh +++ b/bin/springboot-petstore-server-useOptional.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional -DhideGenerationTimestamp=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot-useoptional/src/main" rm -rf samples/server/petstore/springboot-useoptional/src/main diff --git a/bin/springboot-petstore-server.sh b/bin/springboot-petstore-server.sh index 725ac389007..9b34934163d 100755 --- a/bin/springboot-petstore-server.sh +++ b/bin/springboot-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot/src/main" rm -rf samples/server/petstore/springboot/src/main diff --git a/bin/springboot-virtualan-petstore-server.sh b/bin/springboot-virtualan-petstore-server.sh index a55eea9fafb..a8471cf1998 100755 --- a/bin/springboot-virtualan-petstore-server.sh +++ b/bin/springboot-virtualan-petstore-server.sh @@ -27,7 +27,7 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-virtualan -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-virtualan -c bin/springboot-virtualan-petstore-server.json -DhideGenerationTimestamp=true $@" +ags="generate --artifact-id springboot-virtualan -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-virtualan -c bin/springboot-virtualan-petstore-server.json --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/server/petstore/springboot-virtualan/src/main" rm -rf samples/server/petstore/springboot-virtualan/src/main diff --git a/bin/tests/test-debug-supporting-files.sh b/bin/tests/test-debug-supporting-files.sh index 3d6a2e86967..cd130225b4a 100755 --- a/bin/tests/test-debug-supporting-files.sh +++ b/bin/tests/test-debug-supporting-files.sh @@ -26,8 +26,8 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/issue_241.yaml -g python -o /tmp/test-debug-supporting-files/ -DpackageName=petstore_api -DdebugSupportingFiles=true $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DdebugSupportingFiles=true" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/issue_241.yaml -g python -o /tmp/test-debug-supporting-files/ --additional-properties packageName=petstore_api $@" if [[ $(java $JAVA_OPTS -jar $executable $ags 2>&1 | grep "StackOverflowError") ]]; then echo "There are StackOverflowError. Please check the result." diff --git a/bin/typescript-angular-v2-petstore-interfaces.sh b/bin/typescript-angular-v2-petstore-interfaces.sh index 6db2f6e11d6..18f638f4dfe 100755 --- a/bin/typescript-angular-v2-petstore-interfaces.sh +++ b/bin/typescript-angular-v2-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh index 082f197a716..981e55dbc28 100755 --- a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh +++ b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm --additional-properties ngVersion=6.0.0,providedInRoot=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh index deddf8d536f..f00826e050f 100755 --- a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh +++ b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default --additional-properties ngVersion=6.0.0,providedInRoot=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh index 4cb66477ee8..f74cb16b02a 100755 --- a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh +++ b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm -D providedInRoot=false --additional-properties ngVersion=7.0.0 $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm --additional-properties ngVersion=7.0.0,providedInRoot=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root.sh index d790a67c67b..46eb22cbc4d 100755 --- a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh +++ b/bin/typescript-angular-v7-petstore-not-provided-in-root.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default -D providedInRoot=false --additional-properties ngVersion=7.0.0 $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default --additional-properties ngVersion=7.0.0,providedInRoot=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-interfaces.sh b/bin/typescript-axios-petstore-interfaces.sh index 6ba5985126a..84a65e0aba3 100755 --- a/bin/typescript-axios-petstore-interfaces.sh +++ b/bin/typescript-axios-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces -D withInterfaces=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces --additional-properties withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-fetch-petstore-interfaces.sh b/bin/typescript-fetch-petstore-interfaces.sh index 58a9137820d..412d778b4f9 100755 --- a/bin/typescript-fetch-petstore-interfaces.sh +++ b/bin/typescript-fetch-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces -D withInterfaces=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-rxjs-petstore-interfaces.sh b/bin/typescript-rxjs-petstore-interfaces.sh index 92f6e8f328e..c7b52aca526 100755 --- a/bin/typescript-rxjs-petstore-interfaces.sh +++ b/bin/typescript-rxjs-petstore-interfaces.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/with-interfaces -D withInterfaces=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/with-interfaces --additional-properties withInterfaces=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/dart-client-petstore.bat b/bin/windows/dart-client-petstore.bat index 18ebdb6fc40..ad44ce96c33 100755 --- a/bin/windows/dart-client-petstore.bat +++ b/bin/windows/dart-client-petstore.bat @@ -5,8 +5,8 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\swagger -DhideGenerationTimestamp=true -DbrowserClient=false +set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\swagger -DhideGenerationTimestamp=true +set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\swagger --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dart-petstore.bat b/bin/windows/dart-petstore.bat index d35039c148f..155911529f6 100755 --- a/bin/windows/dart-petstore.bat +++ b/bin/windows/dart-petstore.bat @@ -5,11 +5,11 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger -DhideGenerationTimestamp=true -DbrowserClient=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\flutter_petstore\swagger -DhideGenerationTimestamp=true -DbrowserClient=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\flutter_petstore\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/go-gin-petstore-server.bat b/bin/windows/go-gin-petstore-server.bat index 05b75b17e2e..f46a0482b22 100644 --- a/bin/windows/go-gin-petstore-server.bat +++ b/bin/windows/go-gin-petstore-server.bat @@ -14,7 +14,7 @@ echo Removing files and folders under %STUB_DIR% del /F /S /Q %STUB_DIR% REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstoreserver -Dservice +set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/go-petstore-server.bat b/bin/windows/go-petstore-server.bat index bfa21fa0fcd..c4eb17284ae 100644 --- a/bin/windows/go-petstore-server.bat +++ b/bin/windows/go-petstore-server.bat @@ -14,7 +14,7 @@ echo Removing files and folders under %STUB_DIR% del /F /S /Q %STUB_DIR% REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstoreserver -Dservice +set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/go-petstore-withxml.bat b/bin/windows/go-petstore-withxml.bat index 514a214041c..e24f3798f8f 100644 --- a/bin/windows/go-petstore-withxml.bat +++ b/bin/windows/go-petstore-withxml.bat @@ -14,7 +14,7 @@ echo Removing files and folders under %STUB_DIR% del /F /S /Q %STUB_DIR% REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstore,withXml=true +set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstore,withXml=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/go-petstore.bat b/bin/windows/go-petstore.bat index c023f088d9b..8f00f7070a1 100755 --- a/bin/windows/go-petstore.bat +++ b/bin/windows/go-petstore.bat @@ -14,7 +14,7 @@ echo Removing files and folders under %STUB_DIR% del /F /S /Q %STUB_DIR% REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstore +set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstore java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-feign-10x.bat b/bin/windows/java-petstore-feign-10x.bat index af2f71f8729..d9163fdac99 100644 --- a/bin/windows/java-petstore-feign-10x.bat +++ b/bin/windows/java-petstore-feign-10x.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-10x.json -o samples\client\petstore\java\feign10x -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-10x.json -o samples\client\petstore\java\feign10x --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-feign.bat b/bin/windows/java-petstore-feign.bat index 41c817d33b6..e68e2d818f7 100644 --- a/bin/windows/java-petstore-feign.bat +++ b/bin/windows/java-petstore-feign.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-google-api-client.bat b/bin/windows/java-petstore-google-api-client.bat index 2b68ebd5814..c9d2d761b66 100644 --- a/bin/windows/java-petstore-google-api-client.bat +++ b/bin/windows/java-petstore-google-api-client.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\google-api-client -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-google-api-client.json -o samples\client\petstore\java\google-api-client -DhideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\google-api-client -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-google-api-client.json -o samples\client\petstore\java\google-api-client --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-jersey1.bat b/bin/windows/java-petstore-jersey1.bat index c1908e329a5..a65093cce34 100644 --- a/bin/windows/java-petstore-jersey1.bat +++ b/bin/windows/java-petstore-jersey1.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-java-client-jersey1 -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples\client\petstore\java\jersey1 -DhideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true +set ags=generate --artifact-id petstore-java-client-jersey1 -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples\client\petstore\java\jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-jersey2-java6.bat b/bin/windows/java-petstore-jersey2-java6.bat index 9de22c9890c..e41cf396469 100644 --- a/bin/windows/java-petstore-jersey2-java6.bat +++ b/bin/windows/java-petstore-jersey2-java6.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-jersey2-java6 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is +set ags=generate --artifact-id petstore-jersey2-java6 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2-java6 --additional-properties hideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-jersey2.bat b/bin/windows/java-petstore-jersey2.bat index 8525d7b11fc..f0f5ea9e2d5 100644 --- a/bin/windows/java-petstore-jersey2.bat +++ b/bin/windows/java-petstore-jersey2.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2 -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2 --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-okhttp-gson-parcelable.bat b/bin/windows/java-petstore-okhttp-gson-parcelable.bat index 1a550431490..402a3cda7f9 100644 --- a/bin/windows/java-petstore-okhttp-gson-parcelable.bat +++ b/bin/windows/java-petstore-okhttp-gson-parcelable.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules\openapi-generator\src\main\resources\Java\libraries\okhttp-gson -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true +set ags=generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules\openapi-generator\src\main\resources\Java\libraries\okhttp-gson -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson-parcelableModel --additional-properties hideGenerationTimestamp=true,parcelableModel=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-okhttp-gson.bat b/bin/windows/java-petstore-okhttp-gson.bat index 031d5ec813e..80581ca14d4 100755 --- a/bin/windows/java-petstore-okhttp-gson.bat +++ b/bin/windows/java-petstore-okhttp-gson.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\okhttp-gson -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson -DhideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\okhttp-gson -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-rest-assured.bat b/bin/windows/java-petstore-rest-assured.bat index b74f99b853e..d7c05416262 100644 --- a/bin/windows/java-petstore-rest-assured.bat +++ b/bin/windows/java-petstore-rest-assured.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\rest-assured -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-rest-assured.json -o samples\client\petstore\java\rest-assured -DhideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\rest-assured -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-rest-assured.json -o samples\client\petstore\java\rest-assured --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-resteasy.bat b/bin/windows/java-petstore-resttemplate-resteasy.bat index 8ccda43717b..9cf81f4e109 100644 --- a/bin/windows/java-petstore-resttemplate-resteasy.bat +++ b/bin/windows/java-petstore-resttemplate-resteasy.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resteasy.json -o samples\client\petstore\java\resteasy -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resteasy.json -o samples\client\petstore\java\resteasy --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-webclient.bat b/bin/windows/java-petstore-resttemplate-webclient.bat index 68ef1493f62..3330fc590ab 100644 --- a/bin/windows/java-petstore-resttemplate-webclient.bat +++ b/bin/windows/java-petstore-resttemplate-webclient.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-webclient.json -o samples\client\petstore\java\webclient -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-webclient.json -o samples\client\petstore\java\webclient --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-withxml.bat b/bin/windows/java-petstore-resttemplate-withxml.bat index c99182b1fff..ee67b4cd43f 100644 --- a/bin/windows/java-petstore-resttemplate-withxml.bat +++ b/bin/windows/java-petstore-resttemplate-withxml.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-resttemplate-withxml -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true +set ags=generate --artifact-id petstore-resttemplate-withxml -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate-withXml --additional-properties hideGenerationTimestamp=true,withXml=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate.bat b/bin/windows/java-petstore-resttemplate.bat index 76d1f7a2195..50de951c129 100644 --- a/bin/windows/java-petstore-resttemplate.bat +++ b/bin/windows/java-petstore-resttemplate.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit.bat b/bin/windows/java-petstore-retrofit.bat index 46b435a43f8..970393a34e6 100644 --- a/bin/windows/java-petstore-retrofit.bat +++ b/bin/windows/java-petstore-retrofit.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit.json -o samples\client\petstore\java\retrofit -DhideGenerationTimestamp=true,dateLibrary=joda +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit.json -o samples\client\petstore\java\retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-play24.bat b/bin/windows/java-petstore-retrofit2-play24.bat index 3ebf62f5af5..bfb57e1bb6f 100644 --- a/bin/windows/java-petstore-retrofit2-play24.bat +++ b/bin/windows/java-petstore-retrofit2-play24.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-java-client-retrofit2-play24 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play24.json -o samples\client\petstore\java\retrofit2-play24 -DhideGenerationTimestamp=true +set ags=generate --artifact-id petstore-java-client-retrofit2-play24 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play24.json -o samples\client\petstore\java\retrofit2-play24 --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-play25.bat b/bin/windows/java-petstore-retrofit2-play25.bat index cd785cf3ae1..d76bb00e1ea 100644 --- a/bin/windows/java-petstore-retrofit2-play25.bat +++ b/bin/windows/java-petstore-retrofit2-play25.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-java-client-retrofit2-play25 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play25.json -o samples\client\petstore\java\retrofit2-play25 -DhideGenerationTimestamp=true +set ags=generate --artifact-id petstore-java-client-retrofit2-play25 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play25.json -o samples\client\petstore\java\retrofit2-play25 --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-play26.bat b/bin/windows/java-petstore-retrofit2-play26.bat index aa51f1bdf17..2e740ac67d7 100644 --- a/bin/windows/java-petstore-retrofit2-play26.bat +++ b/bin/windows/java-petstore-retrofit2-play26.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate --artifact-id petstore-java-client-retrofit2-play26 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play26.json -o samples\client\petstore\java\retrofit2-play26 -DhideGenerationTimestamp=true +set ags=generate --artifact-id petstore-java-client-retrofit2-play26 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play26.json -o samples\client\petstore\java\retrofit2-play26 --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2.bat b/bin/windows/java-petstore-retrofit2.bat index 8a34d37af96..e0d57dfdaa2 100644 --- a/bin/windows/java-petstore-retrofit2.bat +++ b/bin/windows/java-petstore-retrofit2.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2.json -o samples\client\petstore\java\retrofit2 -DhideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2.json -o samples\client\petstore\java\retrofit2 --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2rx.bat b/bin/windows/java-petstore-retrofit2rx.bat index 1ab4b7c25fb..e3801c9b7cd 100644 --- a/bin/windows/java-petstore-retrofit2rx.bat +++ b/bin/windows/java-petstore-retrofit2rx.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx.json -o samples\client\petstore\java\retrofit2rx -DuseRxJava=true,hideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx.json -o samples\client\petstore\java\retrofit2rx --additional-properties useRxJava=true,hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2rx2.bat b/bin/windows/java-petstore-retrofit2rx2.bat index 3640765a1b1..29899b36960 100644 --- a/bin/windows/java-petstore-retrofit2rx2.bat +++ b/bin/windows/java-petstore-retrofit2rx2.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx2.json -o samples\client\petstore\java\retrofit2rx2 -DuseRxJava2=true,hideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx2.json -o samples\client\petstore\java\retrofit2rx2 --additional-properties useRxJava2=true,hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-vertx.bat b/bin/windows/java-petstore-vertx.bat index 06e7253fca5..151d1ac1fb3 100644 --- a/bin/windows/java-petstore-vertx.bat +++ b/bin/windows/java-petstore-vertx.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\vertx -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-vertx.json -o samples\client\petstore\java\vertx -DhideGenerationTimestamp=true +set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\vertx -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-vertx.json -o samples\client\petstore\java\vertx --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-pkmst-petstore-server.bat b/bin/windows/java-pkmst-petstore-server.bat index 59323fbfcdd..ace44650ed4 100644 --- a/bin/windows/java-pkmst-petstore-server.bat +++ b/bin/windows/java-pkmst-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-pkmst -o samples\server\petstore\java-pkmst -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-pkmst -o samples\server\petstore\java-pkmst --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-play-framework-petstore-server.bat b/bin/windows/java-play-framework-petstore-server.bat index 29495385662..887fdd25709 100644 --- a/bin/windows/java-play-framework-petstore-server.bat +++ b/bin/windows/java-play-framework-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-play-framework -o samples\server\petstore\java-play-framework -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-play-framework -o samples\server\petstore\java-play-framework --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-vertx-async-petstore-server.bat b/bin/windows/java-vertx-async-petstore-server.bat index 90ef1dfc56b..5200b705a5d 100644 --- a/bin/windows/java-vertx-async-petstore-server.bat +++ b/bin/windows/java-vertx-async-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\async -DvertxSwaggerRouterVersion=1.2.0 -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\async --additional-properties vertxSwaggerRouterVersion=1.2.0,hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-vertx-rx-petstore-server.bat b/bin/windows/java-vertx-rx-petstore-server.bat index 9bfa068c557..b107bd837e3 100644 --- a/bin/windows/java-vertx-rx-petstore-server.bat +++ b/bin/windows/java-vertx-rx-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\rx -DvertxSwaggerRouterVersion=1.2.0 -DrxInterface=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\rx --additional-properties vertxSwaggerRouterVersion=1.2.0,rxInterface=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/javascript-es6-petstore.bat b/bin/windows/javascript-es6-petstore.bat index 4348e7add21..6ae6e93550c 100644 --- a/bin/windows/javascript-es6-petstore.bat +++ b/bin/windows/javascript-es6-petstore.bat @@ -7,4 +7,4 @@ If Not Exist %executable% ( REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-es6 --additional-properties useES6=true -java -DappName=PetstoreClient %JAVA_OPTS% -jar %executable% %ags% +java %JAVA_OPTS% -jar %executable% %ags% --additional-properties appName=PetstoreClient diff --git a/bin/windows/javascript-petstore.bat b/bin/windows/javascript-petstore.bat index 400e61b6e6c..04abbd1837d 100755 --- a/bin/windows/javascript-petstore.bat +++ b/bin/windows/javascript-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript -DappName=PetstoreClient --additional-properties useES6=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript --additional-properties appName=PetstoreClient,useES6=false java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/javascript-promise-es6-petstore.bat b/bin/windows/javascript-promise-es6-petstore.bat index bf952759aef..41959932277 100644 --- a/bin/windows/javascript-promise-es6-petstore.bat +++ b/bin/windows/javascript-promise-es6-petstore.bat @@ -7,4 +7,4 @@ If Not Exist %executable% ( REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-promise-es6 --additional-properties useES6=true,usePromises=true -java -DappName=PetstoreClient %JAVA_OPTS% -jar %executable% %ags% +java %JAVA_OPTS% -jar %executable% %ags% --additional-properties appName=PetstoreClient diff --git a/bin/windows/javascript-promise-petstore.bat b/bin/windows/javascript-promise-petstore.bat index a695b0a70e1..57756146e65 100755 --- a/bin/windows/javascript-promise-petstore.bat +++ b/bin/windows/javascript-promise-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-promise --additional-properties usePromises=true,useES6=false -DappName=PetstoreClient +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-promise --additional-properties usePromises=true,useES6=false,appName=PetstoreClient java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-cdi-petstore-server.bat b/bin/windows/jaxrs-cxf-cdi-petstore-server.bat index 54e5b6768f7..48aadc36fec 100644 --- a/bin/windows/jaxrs-cxf-cdi-petstore-server.bat +++ b/bin/windows/jaxrs-cxf-cdi-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf\log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-cdi -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-cdi -o samples\server\petstore\jaxrs-cxf-cdi -DhideGenerationTimestamp=true %* +set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-cdi -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-cdi -o samples\server\petstore\jaxrs-cxf-cdi --additional-properties hideGenerationTimestamp=true %* java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat b/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat index 92fea43aaa8..6df7234a239 100644 --- a/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat +++ b/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-annotated-basepath -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 %* +set ags=generate --artifact-id cxf-annotated-basepath -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-annotated-base-path --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true,serverPort=8082 %* java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat b/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat index 9df7780484f..b239011963b 100644 --- a/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat +++ b/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-server-non-spring -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 %* +set ags=generate --artifact-id cxf-server-non-spring -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-non-spring-app --additional-properties hideGenerationTimestamp=true,generateNonSpringApplication=true,serverPort=8082 %* java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-test-data.bat b/bin/windows/jaxrs-cxf-petstore-server-test-data.bat index 47c249ce0cf..ac42b6c0474 100644 --- a/bin/windows/jaxrs-cxf-petstore-server-test-data.bat +++ b/bin/windows/jaxrs-cxf-petstore-server-test-data.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-test-data -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-ext -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples\server\petstore\jaxrs-cxf-test-data -DhideGenerationTimestamp=true -DuseAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true %* +set ags=generate --artifact-id cxf-test-data -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-ext -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples\server\petstore\jaxrs-cxf-test-data --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true %* java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server.bat b/bin/windows/jaxrs-cxf-petstore-server.bat index d64116025f9..82880f59590 100644 --- a/bin/windows/jaxrs-cxf-petstore-server.bat +++ b/bin/windows/jaxrs-cxf-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf -DhideGenerationTimestamp=true %* +set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf --additional-properties hideGenerationTimestamp=true %* java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-spec-petstore-server-interface.bat b/bin/windows/jaxrs-spec-petstore-server-interface.bat index 84307a12dfa..41c29d41cc4 100644 --- a/bin/windows/jaxrs-spec-petstore-server-interface.bat +++ b/bin/windows/jaxrs-spec-petstore-server-interface.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec-interface -DhideGenerationTimestamp=true,serializableModel=true,interfaceOnly=true +set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec-interface --additional-properties hideGenerationTimestamp=true,serializableModel=true,interfaceOnly=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-spec-petstore-server.bat b/bin/windows/jaxrs-spec-petstore-server.bat index 7172d579e34..eeb11da17fa 100644 --- a/bin/windows/jaxrs-spec-petstore-server.bat +++ b/bin/windows/jaxrs-spec-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec -DhideGenerationTimestamp=true,serializableModel=true +set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec --additional-properties hideGenerationTimestamp=true,serializableModel=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/objc-petstore.bat b/bin/windows/objc-petstore.bat index d75eeb2b7b0..d5264e33c37 100755 --- a/bin/windows/objc-petstore.bat +++ b/bin/windows/objc-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g objc -o samples\client\petstore\objc\default -DappName=PetstoreClient +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g objc -o samples\client\petstore\objc\default --additional-properties appName=PetstoreClient java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python-petstore.bat b/bin/windows/python-petstore.bat index 9c5ea9c7512..c09fd3a44b0 100755 --- a/bin/windows/python-petstore.bat +++ b/bin/windows/python-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples\client\petstore\python -DpackageName=petstore_api +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples\client\petstore\python --additional-properties packageName=petstore_api java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python2-flask-petstore.bat b/bin/windows/python2-flask-petstore.bat index cc77dfcd5fc..54189a7d193 100755 --- a/bin/windows/python2-flask-petstore.bat +++ b/bin/windows/python2-flask-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g python-flask -o samples\server\petstore\python-flask-python2 -c bin\supportPython2.json -D service +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g python-flask -o samples\server\petstore\python-flask-python2 -c bin\supportPython2.json java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python3-flask-petstore.bat b/bin/windows/python3-flask-petstore.bat index c1677662bd0..56205cf151a 100755 --- a/bin/windows/python3-flask-petstore.bat +++ b/bin/windows/python3-flask-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g python-flask -o samples\server\petstore\python-flask -D service +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g python-flask -o samples\server\petstore\python-flask java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/spring-mvc-petstore-j8-async-server.bat b/bin/windows/spring-mvc-petstore-j8-async-server.bat index a9a2cc4797d..e87ba8ed7de 100644 --- a/bin/windows/spring-mvc-petstore-j8-async-server.bat +++ b/bin/windows/spring-mvc-petstore-j8-async-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g spring --library=spring-mvc -o samples\server\petstore\spring-mvc-j8-async -c bin\spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g spring --library=spring-mvc -o samples\server\petstore\spring-mvc-j8-async -c bin\spring-mvc-petstore-j8-async.json --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/spring-mvc-petstore-server.bat b/bin/windows/spring-mvc-petstore-server.bat index 202de357718..02783f339cf 100644 --- a/bin/windows/spring-mvc-petstore-server.bat +++ b/bin/windows/spring-mvc-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -c bin\spring-mvc-petstore-server.json -g spring --library=spring-mvc -o samples\server\petstore\spring-mvc -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -c bin\spring-mvc-petstore-server.json -g spring --library=spring-mvc -o samples\server\petstore\spring-mvc --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/springboot-petstore-server.bat b/bin/windows/springboot-petstore-server.bat index 9790ce15b39..af0e4c2ba10 100644 --- a/bin/windows/springboot-petstore-server.bat +++ b/bin/windows/springboot-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples\server\petstore\springboot -DhideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples\server\petstore\springboot --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v2-interfaces.bat b/bin/windows/typescript-angular-v2-interfaces.bat index 443d8eb53cd..881810e729f 100644 --- a/bin/windows/typescript-angular-v2-interfaces.bat +++ b/bin/windows/typescript-angular-v2-interfaces.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces --additional-properties withInterfaces=true --additional-properties ngVersion=2 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat index 5d7ace44e2c..4e3e38dff45 100644 --- a/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat +++ b/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\with-npm -D providedInRoot=false --additional-properties ngVersion=6.0.0 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\with-npm --additional-properties providedInRoot=false --additional-properties ngVersion=6.0.0 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v6-not-provided-in-root.bat b/bin/windows/typescript-angular-v6-not-provided-in-root.bat index 3cddf6e1926..d5550355dff 100644 --- a/bin/windows/typescript-angular-v6-not-provided-in-root.bat +++ b/bin/windows/typescript-angular-v6-not-provided-in-root.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\default -D providedInRoot=false --additional-properties ngVersion=6.0.0 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\default --additional-properties providedInRoot=false --additional-properties ngVersion=6.0.0 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat index b95ce1fbdb7..5a133e10265 100644 --- a/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat +++ b/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\with-npm -D providedInRoot=false --additional-properties ngVersion=7.0.0 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\with-npm --additional-properties providedInRoot=false --additional-properties ngVersion=7.0.0 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-not-provided-in-root.bat b/bin/windows/typescript-angular-v7-not-provided-in-root.bat index 3522fae151e..b9a18244d0f 100644 --- a/bin/windows/typescript-angular-v7-not-provided-in-root.bat +++ b/bin/windows/typescript-angular-v7-not-provided-in-root.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\default -D providedInRoot=false --additional-properties ngVersion=7.0.0 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\default --additional-properties ngVersion=7.0.0 --additional-properties providedInRoot=false java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-interfaces.bat b/bin/windows/typescript-axios-petstore-interfaces.bat index b92c34a9f8b..2c34eba5c7a 100644 --- a/bin/windows/typescript-axios-petstore-interfaces.bat +++ b/bin/windows/typescript-axios-petstore-interfaces.bat @@ -7,6 +7,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-interfaces -D withInterfaces=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-interfaces --additional-properties withInterfaces=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-interfaces.bat b/bin/windows/typescript-fetch-petstore-interfaces.bat index e41be611298..e25d23badb7 100644 --- a/bin/windows/typescript-fetch-petstore-interfaces.bat +++ b/bin/windows/typescript-fetch-petstore-interfaces.bat @@ -7,6 +7,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -o samples\client\petstore\typescript-fetch\builds\with-interfaces -D withInterfaces=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -o samples\client\petstore\typescript-fetch\builds\with-interfaces --additional-properties withInterfaces=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-rxjs-petstore-interfaces.bat b/bin/windows/typescript-rxjs-petstore-interfaces.bat index 401ccb7b376..b2232e82cd3 100644 --- a/bin/windows/typescript-rxjs-petstore-interfaces.bat +++ b/bin/windows/typescript-rxjs-petstore-interfaces.bat @@ -7,6 +7,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -o samples\client\petstore\typescript-rxjs\builds\with-interfaces -D withInterfaces=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -o samples\client\petstore\typescript-rxjs\builds\with-interfaces --additional-properties withInterfaces=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java index 62924e2b6ab..00a7f533486 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java @@ -140,7 +140,7 @@ public class Generate implements Runnable { private List typeMappings = new ArrayList<>(); @Option( - name = {"--additional-properties"}, + name = {"-p", "--additional-properties"}, title = "additional properties", description = "sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value." + " You can also have multiple occurrences of this option.") @@ -383,7 +383,10 @@ public class Generate implements Runnable { configurator.setStrictSpecBehavior(strictSpecBehavior); } - applySystemPropertiesKvpList(systemProperties, configurator); + if (systemProperties != null && !systemProperties.isEmpty()) { + System.err.println("[DEPRECATED] -D arguments after 'generate' are application arguments and not Java System Properties, please consider changing to -p, or apply your options to JAVA_OPTS, or move the -D arguments before the jar option."); + applySystemPropertiesKvpList(systemProperties, configurator); + } applyInstantiationTypesKvpList(instantiationTypes, configurator); applyImportMappingsKvpList(importMappings, configurator); applyTypeMappingsKvpList(typeMappings, configurator); diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java index d8812b5c8d1..a2304283d68 100644 --- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java @@ -64,9 +64,11 @@ public class GenerateTest { @Test public void testRequiredArgs_ShortArgs() throws Exception { - setupAndRunTest("-i", "src/test/resources/swagger.yaml", "-g", "java", "-o", "src/main/java", false, null); + setupAndRunTest("-i", "src/test/resources/swagger.yaml", "-g", "java", "-o", "src/main/java", false, null, "-p", "foo=bar"); new FullVerifications() { { + configurator.addAdditionalProperty("foo", "bar"); + times = 1; } }; } @@ -138,85 +140,6 @@ public class GenerateTest { }; } - @Test - public void testSystemProperties() throws Exception { - - setupAndRunGenericTest("-D", "hello=world,foo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - } - }; - - setupAndRunGenericTest("-Dhello=world,foo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - } - }; - - setupAndRunGenericTest("-D", "hello=world,key=,foo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - configurator.addSystemProperty("key", ""); - times = 1; - } - }; - - setupAndRunGenericTest("-D", "hello=world,key,foo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - configurator.addSystemProperty("key", ""); - times = 1; - } - }; - - setupAndRunGenericTest("-D", "hello=world", "-D", "key", "-D", "foo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - configurator.addSystemProperty("key", ""); - times = 1; - } - }; - - setupAndRunGenericTest("-Dhello=world", "-Dkey", "-Dfoo=bar"); - - new FullVerifications() { - { - configurator.addSystemProperty("hello", "world"); - times = 1; - configurator.addSystemProperty("foo", "bar"); - times = 1; - configurator.addSystemProperty("key", ""); - times = 1; - } - }; - } - - @Test public void testConfigJson() throws Exception { diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index e63b7dac541..0c9c469df45 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -13,4 +13,22 @@ openapi-generator-core openapi-generator-core https://github.com/openapitools/openapi-generator + + + + com.google.guava + guava + ${guava-version} + + + org.slf4j + slf4j-api + ${slf4j-version} + + + + + 1.7.12 + 26.0-jre + diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java new file mode 100644 index 00000000000..6bd2588ae19 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java @@ -0,0 +1,68 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.config; + +/** + * The Context used for generation. + * + * @param the type of the input spec document. + */ +public class Context { + private TSpecDocument specDocument; + private GeneratorSettings generatorSettings; + private WorkflowSettings workflowSettings; + + /** + * Instantiates a new Context. + * + * @param specDocument the spec document + * @param generatorSettings the generator settings + * @param workflowSettings the workflow settings + */ + public Context(TSpecDocument specDocument, GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { + this.specDocument = specDocument; + this.generatorSettings = generatorSettings; + this.workflowSettings = workflowSettings; + } + + /** + * Gets the generator settings. These options are specific to "what" gets generated (language, framework). + * + * @return the generator settings + */ + public GeneratorSettings getGeneratorSettings() { + return generatorSettings; + } + + /** + * Gets the spec document. + * + * @return the spec document + */ + public TSpecDocument getSpecDocument() { + return specDocument; + } + + /** + * Gets the workflow settings. These options are specific to "how" code gets generated (input, output directory, ignore files, template engine, etc). + * + * @return the workflow settings + */ + public WorkflowSettings getWorkflowSettings() { + return workflowSettings; + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java new file mode 100644 index 00000000000..565539c7ca3 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java @@ -0,0 +1,872 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.config; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.Serializable; +import java.util.*; + +/** + * Represents those settings applied to a generator. + */ +public final class GeneratorSettings implements Serializable { + + private static final Logger LOGGER = LoggerFactory.getLogger(GeneratorSettings.class); + private static String DEFAULT_GIT_USER_ID = "GIT_USER_ID"; + private static String DEFAULT_GIT_REPO_ID = "GIT_REPO_ID"; + private static String DEFAULT_RELEASE_NOTE = "Minor update"; + + private String generatorName; + private String apiPackage; + private String modelPackage; + private String invokerPackage; + private String packageName; + private String modelNamePrefix; + private String modelNameSuffix; + private String groupId; + private String artifactId; + private String artifactVersion; + private String library; + + private ImmutableMap instantiationTypes; + private ImmutableMap typeMappings; + private ImmutableMap additionalProperties; + private ImmutableMap importMappings; + private ImmutableSet languageSpecificPrimitives; + private ImmutableMap reservedWordMappings; + + private String gitUserId; + private String gitRepoId; + private String releaseNote; + private String httpUserAgent; + + /** + * Gets the name of the generator to use. + * + * @return the generator name + */ + public String getGeneratorName() { + return generatorName; + } + + /** + * Gets the api package name for generated sources. + * + * @return the api package + */ + public String getApiPackage() { + return apiPackage; + } + + /** + * Gets the model package name for generated sources + * + * @return the model package + */ + public String getModelPackage() { + return modelPackage; + } + + /** + * Gets the invoker package name for generated sources. + * + * @return the invoker package + */ + public String getInvokerPackage() { + return invokerPackage; + } + + /** + * Gets the overall package name for generated sources. + * + * @return the package name + */ + public String getPackageName() { + return packageName; + } + + /** + * Gets a model name prefix for generated models. This name will be prefixed to a model name. + *

+ * This option is often used to circumvent compilation issues where models match keywords. + *

+ * Example: + *

+ * Prefix My applied to Object results in a generated class named MyObject. + * + * @return the model name prefix + */ + public String getModelNamePrefix() { + return modelNamePrefix; + } + + /** + * Gets a model name suffix for generated models. This name will be appended to a model name. + *

+ * This option is often used to circumvent compilation issues where models match keywords. + *

+ * Example: + *

+ * Suffix Gen applied to Object results in a generated class named ObjectGen. + * + * @return the model name suffix + */ + public String getModelNameSuffix() { + return modelNameSuffix; + } + + /** + * Gets the group id for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom). + * + * @return the group id + */ + public String getGroupId() { + return groupId; + } + + /** + * Gets artifact id for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom). + * + * @return the artifact id + */ + public String getArtifactId() { + return artifactId; + } + + /** + * Gets artifact version for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom). + * + * @return the artifact version + */ + public String getArtifactVersion() { + return artifactVersion; + } + + /** + * Gets library (sub-template) for the target generated. + * + * @return the library + */ + public String getLibrary() { + return library; + } + + + /** + * Gets instantiation types mappings. These allow for customizing the defaults provided by a built-in generator. + *

+ * For example, "array" to "ArrayList" applied to the Java generator will cause all array properties to be instantiated as ArrayList. + *

+ * This option differs from {@link GeneratorSettings#getTypeMappings()} in that values provided here are generally used for type construction (what is applied to "new"). + * + * @return the instantiation types + */ + public Map getInstantiationTypes() { + return instantiationTypes; + } + + /** + * Gets type mappings. These allow for customizing type definitions. + *

+ * For example, "array" to "List" applied to the Java generator will cause all variable assignments for array properties to be of type List. + *

+ * This option differs from {@link GeneratorSettings#getInstantiationTypes()} in that values provided here are variable reference types rather than concrete instantiation types. + * + * @return the type mappings + */ + public Map getTypeMappings() { + return typeMappings; + } + + /** + * Gets additional properties which will be passed to template as dynamic properties. + * + * @return the additional properties + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Gets import mappings between a given class and the import that should be used for that class. + *

+ * Use import mappings, for example, when you want to "bring your own models" from another location. + * + * @return the import mappings + * @see Bringing your own models + */ + public Map getImportMappings() { + return importMappings; + } + + /** + * Gets language specific primitives. These are in addition to the "base" primitives defined in a generator. + *

+ * In general, a primitive defined here will indicate to the generator: + *

+ * - models with these types don't require an import + * - model names not included here require imports and likely indicate a model reference + *

+ * There may be generator-specific implementation details which differ slightly. + * + * @return the language specific primitives + */ + public Set getLanguageSpecificPrimitives() { + return languageSpecificPrimitives; + } + + /** + * Gets reserved word mappings. Values defined here define how a reserved word should be escaped. + *

+ * If no mapping is present, the mapping is generally automatically applied to a default with prefixed underscore (_name). Note that + * some languages don't support identifiers beginning with a prefix, in which case the generator applies a more appropriate prefix. + * + * @return the reserved word mappings + */ + public Map getReservedWordMappings() { + return reservedWordMappings; + } + + /** + * Gets git user id. e.g. openapitools. + *

+ * Generally used by git_push.sh in generated sources which support it. + * This value may also be used by templates in maven style references, READMEs, or other documentation. + * + * @return the git user id + */ + public String getGitUserId() { + return gitUserId; + } + + /** + * Gets git repo id. e.g. openapi-generator. + *

+ * Generally used by git_push.sh in generated sources which support it. + * This value may also be used by templates in maven style references, READMEs, or other documentation. + * + * @return the git repo id + */ + public String getGitRepoId() { + return gitRepoId; + } + + /** + * Gets release note for the generated instance. + *

+ * Generally used by git_push.sh in generated sources which support it. + * This value may also be used by templates in maven style references, READMEs, or other documentation. + * + * @return the release note + */ + public String getReleaseNote() { + return releaseNote; + } + + /** + * Gets the http user agent to be used by client generators which support setting this value. + *

+ * e.g. codegen_csharp_api_client, defaults to 'OpenAPI-Generator/{packageVersion}}/{language}' + * + * @return the http user agent + */ + public String getHttpUserAgent() { + return httpUserAgent; + } + + private GeneratorSettings(Builder builder) { + setDefaults(); + + generatorName = builder.generatorName; + apiPackage = builder.apiPackage; + modelPackage = builder.modelPackage; + invokerPackage = builder.invokerPackage; + packageName = builder.packageName; + modelNamePrefix = builder.modelNamePrefix; + modelNameSuffix = builder.modelNameSuffix; + groupId = builder.groupId; + artifactId = builder.artifactId; + artifactVersion = builder.artifactVersion; + library = builder.library; + instantiationTypes = ImmutableMap.copyOf(builder.instantiationTypes); + typeMappings = ImmutableMap.copyOf(builder.typeMappings); + importMappings = ImmutableMap.copyOf(builder.importMappings); + languageSpecificPrimitives = ImmutableSet.copyOf(builder.languageSpecificPrimitives); + reservedWordMappings = ImmutableMap.copyOf(builder.reservedWordMappings); + gitUserId = builder.gitUserId; + gitRepoId = builder.gitRepoId; + releaseNote = builder.releaseNote; + httpUserAgent = builder.httpUserAgent; + + Map additional = new HashMap<>(builder.additionalProperties); + + if (isNotEmpty(apiPackage)) { + additional.put("apiPackage", apiPackage); + } + if (isNotEmpty(modelPackage)) { + additional.put("modelPackage", modelPackage); + } + if (isNotEmpty(invokerPackage)) { + additional.put("invokerPackage", invokerPackage); + } + if (isNotEmpty(packageName)) { + additional.put("packageName", packageName); + } + if (isNotEmpty(groupId)) { + additional.put("groupId", groupId); + } + if (isNotEmpty(artifactId)) { + additional.put("artifactId", artifactId); + } + if (isNotEmpty(artifactVersion)) { + additional.put("artifactVersion", artifactVersion); + } + if (isNotEmpty(modelNamePrefix)) { + additional.put("modelNamePrefix", modelNamePrefix); + } + if (isNotEmpty(modelNameSuffix)) { + additional.put("modelNameSuffix", modelNameSuffix); + } + if (isNotEmpty(gitUserId)) { + additional.put("gitUserId", gitUserId); + } + if (isNotEmpty(gitRepoId)) { + additional.put("gitRepoId", gitRepoId); + } + if (isNotEmpty(releaseNote)) { + additional.put("releaseNote", releaseNote); + } + if (isNotEmpty(httpUserAgent)) { + additional.put("httpUserAgent", httpUserAgent); + } + + additionalProperties = ImmutableMap.copyOf(additional); + } + + /** + * Instantiates a new Generator settings. + */ + @SuppressWarnings("unused") + public GeneratorSettings() { + setDefaults(); + instantiationTypes = ImmutableMap.of(); + typeMappings = ImmutableMap.of(); + additionalProperties = ImmutableMap.of(); + importMappings = ImmutableMap.of(); + languageSpecificPrimitives = ImmutableSet.of(); + reservedWordMappings = ImmutableMap.of(); + } + + private void setDefaults() { + gitUserId = DEFAULT_GIT_USER_ID; + gitRepoId = DEFAULT_GIT_REPO_ID; + releaseNote = DEFAULT_RELEASE_NOTE; + } + + private boolean isNotEmpty(String value) { + return value != null && value.length() > 0; + } + + /** + * New builder builder. + * + * @return the builder + */ + public static Builder newBuilder() { + return new Builder(); + } + + /** + * New builder builder. + * + * @param copy the copy + * @return the builder + */ + public static Builder newBuilder(GeneratorSettings copy) { + Builder builder = new Builder(); + builder.generatorName = copy.getGeneratorName(); + builder.apiPackage = copy.getApiPackage(); + builder.modelPackage = copy.getModelPackage(); + builder.invokerPackage = copy.getInvokerPackage(); + builder.packageName = copy.getPackageName(); + builder.modelNamePrefix = copy.getModelNamePrefix(); + builder.modelNameSuffix = copy.getModelNameSuffix(); + builder.groupId = copy.getGroupId(); + builder.artifactId = copy.getArtifactId(); + builder.artifactVersion = copy.getArtifactVersion(); + builder.library = copy.getLibrary(); + builder.instantiationTypes = new HashMap<>(copy.getInstantiationTypes()); + builder.typeMappings = new HashMap<>(copy.getTypeMappings()); + builder.additionalProperties = new HashMap<>(copy.getAdditionalProperties()); + builder.importMappings = new HashMap<>(copy.getImportMappings()); + builder.languageSpecificPrimitives = new HashSet<>(copy.getLanguageSpecificPrimitives()); + builder.reservedWordMappings = new HashMap<>(copy.getReservedWordMappings()); + builder.gitUserId = copy.getGitUserId(); + builder.gitRepoId = copy.getGitRepoId(); + builder.releaseNote = copy.getReleaseNote(); + builder.httpUserAgent = copy.getHttpUserAgent(); + + return builder; + } + + /** + * {@code GeneratorSettings} builder static inner class. + */ + @SuppressWarnings("UnusedReturnValue") + public static final class Builder { + private String generatorName; + private String apiPackage; + private String modelPackage; + private String invokerPackage; + private String packageName; + private String modelNamePrefix; + private String modelNameSuffix; + private String groupId; + private String artifactId; + private String artifactVersion; + private String library; + private Map instantiationTypes; + private Map typeMappings; + private Map additionalProperties; + private Map importMappings; + private Set languageSpecificPrimitives; + private Map reservedWordMappings; + private String gitUserId; + private String gitRepoId; + private String releaseNote; + private String httpUserAgent; + + /** + * Instantiates a new Builder. + */ + public Builder() { + instantiationTypes = new HashMap<>(); + typeMappings = new HashMap<>(); + additionalProperties = new HashMap<>(); + importMappings = new HashMap<>(); + languageSpecificPrimitives = new HashSet<>(); + reservedWordMappings = new HashMap<>(); + + gitUserId = DEFAULT_GIT_USER_ID; + gitRepoId = DEFAULT_GIT_REPO_ID; + releaseNote = DEFAULT_RELEASE_NOTE; + } + + /** + * Sets the {@code generatorName} and returns a reference to this Builder so that the methods can be chained together. + * + * @param generatorName the {@code generatorName} to set + * @return a reference to this Builder + */ + public Builder withGeneratorName(String generatorName) { + this.generatorName = generatorName; + return this; + } + + /** + * Sets the {@code apiPackage} and returns a reference to this Builder so that the methods can be chained together. + * + * @param apiPackage the {@code apiPackage} to set + * @return a reference to this Builder + */ + public Builder withApiPackage(String apiPackage) { + this.apiPackage = apiPackage; + return this; + } + + /** + * Sets the {@code modelPackage} and returns a reference to this Builder so that the methods can be chained together. + * + * @param modelPackage the {@code modelPackage} to set + * @return a reference to this Builder + */ + public Builder withModelPackage(String modelPackage) { + this.modelPackage = modelPackage; + return this; + } + + /** + * Sets the {@code invokerPackage} and returns a reference to this Builder so that the methods can be chained together. + * + * @param invokerPackage the {@code invokerPackage} to set + * @return a reference to this Builder + */ + public Builder withInvokerPackage(String invokerPackage) { + this.invokerPackage = invokerPackage; + return this; + } + + /** + * Sets the {@code packageName} and returns a reference to this Builder so that the methods can be chained together. + * + * @param packageName the {@code packageName} to set + * @return a reference to this Builder + */ + public Builder withPackageName(String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Sets the {@code modelNamePrefix} and returns a reference to this Builder so that the methods can be chained together. + * + * @param modelNamePrefix the {@code modelNamePrefix} to set + * @return a reference to this Builder + */ + public Builder withModelNamePrefix(String modelNamePrefix) { + this.modelNamePrefix = modelNamePrefix; + return this; + } + + /** + * Sets the {@code modelNameSuffix} and returns a reference to this Builder so that the methods can be chained together. + * + * @param modelNameSuffix the {@code modelNameSuffix} to set + * @return a reference to this Builder + */ + public Builder withModelNameSuffix(String modelNameSuffix) { + this.modelNameSuffix = modelNameSuffix; + return this; + } + + /** + * Sets the {@code groupId} and returns a reference to this Builder so that the methods can be chained together. + * + * @param groupId the {@code groupId} to set + * @return a reference to this Builder + */ + public Builder withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Sets the {@code artifactId} and returns a reference to this Builder so that the methods can be chained together. + * + * @param artifactId the {@code artifactId} to set + * @return a reference to this Builder + */ + public Builder withArtifactId(String artifactId) { + this.artifactId = artifactId; + return this; + } + + /** + * Sets the {@code artifactVersion} and returns a reference to this Builder so that the methods can be chained together. + * + * @param artifactVersion the {@code artifactVersion} to set + * @return a reference to this Builder + */ + public Builder withArtifactVersion(String artifactVersion) { + this.artifactVersion = artifactVersion; + return this; + } + + /** + * Sets the {@code library} and returns a reference to this Builder so that the methods can be chained together. + * + * @param library the {@code library} to set + * @return a reference to this Builder + */ + public Builder withLibrary(String library) { + this.library = library; + return this; + } + + /** + * Sets the {@code instantiationTypes} and returns a reference to this Builder so that the methods can be chained together. + * + * @param instantiationTypes the {@code instantiationTypes} to set + * @return a reference to this Builder + */ + public Builder withInstantiationTypes(Map instantiationTypes) { + this.instantiationTypes = instantiationTypes; + return this; + } + + /** + * Sets a single {@code instantiationTypes} and returns a reference to this Builder so that the methods can be chained together. + * + * @param key A key for some instantiation type + * @param value The value of some instantiation type + * @return a reference to this Builder + */ + public Builder withInstantiationType(String key, String value) { + if (this.instantiationTypes == null) { + this.instantiationTypes = new HashMap<>(); + } + this.instantiationTypes.put(key, value); + return this; + } + + /** + * Sets the {@code typeMappings} and returns a reference to this Builder so that the methods can be chained together. + * + * @param typeMappings the {@code typeMappings} to set + * @return a reference to this Builder + */ + public Builder withTypeMappings(Map typeMappings) { + this.typeMappings = typeMappings; + return this; + } + + /** + * Sets the {@code additionalProperties} and returns a reference to this Builder so that the methods can be chained together. + * + * @param additionalProperties the {@code additionalProperties} to set + * @return a reference to this Builder + */ + public Builder withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Sets the {@code additionalProperties} and returns a reference to this Builder so that the methods can be chained together. + * + * @param key A key for some additional property + * @param value The value of some additional property + * @return a reference to this Builder + */ + public Builder withAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap<>(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Sets the {@code importMappings} and returns a reference to this Builder so that the methods can be chained together. + * + * @param importMappings the {@code importMappings} to set + * @return a reference to this Builder + */ + public Builder withImportMappings(Map importMappings) { + this.importMappings = importMappings; + return this; + } + + /** + * Sets a single {@code importMappings} and returns a reference to this Builder so that the methods can be chained together. + * + * @param key A key for some import mapping + * @param value The value of some import mapping + * @return a reference to this Builder + */ + public Builder withImportMapping(String key, String value) { + if (this.importMappings == null) { + this.importMappings = new HashMap<>(); + } + this.importMappings.put(key, value); + return this; + } + + /** + * Sets the {@code languageSpecificPrimitives} and returns a reference to this Builder so that the methods can be chained together. + * + * @param languageSpecificPrimitives the {@code languageSpecificPrimitives} to set + * @return a reference to this Builder + */ + public Builder withLanguageSpecificPrimitives(Set languageSpecificPrimitives) { + this.languageSpecificPrimitives = languageSpecificPrimitives; + return this; + } + + /** + * Sets a single {@code languageSpecificPrimitives} and returns a reference to this Builder so that the methods can be chained together. + * + * @param value The value of some primitive to set + * @return a reference to this Builder + */ + public Builder withLanguageSpecificPrimitive(String value) { + if (this.languageSpecificPrimitives == null) { + this.languageSpecificPrimitives = new HashSet<>(); + } + this.languageSpecificPrimitives.add(value); + return this; + } + + /** + * Sets the {@code reservedWordMappings} and returns a reference to this Builder so that the methods can be chained together. + * + * @param reservedWordMappings the {@code reservedWordMappings} to set + * @return a reference to this Builder + */ + public Builder withReservedWordMappings(Map reservedWordMappings) { + this.reservedWordMappings = reservedWordMappings; + return this; + } + + /** + * Sets a single {@code reservedWordMappings} and returns a reference to this Builder so that the methods can be chained together. + * + * @param key A key for some reserved word mapping + * @param value The value of some reserved word mapping + * @return a reference to this Builder + */ + public Builder withReservedWordMapping(String key, String value) { + if (this.reservedWordMappings == null) { + this.reservedWordMappings = new HashMap<>(); + } + this.reservedWordMappings.put(key, value); + return this; + } + + /** + * Sets the {@code gitUserId} and returns a reference to this Builder so that the methods can be chained together. + * + * @param gitUserId the {@code gitUserId} to set + * @return a reference to this Builder + */ + public Builder withGitUserId(String gitUserId) { + this.gitUserId = gitUserId; + return this; + } + + /** + * Sets the {@code gitRepoId} and returns a reference to this Builder so that the methods can be chained together. + * + * @param gitRepoId the {@code gitRepoId} to set + * @return a reference to this Builder + */ + public Builder withGitRepoId(String gitRepoId) { + this.gitRepoId = gitRepoId; + return this; + } + + /** + * Sets the {@code releaseNote} and returns a reference to this Builder so that the methods can be chained together. + * + * @param releaseNote the {@code releaseNote} to set + * @return a reference to this Builder + */ + public Builder withReleaseNote(String releaseNote) { + this.releaseNote = releaseNote; + return this; + } + + /** + * Sets the {@code httpUserAgent} and returns a reference to this Builder so that the methods can be chained together. + * + * @param httpUserAgent the {@code httpUserAgent} to set + * @return a reference to this Builder + */ + public Builder withHttpUserAgent(String httpUserAgent) { + this.httpUserAgent = httpUserAgent; + return this; + } + + /** + * Returns a {@code GeneratorSettings} built from the parameters previously set. + * + * @return a {@code GeneratorSettings} built with parameters of this {@code GeneratorSettings.Builder} + */ + public GeneratorSettings build() { + GeneratorSettings instance = new GeneratorSettings(this); + //noinspection PlaceholderCountMatchesArgumentCount + LOGGER.debug("GeneratorSettings#build: %s", instance.toString()); + return instance; + } + } + + @Override + public String toString() { + return "GeneratorSettings{" + + "generatorName='" + generatorName + '\'' + + ", apiPackage='" + apiPackage + '\'' + + ", modelPackage='" + modelPackage + '\'' + + ", invokerPackage='" + invokerPackage + '\'' + + ", packageName='" + packageName + '\'' + + ", modelNamePrefix='" + modelNamePrefix + '\'' + + ", modelNameSuffix='" + modelNameSuffix + '\'' + + ", groupId='" + groupId + '\'' + + ", artifactId='" + artifactId + '\'' + + ", artifactVersion='" + artifactVersion + '\'' + + ", library='" + library + '\'' + + ", instantiationTypes=" + instantiationTypes + + ", typeMappings=" + typeMappings + + ", additionalProperties=" + additionalProperties + + ", importMappings=" + importMappings + + ", languageSpecificPrimitives=" + languageSpecificPrimitives + + ", reservedWordMappings=" + reservedWordMappings + + ", gitUserId='" + gitUserId + '\'' + + ", gitRepoId='" + gitRepoId + '\'' + + ", releaseNote='" + releaseNote + '\'' + + ", httpUserAgent='" + httpUserAgent + '\'' + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof GeneratorSettings)) return false; + GeneratorSettings that = (GeneratorSettings) o; + return Objects.equals(getGeneratorName(), that.getGeneratorName()) && + Objects.equals(getApiPackage(), that.getApiPackage()) && + Objects.equals(getModelPackage(), that.getModelPackage()) && + Objects.equals(getInvokerPackage(), that.getInvokerPackage()) && + Objects.equals(getPackageName(), that.getPackageName()) && + Objects.equals(getModelNamePrefix(), that.getModelNamePrefix()) && + Objects.equals(getModelNameSuffix(), that.getModelNameSuffix()) && + Objects.equals(getGroupId(), that.getGroupId()) && + Objects.equals(getArtifactId(), that.getArtifactId()) && + Objects.equals(getArtifactVersion(), that.getArtifactVersion()) && + Objects.equals(getLibrary(), that.getLibrary()) && + Objects.equals(getInstantiationTypes(), that.getInstantiationTypes()) && + Objects.equals(getTypeMappings(), that.getTypeMappings()) && + Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && + Objects.equals(getImportMappings(), that.getImportMappings()) && + Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) && + Objects.equals(getReservedWordMappings(), that.getReservedWordMappings()) && + Objects.equals(getGitUserId(), that.getGitUserId()) && + Objects.equals(getGitRepoId(), that.getGitRepoId()) && + Objects.equals(getReleaseNote(), that.getReleaseNote()) && + Objects.equals(getHttpUserAgent(), that.getHttpUserAgent()); + } + + @Override + public int hashCode() { + return Objects.hash( + getGeneratorName(), + getApiPackage(), + getModelPackage(), + getInvokerPackage(), + getPackageName(), + getModelNamePrefix(), + getModelNameSuffix(), + getGroupId(), + getArtifactId(), + getArtifactVersion(), + getLibrary(), + getInstantiationTypes(), + getTypeMappings(), + getAdditionalProperties(), + getImportMappings(), + getLanguageSpecificPrimitives(), + getReservedWordMappings(), + getGitUserId(), + getGitRepoId(), + getReleaseNote(), + getHttpUserAgent() + ); + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java new file mode 100644 index 00000000000..2f506ac15ff --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -0,0 +1,534 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.config; + +import com.google.common.collect.ImmutableMap; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Represents those settings applied to a generation workflow. + */ +@SuppressWarnings("WeakerAccess") +public class WorkflowSettings { + + private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowSettings.class); + + private String inputSpec; + private String outputDir; + private boolean verbose; + private boolean skipOverwrite; + private boolean removeOperationIdPrefix; + private boolean logToStderr; + private boolean validateSpec; + private boolean enablePostProcessFile; + private boolean enableMinimalUpdate; + private boolean strictSpecBehavior; + private String templateDir; + private String templatingEngineName; + private String ignoreFileOverride; + private ImmutableMap systemProperties; + + private WorkflowSettings(Builder builder) { + setDefaults(); + inputSpec = builder.inputSpec; + outputDir = builder.outputDir; + verbose = builder.verbose; + skipOverwrite = builder.skipOverwrite; + removeOperationIdPrefix = builder.removeOperationIdPrefix; + logToStderr = builder.logToStderr; + validateSpec = builder.validateSpec; + enablePostProcessFile = builder.enablePostProcessFile; + enableMinimalUpdate = builder.enableMinimalUpdate; + strictSpecBehavior = builder.strictSpecBehavior; + templateDir = builder.templateDir; + templatingEngineName = builder.templatingEngineName; + ignoreFileOverride = builder.ignoreFileOverride; + systemProperties = ImmutableMap.copyOf(builder.systemProperties); + } + + /** + * Instantiates a new workflow settings. + */ + @SuppressWarnings("unused") + public WorkflowSettings() { + setDefaults(); + systemProperties = ImmutableMap.of(); + } + + private void setDefaults(){ + validateSpec = true; + strictSpecBehavior = true; + outputDir = "."; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newBuilder(WorkflowSettings copy) { + Builder builder = new Builder(); + builder.inputSpec = copy.getInputSpec(); + builder.outputDir = copy.getOutputDir(); + builder.verbose = copy.isVerbose(); + builder.skipOverwrite = copy.isSkipOverwrite(); + builder.removeOperationIdPrefix = copy.isRemoveOperationIdPrefix(); + builder.logToStderr = copy.isLogToStderr(); + builder.validateSpec = copy.isValidateSpec(); + builder.enablePostProcessFile = copy.isEnablePostProcessFile(); + builder.enableMinimalUpdate = copy.isEnableMinimalUpdate(); + builder.strictSpecBehavior = copy.isStrictSpecBehavior(); + builder.templatingEngineName = copy.getTemplatingEngineName(); + builder.ignoreFileOverride = copy.getIgnoreFileOverride(); + builder.systemProperties = ImmutableMap.copyOf(copy.getSystemProperties()); + + // force builder "with" methods to invoke side effects + builder.withTemplateDir(copy.getTemplateDir()); + + return builder; + } + + /** + * Gets input spec's location, as URL or file + * + * @return the input spec + */ + public String getInputSpec() { + return inputSpec; + } + + /** + * Gets the output dir (where we write generated files). Defaults to the current directory. + * + * @return the output dir + */ + public String getOutputDir() { + return outputDir; + } + + /** + * Configures verbosity of generation. When true, more messages will be printed during generation. + * + * @return true if verbose mode, false otherwise. + */ + public boolean isVerbose() { + return verbose; + } + + /** + * Indicates whether or not the existing files should be overwritten during the generation. This option is more rudimentary than + * defining patterns in .openapi-generator-ignore or {@link WorkflowSettings#isEnableMinimalUpdate()}. + * + * @return true if defaulting to overwriting files, false otherwise. + * @see Ignore File Format + */ + public boolean isSkipOverwrite() { + return skipOverwrite; + } + + /** + * Indicates whether or not to remove the prefix of operationId, e.g. config_getId to getId. + * + * @return true if the operation id prefix should be removed during generation, false otherwise. + */ + public boolean isRemoveOperationIdPrefix() { + return removeOperationIdPrefix; + } + + /** + * Indicates whether or not the generator's executor will write all log messages (not just errors) to STDOUT. Useful for + * piping the JSON output of debug options (e.g. -DdebugOperations) to an external parser directly while testing a generator. + * + * @return true if the executor should attempt to write all messages to stderr, + * false otherwise (which defaults to logging configuration, not necessarily stdout). + */ + public boolean isLogToStderr() { + return logToStderr; + } + + /** + * Indicates whether or not generation should also validate an input specification. + *

+ * NOTE: Invalid specs may result in a generation error, disabling may cause unexpected results. + * + * @return true if spec document validation is enabled, otherwise false. Default: true. + */ + public boolean isValidateSpec() { + return validateSpec; + } + + /** + * Indicates whether or not file post-processing is enabled for generators which support it. Refer to individual generator documentation for details. + *

+ * In general, once enabled, a generator will evaluate a command stored in LANG_POST_PROCESS_FILE. + *

+ * For example: + * + * export SCALA_POST_PROCESS_FILE=/usr/local/bin/scalafmt + *

+ * Here, a Scala generator which supports file post-processing will run scalafmt for each generated file. + * + * @return true if file post-processing is enabled, otherwise false. + */ + public boolean isEnablePostProcessFile() { + return enablePostProcessFile; + } + + /** + * Indicates whether or not the generation should update only those files which have changed. + * + * @return true if minimal updates are enabled, otherwise false. + */ + public boolean isEnableMinimalUpdate() { + return enableMinimalUpdate; + } + + /** + * Indicates whether or not 'MUST' and 'SHALL' wording in the api specification is strictly adhered to. + * For example, when false, no automatic 'fixes' will be applied to documents which pass validation but don't follow the spec. + * + * @return true if the generator should attempt to strictly follow rules in the specification, otherwise false. + */ + public boolean isStrictSpecBehavior() { + return strictSpecBehavior; + } + + /** + * Gets the directory holding templates used in generation. This option allows users to extend or modify built-in templates, or to write their own. + * + * @return the template dir + */ + public String getTemplateDir() { + return templateDir; + } + + /** + * Gets the name of the templating engine to target. This option allows a user to target an engine which differs from the generator default, or to + * refer to their own fully qualified type name of a custom template engine adapter. + * + * @return the templating engine name + * @see Custom Engines + */ + public String getTemplatingEngineName() { + return templatingEngineName; + } + + /** + * Gets the override location for the .openapi-generator-ignore file. Most useful on initial generation. + * + * @return the ignore file override + */ + public String getIgnoreFileOverride() { + return ignoreFileOverride; + } + + /** + * Gets system properties applied to the generator. + * + * @return the system properties + */ + public Map getSystemProperties() { + return systemProperties; + } + + /** + * {@code WorkflowSettings} builder static inner class. + */ + @SuppressWarnings("unused") + public static final class Builder { + private String inputSpec; + private String outputDir; + private boolean verbose; + private boolean skipOverwrite; + private boolean removeOperationIdPrefix; + private boolean logToStderr; + private boolean validateSpec; + private boolean enablePostProcessFile; + private boolean enableMinimalUpdate; + private boolean strictSpecBehavior; + private String templateDir; + private String templatingEngineName; + private String ignoreFileOverride; + private Map systemProperties; + + private Builder() { + systemProperties = new HashMap<>(); + } + + /** + * Sets the {@code inputSpec} and returns a reference to this Builder so that the methods can be chained together. + * + * @param inputSpec the {@code inputSpec} to set + * @return a reference to this Builder + */ + public Builder withInputSpec(String inputSpec) { + this.inputSpec = inputSpec; + return this; + } + + /** + * Sets the {@code outputDir} and returns a reference to this Builder so that the methods can be chained together. + * + * @param outputDir the {@code outputDir} to set + * @return a reference to this Builder + */ + public Builder withOutputDir(String outputDir) { + this.outputDir = Paths.get(outputDir).toAbsolutePath().toString();; + return this; + } + + /** + * Sets the {@code verbose} and returns a reference to this Builder so that the methods can be chained together. + * + * @param verbose the {@code verbose} to set + * @return a reference to this Builder + */ + public Builder withVerbose(boolean verbose) { + this.verbose = verbose; + return this; + } + + /** + * Sets the {@code skipOverwrite} and returns a reference to this Builder so that the methods can be chained together. + * + * @param skipOverwrite the {@code skipOverwrite} to set + * @return a reference to this Builder + */ + public Builder withSkipOverwrite(boolean skipOverwrite) { + this.skipOverwrite = skipOverwrite; + return this; + } + + /** + * Sets the {@code removeOperationIdPrefix} and returns a reference to this Builder so that the methods can be chained together. + * + * @param removeOperationIdPrefix the {@code removeOperationIdPrefix} to set + * @return a reference to this Builder + */ + public Builder withRemoveOperationIdPrefix(boolean removeOperationIdPrefix) { + this.removeOperationIdPrefix = removeOperationIdPrefix; + return this; + } + + /** + * Sets the {@code logToStderr} and returns a reference to this Builder so that the methods can be chained together. + * + * @param logToStderr the {@code logToStderr} to set + * @return a reference to this Builder + */ + public Builder withLogToStderr(boolean logToStderr) { + this.logToStderr = logToStderr; + return this; + } + + /** + * Sets the {@code validateSpec} and returns a reference to this Builder so that the methods can be chained together. + * + * @param validateSpec the {@code validateSpec} to set + * @return a reference to this Builder + */ + public Builder withValidateSpec(boolean validateSpec) { + this.validateSpec = validateSpec; + return this; + } + + /** + * Sets the {@code enablePostProcessFile} and returns a reference to this Builder so that the methods can be chained together. + * + * @param enablePostProcessFile the {@code enablePostProcessFile} to set + * @return a reference to this Builder + */ + public Builder withEnablePostProcessFile(boolean enablePostProcessFile) { + this.enablePostProcessFile = enablePostProcessFile; + return this; + } + + /** + * Sets the {@code enableMinimalUpdate} and returns a reference to this Builder so that the methods can be chained together. + * + * @param enableMinimalUpdate the {@code enableMinimalUpdate} to set + * @return a reference to this Builder + */ + public Builder withEnableMinimalUpdate(boolean enableMinimalUpdate) { + this.enableMinimalUpdate = enableMinimalUpdate; + return this; + } + + /** + * Sets the {@code strictSpecBehavior} and returns a reference to this Builder so that the methods can be chained together. + * + * @param strictSpecBehavior the {@code strictSpecBehavior} to set + * @return a reference to this Builder + */ + public Builder withStrictSpecBehavior(boolean strictSpecBehavior) { + this.strictSpecBehavior = strictSpecBehavior; + return this; + } + + /** + * Sets the {@code templateDir} and returns a reference to this Builder so that the methods can be chained together. + * + * @param templateDir the {@code templateDir} to set + * @return a reference to this Builder + */ + public Builder withTemplateDir(String templateDir) { + if (templateDir == null) { + this.templateDir = null; + } else { + File f = new File(templateDir); + + // check to see if the folder exists + if (!(f.exists() && f.isDirectory())) { + throw new IllegalArgumentException( + "Template directory " + templateDir + " does not exist."); + } + + this.templateDir = Paths.get(f.toURI()).toAbsolutePath().toString(); + } + + return this; + } + + /** + * Sets the {@code templatingEngineName} and returns a reference to this Builder so that the methods can be chained together. + * + * @param templatingEngineName the {@code templatingEngineName} to set + * @return a reference to this Builder + */ + public Builder withTemplatingEngineName(String templatingEngineName) { + this.templatingEngineName = templatingEngineName; + return this; + } + + /** + * Sets the {@code ignoreFileOverride} and returns a reference to this Builder so that the methods can be chained together. + * + * @param ignoreFileOverride the {@code ignoreFileOverride} to set + * @return a reference to this Builder + */ + public Builder withIgnoreFileOverride(String ignoreFileOverride) { + this.ignoreFileOverride = ignoreFileOverride; + return this; + } + + /** + * Sets the {@code systemProperties} and returns a reference to this Builder so that the methods can be chained together. + * + * @param systemProperties the {@code systemProperties} to set + * @return a reference to this Builder + */ + public Builder withSystemProperties(Map systemProperties) { + this.systemProperties = systemProperties; + return this; + } + + /** + * Sets the {@code systemProperties} and returns a reference to this Builder so that the methods can be chained together. + * + * @param key The key of a system (global) property to set + * @param value The value of a system (global) property to set + * @return a reference to this Builder + */ + public Builder withSystemProperty(String key, String value) { + if (this.systemProperties == null) { + this.systemProperties = new HashMap<>(); + } + this.systemProperties.put(key, value); + return this; + } + + /** + * Returns a {@code WorkflowSettings} built from the parameters previously set. + * + * @return a {@code WorkflowSettings} built with parameters of this {@code WorkflowSettings.Builder} + */ + public WorkflowSettings build() { + WorkflowSettings instance = new WorkflowSettings(this); + //noinspection PlaceholderCountMatchesArgumentCount + LOGGER.debug("WorkflowSettings#build: %s", instance.toString()); + return instance; + } + } + + + @Override + public String toString() { + return "WorkflowSettings{" + + "inputSpec='" + inputSpec + '\'' + + ", outputDir='" + outputDir + '\'' + + ", verbose=" + verbose + + ", skipOverwrite=" + skipOverwrite + + ", removeOperationIdPrefix=" + removeOperationIdPrefix + + ", logToStderr=" + logToStderr + + ", validateSpec=" + validateSpec + + ", enablePostProcessFile=" + enablePostProcessFile + + ", enableMinimalUpdate=" + enableMinimalUpdate + + ", strictSpecBehavior=" + strictSpecBehavior + + ", templateDir='" + templateDir + '\'' + + ", templatingEngineName='" + templatingEngineName + '\'' + + ", ignoreFileOverride='" + ignoreFileOverride + '\'' + + ", systemProperties=" + systemProperties + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof WorkflowSettings)) return false; + WorkflowSettings that = (WorkflowSettings) o; + return isVerbose() == that.isVerbose() && + isSkipOverwrite() == that.isSkipOverwrite() && + isRemoveOperationIdPrefix() == that.isRemoveOperationIdPrefix() && + isLogToStderr() == that.isLogToStderr() && + isValidateSpec() == that.isValidateSpec() && + isEnablePostProcessFile() == that.isEnablePostProcessFile() && + isEnableMinimalUpdate() == that.isEnableMinimalUpdate() && + isStrictSpecBehavior() == that.isStrictSpecBehavior() && + Objects.equals(getInputSpec(), that.getInputSpec()) && + Objects.equals(getOutputDir(), that.getOutputDir()) && + Objects.equals(getTemplateDir(), that.getTemplateDir()) && + Objects.equals(getTemplatingEngineName(), that.getTemplatingEngineName()) && + Objects.equals(getIgnoreFileOverride(), that.getIgnoreFileOverride()) && + Objects.equals(getSystemProperties(), that.getSystemProperties()); + } + + @Override + public int hashCode() { + return Objects.hash( + getInputSpec(), + getOutputDir(), + isVerbose(), + isSkipOverwrite(), + isRemoveOperationIdPrefix(), + isLogToStderr(), + isValidateSpec(), + isEnablePostProcessFile(), + isEnableMinimalUpdate(), + isStrictSpecBehavior(), + getTemplateDir(), + getTemplatingEngineName(), + getIgnoreFileOverride(), + getSystemProperties() + ); + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java index 0c87104c7b5..4bd538a231d 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.openapitools.codegen.meta; /** diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java index 6e12c64f7d1..8547ea9b10d 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.openapitools.codegen.meta; /** diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 28a512dd006..79e20d867ab 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -28,7 +28,7 @@ import org.gradle.kotlin.dsl.property import org.openapitools.codegen.CodegenConstants import org.openapitools.codegen.DefaultGenerator import org.openapitools.codegen.config.CodegenConfigurator -import org.openapitools.codegen.config.GeneratorProperties +import org.openapitools.codegen.config.GlobalSettings /** @@ -40,6 +40,7 @@ import org.openapitools.codegen.config.GeneratorProperties * * @author Jim Schubert */ +@Suppress("UnstableApiUsage") open class GenerateTask : DefaultTask() { /** @@ -392,146 +393,146 @@ open class GenerateTask : DefaultTask() { } if (supportingFilesConstrainedTo.isPresent && supportingFilesConstrainedTo.get().isNotEmpty()) { - GeneratorProperties.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesConstrainedTo.get().joinToString(",")) + GlobalSettings.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesConstrainedTo.get().joinToString(",")) } else { - GeneratorProperties.clearProperty(CodegenConstants.SUPPORTING_FILES) + GlobalSettings.clearProperty(CodegenConstants.SUPPORTING_FILES) } if (modelFilesConstrainedTo.isPresent && modelFilesConstrainedTo.get().isNotEmpty()) { - GeneratorProperties.setProperty(CodegenConstants.MODELS, modelFilesConstrainedTo.get().joinToString(",")) + GlobalSettings.setProperty(CodegenConstants.MODELS, modelFilesConstrainedTo.get().joinToString(",")) } else { - GeneratorProperties.clearProperty(CodegenConstants.MODELS) + GlobalSettings.clearProperty(CodegenConstants.MODELS) } if (apiFilesConstrainedTo.isPresent && apiFilesConstrainedTo.get().isNotEmpty()) { - GeneratorProperties.setProperty(CodegenConstants.APIS, apiFilesConstrainedTo.get().joinToString(",")) + GlobalSettings.setProperty(CodegenConstants.APIS, apiFilesConstrainedTo.get().joinToString(",")) } else { - GeneratorProperties.clearProperty(CodegenConstants.APIS) + GlobalSettings.clearProperty(CodegenConstants.APIS) } if (generateApiDocumentation.isPresent) { - GeneratorProperties.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.get().toString()) + GlobalSettings.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.get().toString()) } if (generateModelDocumentation.isPresent) { - GeneratorProperties.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.get().toString()) + GlobalSettings.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.get().toString()) } if (generateModelTests.isPresent) { - GeneratorProperties.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.get().toString()) + GlobalSettings.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.get().toString()) } if (generateApiTests.isPresent) { - GeneratorProperties.setProperty(CodegenConstants.API_TESTS, generateApiTests.get().toString()) + GlobalSettings.setProperty(CodegenConstants.API_TESTS, generateApiTests.get().toString()) } if (withXml.isPresent) { - GeneratorProperties.setProperty(CodegenConstants.WITH_XML, withXml.get().toString()) + GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.get().toString()) } // now override with any specified parameters verbose.ifNotEmpty { value -> - configurator.isVerbose = value + configurator.setVerbose(value) } validateSpec.ifNotEmpty { value -> - configurator.isValidateSpec = value + configurator.setValidateSpec(value) } skipOverwrite.ifNotEmpty { value -> - configurator.isSkipOverwrite = value ?: false + configurator.setSkipOverwrite(value ?: false) } inputSpec.ifNotEmpty { value -> - configurator.inputSpec = value + configurator.setInputSpec(value) } generatorName.ifNotEmpty { value -> - configurator.generatorName = value + configurator.setGeneratorName(value) } outputDir.ifNotEmpty { value -> - configurator.outputDir = value + configurator.setOutputDir(value) } auth.ifNotEmpty { value -> - configurator.auth = value + configurator.setAuth(value) } templateDir.ifNotEmpty { value -> - configurator.templateDir = value + configurator.setTemplateDir(value) } packageName.ifNotEmpty { value -> - configurator.packageName = value + configurator.setPackageName(value) } apiPackage.ifNotEmpty { value -> - configurator.apiPackage = value + configurator.setApiPackage(value) } modelPackage.ifNotEmpty { value -> - configurator.modelPackage = value + configurator.setModelPackage(value) } modelNamePrefix.ifNotEmpty { value -> - configurator.modelNamePrefix = value + configurator.setModelNamePrefix(value) } modelNameSuffix.ifNotEmpty { value -> - configurator.modelNameSuffix = value + configurator.setModelNameSuffix(value) } invokerPackage.ifNotEmpty { value -> - configurator.invokerPackage = value + configurator.setInvokerPackage(value) } groupId.ifNotEmpty { value -> - configurator.groupId = value + configurator.setGroupId(value) } id.ifNotEmpty { value -> - configurator.artifactId = value + configurator.setArtifactId(value) } version.ifNotEmpty { value -> - configurator.artifactVersion = value + configurator.setArtifactVersion(value) } library.ifNotEmpty { value -> - configurator.library = value + configurator.setLibrary(value) } gitUserId.ifNotEmpty { value -> - configurator.gitUserId = value + configurator.setGitUserId(value) } gitRepoId.ifNotEmpty { value -> - configurator.gitRepoId = value + configurator.setGitRepoId(value) } releaseNote.ifNotEmpty { value -> - configurator.releaseNote = value + configurator.setReleaseNote(value) } httpUserAgent.ifNotEmpty { value -> - configurator.httpUserAgent = value + configurator.setHttpUserAgent(value) } ignoreFileOverride.ifNotEmpty { value -> - configurator.ignoreFileOverride = value + configurator.setIgnoreFileOverride(value) } removeOperationIdPrefix.ifNotEmpty { value -> - configurator.removeOperationIdPrefix = value!! + configurator.setRemoveOperationIdPrefix(value!!) } logToStderr.ifNotEmpty { value -> - configurator.logToStderr = value + configurator.setLogToStderr(value) } enablePostProcessFile.ifNotEmpty { value -> - configurator.enablePostProcessFile = value + configurator.setEnablePostProcessFile(value) } skipValidateSpec.ifNotEmpty { value -> @@ -602,12 +603,12 @@ open class GenerateTask : DefaultTask() { DefaultGenerator().opts(clientOptInput).generate() - out.println("Successfully generated code to ${configurator.outputDir}") + out.println("Successfully generated code to $outputDir") } catch (e: RuntimeException) { throw GradleException("Code generation failed.", e) } } finally { - GeneratorProperties.reset() + GlobalSettings.reset() } } } diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 0d6d91acadd..9d08aecd05e 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -46,6 +46,7 @@ 1.7 1.7 + none diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 1b1e28ee071..06e6b721673 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -59,6 +59,7 @@ 1.7 1.7 + none diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 7ac66dc4da4..16689b1c15d 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -54,7 +54,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.config.CodegenConfigurator; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.sonatype.plexus.build.incremental.BuildContext; import org.sonatype.plexus.build.incremental.DefaultBuildContext; import org.slf4j.Logger; @@ -562,28 +562,28 @@ public class CodeGenMojo extends AbstractMojo { // Set generation options if (null != generateApis && generateApis) { - GeneratorProperties.setProperty(CodegenConstants.APIS, ""); + GlobalSettings.setProperty(CodegenConstants.APIS, ""); } else { - GeneratorProperties.clearProperty(CodegenConstants.APIS); + GlobalSettings.clearProperty(CodegenConstants.APIS); } if (null != generateModels && generateModels) { - GeneratorProperties.setProperty(CodegenConstants.MODELS, modelsToGenerate); + GlobalSettings.setProperty(CodegenConstants.MODELS, modelsToGenerate); } else { - GeneratorProperties.clearProperty(CodegenConstants.MODELS); + GlobalSettings.clearProperty(CodegenConstants.MODELS); } if (null != generateSupportingFiles && generateSupportingFiles) { - GeneratorProperties.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesToGenerate); + GlobalSettings.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesToGenerate); } else { - GeneratorProperties.clearProperty(CodegenConstants.SUPPORTING_FILES); + GlobalSettings.clearProperty(CodegenConstants.SUPPORTING_FILES); } - GeneratorProperties.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.toString()); - GeneratorProperties.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.toString()); - GeneratorProperties.setProperty(CodegenConstants.API_TESTS, generateApiTests.toString()); - GeneratorProperties.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.toString()); - GeneratorProperties.setProperty(CodegenConstants.WITH_XML, withXml.toString()); + GlobalSettings.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.toString()); + GlobalSettings.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.toString()); + GlobalSettings.setProperty(CodegenConstants.API_TESTS, generateApiTests.toString()); + GlobalSettings.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.toString()); + GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.toString()); if (configOptions != null) { // Retained for backwards-compataibility with configOptions -> instantiation-types @@ -656,13 +656,13 @@ public class CodeGenMojo extends AbstractMojo { if (environmentVariables != null) { for (String key : environmentVariables.keySet()) { - originalEnvironmentVariables.put(key, GeneratorProperties.getProperty(key)); + originalEnvironmentVariables.put(key, GlobalSettings.getProperty(key)); String value = environmentVariables.get(key); if (value == null) { // don't put null values value = ""; } - GeneratorProperties.setProperty(key, value); + GlobalSettings.setProperty(key, value); configurator.addSystemProperty(key, value); } } @@ -748,9 +748,9 @@ public class CodeGenMojo extends AbstractMojo { // when running the plugin multiple consecutive times with different configurations. for (Map.Entry entry : originalEnvironmentVariables.entrySet()) { if (entry.getValue() == null) { - GeneratorProperties.clearProperty(entry.getKey()); + GlobalSettings.clearProperty(entry.getKey()); } else { - GeneratorProperties.setProperty(entry.getKey(), entry.getValue()); + GlobalSettings.setProperty(entry.getKey(), entry.getValue()); } } } diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java index 557d74a8197..dd609564918 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java @@ -25,7 +25,6 @@ import io.swagger.v3.parser.core.models.AuthorizationValue; import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.ClientOpts; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfigLoader; import org.openapitools.codegen.DefaultGenerator; @@ -129,11 +128,10 @@ public class Generator { } ClientOptInput clientOptInput = new ClientOptInput(); - ClientOpts clientOpts = new ClientOpts(); String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath; String outputFilename = outputFolder + "-bundle.zip"; - clientOptInput.opts(clientOpts).openAPI(openapi); + clientOptInput.openAPI(openapi); CodegenConfig codegenConfig; try { @@ -149,8 +147,6 @@ public class Generator { codegenConfig.setOutputDir(outputFolder); - LOGGER.debug(Json.pretty(clientOpts)); - clientOptInput.setConfig(codegenConfig); try { diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 53fc6efe312..9b19bc2320e 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -255,6 +255,11 @@ guava ${guava-version} + + com.fasterxml.jackson.datatype + jackson-datatype-guava + ${jackson-version} + org.testng testng diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java index 2c7568589b7..8453c1c9051 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java @@ -25,22 +25,16 @@ import java.util.List; public class ClientOptInput { private CodegenConfig config; - private ClientOpts opts; private OpenAPI openAPI; private List auths; public ClientOptInput openAPI(OpenAPI openAPI) { - this.setOpenAPI(openAPI); - return this; - } - - public ClientOptInput opts(ClientOpts opts) { - this.setOpts(opts); + this.openAPI = openAPI; return this; } public ClientOptInput config(CodegenConfig codegenConfig) { - this.setConfig(codegenConfig); + this.config = codegenConfig; return this; } @@ -65,26 +59,22 @@ public class ClientOptInput { return auths; } + @Deprecated public CodegenConfig getConfig() { return config; } + @Deprecated public void setConfig(CodegenConfig config) { this.config = config; } - public ClientOpts getOpts() { - return opts; - } - - public void setOpts(ClientOpts opts) { - this.opts = opts; - } - + @Deprecated public OpenAPI getOpenAPI() { return openAPI; } + @Deprecated public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOpts.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOpts.java deleted file mode 100644 index 00a4f291ddb..00000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOpts.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen; - -import org.openapitools.codegen.auth.AuthMethod; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -public class ClientOpts { - protected String uri; - protected String target; - protected AuthMethod auth; - protected Map properties = new HashMap(); - protected String outputDirectory; - - public String getUri() { - return uri; - } - - public void setUri(String uri) { - this.uri = uri; - } - - public String getTarget() { - return target; - } - - public void setTarget(String target) { - this.target = target; - } - - public Map getProperties() { - return properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public String getOutputDirectory() { - return outputDirectory; - } - - public void setOutputDirectory(String outputDirectory) { - this.outputDirectory = outputDirectory; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("ClientOpts: {\n"); - sb.append(" uri: ").append(uri).append(","); - sb.append(" auth: ").append(auth).append(","); - sb.append(properties); - sb.append("}"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ClientOpts that = (ClientOpts) o; - return Objects.equals(uri, that.uri) && - Objects.equals(target, that.target) && - Objects.equals(auth, that.auth) && - Objects.equals(properties, that.properties) && - Objects.equals(outputDirectory, that.outputDirectory); - } - - @Override - public int hashCode() { - return Objects.hash(uri, target, auth, properties, outputDirectory); - } -} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 96cc4998100..e3853ced333 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -42,7 +42,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.api.TemplatingEngineAdapter; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.examples.ExampleGenerator; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; @@ -2932,7 +2932,7 @@ public class DefaultCodegen implements CodegenConfig { } codegenParameter.jsonSchema = Json.pretty(parameter); - if (GeneratorProperties.getProperty("debugParser") != null) { + if (GlobalSettings.getProperty("debugParser") != null) { LOGGER.info("working on Parameter " + parameter.getName()); LOGGER.info("JSON schema: " + codegenParameter.jsonSchema); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 1226eaba9fe..e5543419921 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -32,13 +32,12 @@ import io.swagger.v3.oas.models.tags.Tag; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.templating.MustacheEngineAdapter; -import org.openapitools.codegen.config.GeneratorProperties; import org.openapitools.codegen.utils.ImplementationVersion; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; @@ -81,7 +80,6 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { this.opts = opts; this.openAPI = opts.getOpenAPI(); this.config = opts.getConfig(); - this.config.additionalProperties().putAll(opts.getOpts().getProperties()); this.templatingEngine = this.config.getTemplatingEngine(); String ignoreFileLocation = this.config.getIgnoreFilePathOverride(); @@ -145,9 +143,9 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { private void configureGeneratorProperties() { // allows generating only models by specifying a CSV of models to generate, or empty for all // NOTE: Boolean.TRUE is required below rather than `true` because of JVM boxing constraints and type inference. - generateApis = GeneratorProperties.getProperty(CodegenConstants.APIS) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.APIS, null); - generateModels = GeneratorProperties.getProperty(CodegenConstants.MODELS) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODELS, null); - generateSupportingFiles = GeneratorProperties.getProperty(CodegenConstants.SUPPORTING_FILES) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.SUPPORTING_FILES, null); + generateApis = GlobalSettings.getProperty(CodegenConstants.APIS) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.APIS, null); + generateModels = GlobalSettings.getProperty(CodegenConstants.MODELS) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODELS, null); + generateSupportingFiles = GlobalSettings.getProperty(CodegenConstants.SUPPORTING_FILES) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.SUPPORTING_FILES, null); if (generateApis == null && generateModels == null && generateSupportingFiles == null) { // no specifics are set, generate everything @@ -165,10 +163,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { } // model/api tests and documentation options rely on parent generate options (api or model) and no other options. // They default to true in all scenarios and can only be marked false explicitly - generateModelTests = GeneratorProperties.getProperty(CodegenConstants.MODEL_TESTS) != null ? Boolean.valueOf(GeneratorProperties.getProperty(CodegenConstants.MODEL_TESTS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODEL_TESTS, true); - generateModelDocumentation = GeneratorProperties.getProperty(CodegenConstants.MODEL_DOCS) != null ? Boolean.valueOf(GeneratorProperties.getProperty(CodegenConstants.MODEL_DOCS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODEL_DOCS, true); - generateApiTests = GeneratorProperties.getProperty(CodegenConstants.API_TESTS) != null ? Boolean.valueOf(GeneratorProperties.getProperty(CodegenConstants.API_TESTS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.API_TESTS, true); - generateApiDocumentation = GeneratorProperties.getProperty(CodegenConstants.API_DOCS) != null ? Boolean.valueOf(GeneratorProperties.getProperty(CodegenConstants.API_DOCS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.API_DOCS, true); + generateModelTests = GlobalSettings.getProperty(CodegenConstants.MODEL_TESTS) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.MODEL_TESTS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODEL_TESTS, true); + generateModelDocumentation = GlobalSettings.getProperty(CodegenConstants.MODEL_DOCS) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.MODEL_DOCS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.MODEL_DOCS, true); + generateApiTests = GlobalSettings.getProperty(CodegenConstants.API_TESTS) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.API_TESTS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.API_TESTS, true); + generateApiDocumentation = GlobalSettings.getProperty(CodegenConstants.API_DOCS) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.API_DOCS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.API_DOCS, true); // Additional properties added for tests to exclude references in project related files config.additionalProperties().put(CodegenConstants.GENERATE_API_TESTS, generateApiTests); @@ -184,9 +182,9 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { config.additionalProperties().put(CodegenConstants.EXCLUDE_TESTS, true); } - if (GeneratorProperties.getProperty("debugOpenAPI") != null) { + if (GlobalSettings.getProperty("debugOpenAPI") != null) { Json.prettyPrint(openAPI); - } else if (GeneratorProperties.getProperty("debugSwagger") != null) { + } else if (GlobalSettings.getProperty("debugSwagger") != null) { // This exists for backward compatibility // We fall to this block only if debugOpenAPI is null. No need to dump this twice. LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'."); @@ -344,7 +342,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { return; } - String modelNames = GeneratorProperties.getProperty("models"); + String modelNames = GlobalSettings.getProperty("models"); Set modelsToGenerate = null; if (modelNames != null && !modelNames.isEmpty()) { modelsToGenerate = new HashSet(Arrays.asList(modelNames.split(","))); @@ -417,8 +415,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { } */ }); - Boolean skipFormModel = GeneratorProperties.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ? - Boolean.valueOf(GeneratorProperties.getProperty(CodegenConstants.SKIP_FORM_MODEL)) : + Boolean skipFormModel = GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ? + Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.SKIP_FORM_MODEL)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, false); // process models only @@ -514,7 +512,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { throw new RuntimeException("Could not generate model '" + modelName + "'", e); } } - if (GeneratorProperties.getProperty("debugModels") != null) { + if (GlobalSettings.getProperty("debugModels") != null) { LOGGER.info("############ Model info ############"); Json.prettyPrint(allModels); } @@ -527,7 +525,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { } Map> paths = processPaths(this.openAPI.getPaths()); Set apisToGenerate = null; - String apiNames = GeneratorProperties.getProperty("apis"); + String apiNames = GlobalSettings.getProperty("apis"); if (apiNames != null && !apiNames.isEmpty()) { apisToGenerate = new HashSet(Arrays.asList(apiNames.split(","))); } @@ -666,7 +664,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { throw new RuntimeException("Could not generate api file for '" + tag + "'", e); } } - if (GeneratorProperties.getProperty("debugOperations") != null) { + if (GlobalSettings.getProperty("debugOperations") != null) { LOGGER.info("############ Operation info ############"); Json.prettyPrint(allOperations); } @@ -678,7 +676,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { return; } Set supportingFilesToGenerate = null; - String supportingFiles = GeneratorProperties.getProperty(CodegenConstants.SUPPORTING_FILES); + String supportingFiles = GlobalSettings.getProperty(CodegenConstants.SUPPORTING_FILES); if (supportingFiles != null && !supportingFiles.isEmpty()) { supportingFilesToGenerate = new HashSet(Arrays.asList(supportingFiles.split(","))); } @@ -867,7 +865,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { config.postProcessSupportingFileData(bundle); - if (GeneratorProperties.getProperty("debugSupportingFiles") != null) { + if (GlobalSettings.getProperty("debugSupportingFiles") != null) { LOGGER.info("############ Supporting file info ############"); Json.prettyPrint(bundle); } @@ -926,8 +924,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { generateSupportingFiles(files, bundle); config.processOpenAPI(openAPI); - // reset GeneratorProperties, so that the running thread can be reused for another generator-run - GeneratorProperties.reset(); + // reset GlobalSettings, so that the running thread can be reused for another generator-run + GlobalSettings.reset(); return files; } @@ -982,7 +980,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { return; } - if (GeneratorProperties.getProperty("debugOperations") != null) { + if (GlobalSettings.getProperty("debugOperations") != null) { LOGGER.info("processOperation: resourcePath= " + resourcePath + "\t;" + httpMethod + " " + operation + "\n"); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 777e4888e7a..4c251ffc4a0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -17,9 +17,8 @@ package org.openapitools.codegen.config; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.guava.GuavaModule; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.core.util.Json; import io.swagger.v3.core.util.Yaml; @@ -32,100 +31,160 @@ import org.apache.commons.lang3.Validate; import org.openapitools.codegen.*; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.auth.AuthParser; -import org.openapitools.codegen.languages.*; -import org.openapitools.codegen.templating.HandlebarsEngineAdapter; -import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; -import java.io.Serializable; -import java.nio.file.Paths; import java.util.*; import static org.apache.commons.lang3.StringUtils.isEmpty; import static org.apache.commons.lang3.StringUtils.isNotEmpty; /** - * A class that contains all codegen configuration properties a user would want to manipulate. An - * instance could be created by deserializing a JSON file or being populated from CLI or Maven - * plugin parameters. It also has a convenience method for creating a ClientOptInput class which is - * THE object DefaultGenerator.java needs to generate code. + * A class which manages the contextual configuration for code generation. + * This includes configuring the generator, templating, and the workflow which orchestrates these. + * + * This helper also enables the deserialization of {@link GeneratorSettings} via application-specific Jackson JSON usage + * (see {@link DynamicSettings}. */ -public class CodegenConfigurator implements Serializable { +@SuppressWarnings("UnusedReturnValue") +public class CodegenConfigurator { public static final Logger LOGGER = LoggerFactory.getLogger(CodegenConfigurator.class); + private GeneratorSettings.Builder generatorSettingsBuilder = GeneratorSettings.newBuilder(); + private WorkflowSettings.Builder workflowSettingsBuilder = WorkflowSettings.newBuilder(); + private String generatorName; private String inputSpec; - private String outputDir; - private boolean verbose; - private boolean skipOverwrite; - private boolean removeOperationIdPrefix; - private boolean logToStderr; - private boolean validateSpec; - private boolean enablePostProcessFile; - private boolean enableMinimalUpdate; - private boolean strictSpecBehavior; - private String templateDir; private String templatingEngineName; + private Map systemProperties = new HashMap<>(); + private Map instantiationTypes = new HashMap<>(); + private Map typeMappings = new HashMap<>(); + private Map additionalProperties = new HashMap<>(); + private Map importMappings = new HashMap<>(); + private Set languageSpecificPrimitives = new HashSet<>(); + private Map reservedWordMappings = new HashMap<>(); private String auth; - private String apiPackage; - private String modelPackage; - private String invokerPackage; - private String packageName; - private String modelNamePrefix; - private String modelNameSuffix; - private String groupId; - private String artifactId; - private String artifactVersion; - private String library; - private String ignoreFileOverride; - private Map systemProperties = new HashMap(); - private Map instantiationTypes = new HashMap(); - private Map typeMappings = new HashMap(); - private Map additionalProperties = new HashMap(); - private Map importMappings = new HashMap(); - private Set languageSpecificPrimitives = new HashSet(); - private Map reservedWordMappings = new HashMap(); - - private String gitUserId = "GIT_USER_ID"; - private String gitRepoId = "GIT_REPO_ID"; - private String releaseNote = "Minor update"; - private String httpUserAgent; - - private final Map dynamicProperties = new HashMap(); - //the map that holds the JsonAnySetter/JsonAnyGetter values public CodegenConfigurator() { - this.validateSpec = true; - this.strictSpecBehavior = true; - this.setOutputDir("."); + } - /** - * Set the "language". This has drifted away from language-only to include framework and - * hyphenated generator types as well as language. - *

- * NOTE: This will eventually become language only again. It is deprecated in its current - * state. - *

- * - * @param lang The generator name. Previously, language name only. - * @return The fluent instance of {@link CodegenConfigurator} - * @deprecated Please use {@link #setGeneratorName(String)}, as generators are no longer - * identified only by language. We may reuse language in the future. - */ - @Deprecated public CodegenConfigurator setLang(String lang) { - this.setGeneratorName(lang); + public static CodegenConfigurator fromFile(String configFile) { + + if (isNotEmpty(configFile)) { + ObjectMapper mapper; + + if (FilenameUtils.isExtension(configFile, new String[]{"yml", "yaml"})) { + mapper = Yaml.mapper(); + } else { + mapper = Json.mapper(); + } + + mapper.registerModule(new GuavaModule()); + + try { + DynamicSettings settings = mapper.readValue(new File(configFile), DynamicSettings.class); + CodegenConfigurator configurator = new CodegenConfigurator(); + configurator.generatorSettingsBuilder = GeneratorSettings.newBuilder(settings.getGeneratorSettings()); + return configurator; + } catch (IOException ex) { + LOGGER.error("Unable to deserialize config file: " + configFile, ex); + } + } + return null; + } + + public CodegenConfigurator addAdditionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + generatorSettingsBuilder.withAdditionalProperty(key, value); + return this; + } + + public CodegenConfigurator addAdditionalReservedWordMapping(String key, String value) { + this.reservedWordMappings.put(key, value); + generatorSettingsBuilder.withReservedWordMapping(key, value); + return this; + } + + public CodegenConfigurator addImportMapping(String key, String value) { + this.importMappings.put(key, value); + generatorSettingsBuilder.withImportMapping(key, value); + return this; + } + + public CodegenConfigurator addInstantiationType(String key, String value) { + this.instantiationTypes.put(key, value); + generatorSettingsBuilder.withInstantiationType(key, value); + return this; + } + + public CodegenConfigurator addLanguageSpecificPrimitive(String value) { + this.languageSpecificPrimitives.add(value); + generatorSettingsBuilder.withLanguageSpecificPrimitive(value); + return this; + } + + public CodegenConfigurator addSystemProperty(String key, String value) { + this.systemProperties.put(key, value); + workflowSettingsBuilder.withSystemProperty(key, value); + return this; + } + + public CodegenConfigurator addTypeMapping(String key, String value) { + this.typeMappings.put(key, value); + generatorSettingsBuilder.withTypeMappings(this.typeMappings); + return this; + } + + public CodegenConfigurator setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + generatorSettingsBuilder.withAdditionalProperties(additionalProperties); + return this; + } + + public CodegenConfigurator setApiPackage(String apiPackage) { + generatorSettingsBuilder.withApiPackage(apiPackage); + return this; + } + + public CodegenConfigurator setArtifactId(String artifactId) { + generatorSettingsBuilder.withArtifactId(artifactId); + return this; + } + + public CodegenConfigurator setArtifactVersion(String artifactVersion) { + generatorSettingsBuilder.withArtifactVersion(artifactVersion); + return this; + } + + public CodegenConfigurator setAuth(String auth) { + this.auth = auth; + return this; + } + + public CodegenConfigurator setEnableMinimalUpdate(boolean enableMinimalUpdate) { + workflowSettingsBuilder.withEnableMinimalUpdate(enableMinimalUpdate); + return this; + } + + public CodegenConfigurator setEnablePostProcessFile(boolean enablePostProcessFile) { + workflowSettingsBuilder.withEnablePostProcessFile(enablePostProcessFile); + return this; + } + + public CodegenConfigurator setGenerateAliasAsModel(boolean generateAliasAsModel) { + // TODO: Move to GlobalSettings? + ModelUtils.setGenerateAliasAsModel(generateAliasAsModel); return this; } /** * Sets the name of the target generator. - * + *

* The generator's name is used to uniquely identify the generator as a mechanism to lookup the * desired implementation at runtime. * @@ -134,457 +193,193 @@ public class CodegenConfigurator implements Serializable { */ public CodegenConfigurator setGeneratorName(final String generatorName) { this.generatorName = generatorName; + generatorSettingsBuilder.withGeneratorName(generatorName); + return this; + } + + public CodegenConfigurator setGitRepoId(String gitRepoId) { + generatorSettingsBuilder.withGitRepoId(gitRepoId); + return this; + } + + public CodegenConfigurator setGitUserId(String gitUserId) { + generatorSettingsBuilder.withGitUserId(gitUserId); + return this; + } + + public CodegenConfigurator setGroupId(String groupId) { + generatorSettingsBuilder.withGroupId(groupId); + return this; + } + + public CodegenConfigurator setHttpUserAgent(String httpUserAgent) { + generatorSettingsBuilder.withHttpUserAgent(httpUserAgent); + return this; + } + + public CodegenConfigurator setIgnoreFileOverride(final String ignoreFileOverride) { + workflowSettingsBuilder.withIgnoreFileOverride(ignoreFileOverride); + return this; + } + + public CodegenConfigurator setImportMappings(Map importMappings) { + generatorSettingsBuilder.withImportMappings(importMappings); return this; } public CodegenConfigurator setInputSpec(String inputSpec) { this.inputSpec = inputSpec; + workflowSettingsBuilder.withInputSpec(inputSpec); return this; } - public String getInputSpec() { - return inputSpec; - } - - public String getOutputDir() { - return outputDir; - } - - public CodegenConfigurator setOutputDir(String outputDir) { - this.outputDir = toAbsolutePathStr(outputDir); - return this; - } - - public String getModelPackage() { - return modelPackage; - } - - public CodegenConfigurator setModelPackage(String modelPackage) { - this.modelPackage = modelPackage; - return this; - } - - public String getModelNamePrefix() { - return modelNamePrefix; - } - - public CodegenConfigurator setModelNamePrefix(String prefix) { - this.modelNamePrefix = prefix; - return this; - } - - public boolean getRemoveOperationIdPrefix() { - return removeOperationIdPrefix; - } - - public CodegenConfigurator setRemoveOperationIdPrefix(boolean removeOperationIdPrefix) { - this.removeOperationIdPrefix = removeOperationIdPrefix; - return this; - } - - public boolean getEnablePostProcessFile() { - return enablePostProcessFile; - } - - public CodegenConfigurator setEnablePostProcessFile(boolean enablePostProcessFile) { - this.enablePostProcessFile = enablePostProcessFile; - return this; - } - - public boolean getLogToStderr() { - return logToStderr; - } - - public CodegenConfigurator setLogToStderr(boolean logToStderrte) { - this.logToStderr = logToStderr; - return this; - } - - public boolean getEnableMinimalUpdate() { - return enableMinimalUpdate; - } - - public CodegenConfigurator setEnableMinimalUpdate(boolean enableMinimalUpdate) { - this.enableMinimalUpdate = enableMinimalUpdate; - return this; - } - - public boolean isGenerateAliasAsModel() { - return ModelUtils.isGenerateAliasAsModel(); - } - - public CodegenConfigurator setGenerateAliasAsModel(boolean generateAliasAsModel) { - ModelUtils.setGenerateAliasAsModel(generateAliasAsModel); - return this; - } - - public String getModelNameSuffix() { - return modelNameSuffix; - } - - public CodegenConfigurator setModelNameSuffix(String suffix) { - this.modelNameSuffix = suffix; - return this; - } - - public boolean isStrictSpecBehavior() { - return strictSpecBehavior; - } - - public CodegenConfigurator setStrictSpecBehavior(boolean strictSpecBehavior) { - this.strictSpecBehavior = strictSpecBehavior; - return this; - } - - public boolean isVerbose() { - return verbose; - } - - public CodegenConfigurator setVerbose(boolean verbose) { - this.verbose = verbose; - return this; - } - - public boolean isValidateSpec() { - return validateSpec; - } - - public CodegenConfigurator setValidateSpec(final boolean validateSpec) { - this.validateSpec = validateSpec; - return this; - } - - public boolean isSkipOverwrite() { - return skipOverwrite; - } - - public CodegenConfigurator setSkipOverwrite(boolean skipOverwrite) { - this.skipOverwrite = skipOverwrite; - return this; - } - - - /** - * Gets the "language". This has drifted away from language-only to include framework and - * hyphenated generator types as well as language. - *

- * NOTE: This will eventually become language only again. It is deprecated in its current - * state. - *

- * - * @return A string which defines the generator. - * @deprecated Please use {@link #getGeneratorName()}, as generators are no longer identified - * only by language. We may reuse language in the future. - */ - @Deprecated public String getLang() { - return getGeneratorName(); - } - - public String getGeneratorName() { - return generatorName; - } - - public String getTemplateDir() { - return templateDir; - } - - public CodegenConfigurator setTemplateDir(String templateDir) { - File f = new File(templateDir); - - // check to see if the folder exists - if (!(f.exists() && f.isDirectory())) { - throw new IllegalArgumentException( - "Template directory " + templateDir + " does not exist."); - } - - this.templateDir = f.getAbsolutePath(); - return this; - } - - public String getAuth() { - return auth; - } - - public CodegenConfigurator setAuth(String auth) { - this.auth = auth; - return this; - } - - public String getApiPackage() { - return apiPackage; - } - - public CodegenConfigurator setApiPackage(String apiPackage) { - this.apiPackage = apiPackage; - return this; - } - - public String getInvokerPackage() { - return invokerPackage; - } - - public CodegenConfigurator setInvokerPackage(String invokerPackage) { - this.invokerPackage = invokerPackage; - return this; - } - - public String getPackageName() { - return packageName; - } - - public CodegenConfigurator setPackageName(String packageName) { - this.packageName = packageName; - return this; - } - - public String getGroupId() { - return groupId; - } - - public CodegenConfigurator setGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - public String getArtifactId() { - return artifactId; - } - - public CodegenConfigurator setArtifactId(String artifactId) { - this.artifactId = artifactId; - return this; - } - - public String getArtifactVersion() { - return artifactVersion; - } - - public CodegenConfigurator setArtifactVersion(String artifactVersion) { - this.artifactVersion = artifactVersion; - return this; - } - - public Map getSystemProperties() { - return systemProperties; - } - - public CodegenConfigurator setSystemProperties(Map systemProperties) { - this.systemProperties = systemProperties; - return this; - } - - public CodegenConfigurator addSystemProperty(String key, String value) { - this.systemProperties.put(key, value); - return this; - } - - public Map getInstantiationTypes() { - return instantiationTypes; - } - public CodegenConfigurator setInstantiationTypes(Map instantiationTypes) { - this.instantiationTypes = instantiationTypes; + generatorSettingsBuilder.withInstantiationTypes(instantiationTypes); return this; } - public CodegenConfigurator addInstantiationType(String key, String value) { - this.instantiationTypes.put(key, value); + public CodegenConfigurator setInvokerPackage(String invokerPackage) { + generatorSettingsBuilder.withInvokerPackage(invokerPackage); return this; } - public Map getTypeMappings() { - return typeMappings; - } - - public CodegenConfigurator setTypeMappings(Map typeMappings) { - this.typeMappings = typeMappings; - return this; - } - - public CodegenConfigurator addTypeMapping(String key, String value) { - this.typeMappings.put(key, value); - return this; - } - - public Map getAdditionalProperties() { - return additionalProperties; - } - - public CodegenConfigurator setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - public CodegenConfigurator addAdditionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - public Map getImportMappings() { - return importMappings; - } - - public CodegenConfigurator setImportMappings(Map importMappings) { - this.importMappings = importMappings; - return this; - } - - public CodegenConfigurator addImportMapping(String key, String value) { - this.importMappings.put(key, value); - return this; - } - - public Set getLanguageSpecificPrimitives() { - return languageSpecificPrimitives; - } - public CodegenConfigurator setLanguageSpecificPrimitives( Set languageSpecificPrimitives) { - this.languageSpecificPrimitives = languageSpecificPrimitives; + generatorSettingsBuilder.withLanguageSpecificPrimitives(languageSpecificPrimitives); return this; } - public CodegenConfigurator addLanguageSpecificPrimitive(String value) { - this.languageSpecificPrimitives.add(value); - return this; - } - - public String getLibrary() { - return library; - } - public CodegenConfigurator setLibrary(String library) { - this.library = library; + generatorSettingsBuilder.withLibrary(library); return this; } - public String getGitUserId() { - return gitUserId; - } - - public CodegenConfigurator setGitUserId(String gitUserId) { - this.gitUserId = gitUserId; + public CodegenConfigurator setLogToStderr(boolean logToStderr) { + workflowSettingsBuilder.withLogToStderr(logToStderr); return this; } - public String getGitRepoId() { - return gitRepoId; - } - - public CodegenConfigurator setGitRepoId(String gitRepoId) { - this.gitRepoId = gitRepoId; + public CodegenConfigurator setModelNamePrefix(String prefix) { + generatorSettingsBuilder.withModelNamePrefix(prefix); return this; } - public String getReleaseNote() { - return releaseNote; + public CodegenConfigurator setModelNameSuffix(String suffix) { + generatorSettingsBuilder.withModelNameSuffix(suffix); + return this; + } + + public CodegenConfigurator setModelPackage(String modelPackage) { + generatorSettingsBuilder.withModelPackage(modelPackage); + return this; + } + + public CodegenConfigurator setOutputDir(String outputDir) { + workflowSettingsBuilder.withOutputDir(outputDir); + return this; + } + + public CodegenConfigurator setPackageName(String packageName) { + generatorSettingsBuilder.withPackageName(packageName); + return this; } public CodegenConfigurator setReleaseNote(String releaseNote) { - this.releaseNote = releaseNote; + generatorSettingsBuilder.withReleaseNote(releaseNote); return this; } - public String getHttpUserAgent() { - return httpUserAgent; - } - - public CodegenConfigurator setHttpUserAgent(String httpUserAgent) { - this.httpUserAgent = httpUserAgent; + public CodegenConfigurator setRemoveOperationIdPrefix(boolean removeOperationIdPrefix) { + workflowSettingsBuilder.withRemoveOperationIdPrefix(removeOperationIdPrefix); return this; } - public Map getReservedWordsMappings() { - return reservedWordMappings; - } - - public CodegenConfigurator setReservedWordsMappings(Map reservedWordsMappings) { - this.reservedWordMappings = reservedWordsMappings; + public CodegenConfigurator setReservedWordsMappings(Map reservedWordMappings) { + generatorSettingsBuilder.withReservedWordMappings(reservedWordMappings); return this; } - public CodegenConfigurator addAdditionalReservedWordMapping(String key, String value) { - this.reservedWordMappings.put(key, value); + public CodegenConfigurator setSkipOverwrite(boolean skipOverwrite) { + workflowSettingsBuilder.withSkipOverwrite(skipOverwrite); return this; } - public String getIgnoreFileOverride() { - return ignoreFileOverride; - } - - public CodegenConfigurator setIgnoreFileOverride(final String ignoreFileOverride) { - this.ignoreFileOverride = ignoreFileOverride; + public CodegenConfigurator setStrictSpecBehavior(boolean strictSpecBehavior) { + workflowSettingsBuilder.withStrictSpecBehavior(strictSpecBehavior); return this; } - public ClientOptInput toClientOptInput() { + public CodegenConfigurator setSystemProperties(Map systemProperties) { + workflowSettingsBuilder.withSystemProperties(systemProperties); + return this; + } + public CodegenConfigurator setTemplateDir(String templateDir) { + workflowSettingsBuilder.withTemplateDir(templateDir); + return this; + } + + public CodegenConfigurator setTemplatingEngineName(String templatingEngineName) { + this.templatingEngineName = templatingEngineName; + workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); + return this; + } + + public CodegenConfigurator setTypeMappings(Map typeMappings) { + generatorSettingsBuilder.withTypeMappings(typeMappings); + return this; + } + + public CodegenConfigurator setValidateSpec(final boolean validateSpec) { + workflowSettingsBuilder.withValidateSpec(validateSpec); + return this; + } + + public CodegenConfigurator setVerbose(boolean verbose) { + workflowSettingsBuilder.withVerbose(verbose); + return this; + } + + @SuppressWarnings("WeakerAccess") + public Context toContext() { Validate.notEmpty(generatorName, "language/generatorName must be specified"); Validate.notEmpty(inputSpec, "input spec must be specified"); - setVerboseFlags(); - setSystemProperties(); - - CodegenConfig config = CodegenConfigLoader.forName(generatorName); - - config.setInputSpec(inputSpec); - config.setOutputDir(outputDir); - config.setSkipOverwrite(skipOverwrite); - config.setIgnoreFilePathOverride(ignoreFileOverride); - config.setRemoveOperationIdPrefix(removeOperationIdPrefix); - config.setEnablePostProcessFile(enablePostProcessFile); - config.setEnableMinimalUpdate(enableMinimalUpdate); - - config.instantiationTypes().putAll(instantiationTypes); - config.typeMapping().putAll(typeMappings); - config.importMapping().putAll(importMappings); - config.languageSpecificPrimitives().addAll(languageSpecificPrimitives); - config.reservedWordsMappings().putAll(reservedWordMappings); - - config.setStrictSpecBehavior(isStrictSpecBehavior()); - - checkAndSetAdditionalProperty(apiPackage, CodegenConstants.API_PACKAGE); - checkAndSetAdditionalProperty(modelPackage, CodegenConstants.MODEL_PACKAGE); - checkAndSetAdditionalProperty(invokerPackage, CodegenConstants.INVOKER_PACKAGE); - checkAndSetAdditionalProperty(packageName, CodegenConstants.PACKAGE_NAME); - checkAndSetAdditionalProperty(groupId, CodegenConstants.GROUP_ID); - checkAndSetAdditionalProperty(artifactId, CodegenConstants.ARTIFACT_ID); - checkAndSetAdditionalProperty(artifactVersion, CodegenConstants.ARTIFACT_VERSION); - checkAndSetAdditionalProperty(templateDir, toAbsolutePathStr(templateDir), - CodegenConstants.TEMPLATE_DIR); - checkAndSetAdditionalProperty(templatingEngineName, CodegenConstants.TEMPLATING_ENGINE); - checkAndSetAdditionalProperty(modelNamePrefix, CodegenConstants.MODEL_NAME_PREFIX); - checkAndSetAdditionalProperty(modelNameSuffix, CodegenConstants.MODEL_NAME_SUFFIX); - checkAndSetAdditionalProperty(gitUserId, CodegenConstants.GIT_USER_ID); - checkAndSetAdditionalProperty(gitRepoId, CodegenConstants.GIT_REPO_ID); - checkAndSetAdditionalProperty(releaseNote, CodegenConstants.RELEASE_NOTE); - checkAndSetAdditionalProperty(httpUserAgent, CodegenConstants.HTTP_USER_AGENT); - - handleDynamicProperties(config); - - if (isNotEmpty(library)) { - config.setLibrary(library); - } - - String templatingEngineId; if (isEmpty(templatingEngineName)) { // Built-in templates are mustache, but allow users to use a simplified handlebars engine for their custom templates. - templatingEngineId = "mustache"; + workflowSettingsBuilder.withTemplatingEngineName("mustache"); + } else { + workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); } - else { templatingEngineId = templatingEngineName; } - TemplatingEngineAdapter templatingEngine = TemplatingEngineLoader.byIdentifier(templatingEngineId); - config.setTemplatingEngine(templatingEngine); + // at this point, all "additionalProperties" are set, and are now immutable per GeneratorSettings instance. + GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); + WorkflowSettings workflowSettings = workflowSettingsBuilder.build(); - config.additionalProperties().putAll(additionalProperties); + if (workflowSettings.isVerbose()) { + LOGGER.info("\nVERBOSE MODE: ON. Additional debug options are injected" + + "\n - [debugOpenAPI] prints the OpenAPI specification as interpreted by the codegen" + + "\n - [debugModels] prints models passed to the template engine" + + "\n - [debugOperations] prints operations passed to the template engine" + + "\n - [debugSupportingFiles] prints additional data passed to the template engine"); - ClientOptInput input = new ClientOptInput().config(config); + GlobalSettings.setProperty("debugOpenAPI", ""); + GlobalSettings.setProperty("debugModels", ""); + GlobalSettings.setProperty("debugOperations", ""); + GlobalSettings.setProperty("debugSupportingFiles", ""); + } - final List authorizationValues = AuthParser.parse(auth); + for (Map.Entry entry : workflowSettings.getSystemProperties().entrySet()) { + GlobalSettings.setProperty(entry.getKey(), entry.getValue()); + } + + // TODO: Support custom spec loader implementations (https://github.com/OpenAPITools/openapi-generator/issues/844) + final List authorizationValues = AuthParser.parse(this.auth); ParseOptions options = new ParseOptions(); options.setResolve(true); SwaggerParseResult result = new OpenAPIParser().readLocation(inputSpec, authorizationValues, options); + // TODO: Move custom validations to a separate type as part of a "Workflow" Set validationMessages = new HashSet<>(result.getMessages()); OpenAPI specification = result.getOpenAPI(); @@ -598,12 +393,10 @@ public class CodegenConfigurator implements Serializable { } } - if (this.isValidateSpec()) { - StringBuilder sb = new StringBuilder(); - sb.append( - "There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI)."); - sb.append(System.lineSeparator()); - SpecValidationException ex = new SpecValidationException(sb.toString()); + if (workflowSettings.isValidateSpec()) { + String sb = "There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI)." + + System.lineSeparator(); + SpecValidationException ex = new SpecValidationException(sb); ex.setErrors(validationMessages); ex.setWarnings(warnings); throw ex; @@ -626,95 +419,44 @@ public class CodegenConfigurator implements Serializable { } } - input.opts(new ClientOpts()).openAPI(specification); - - return input; + return new Context<>(specification, generatorSettings, workflowSettings); } - @JsonAnySetter public CodegenConfigurator addDynamicProperty(String name, Object value) { - dynamicProperties.put(name, value); - return this; - } + public ClientOptInput toClientOptInput() { + CodegenConfig config = CodegenConfigLoader.forName(generatorName); - @JsonAnyGetter public Map getDynamicProperties() { - return dynamicProperties; - } + Context context = toContext(); + WorkflowSettings workflowSettings = context.getWorkflowSettings(); + GeneratorSettings generatorSettings = context.getGeneratorSettings(); - private void handleDynamicProperties(CodegenConfig codegenConfig) { - for (CliOption langCliOption : codegenConfig.cliOptions()) { - String opt = langCliOption.getOpt(); - if (dynamicProperties.containsKey(opt)) { - codegenConfig.additionalProperties().put(opt, dynamicProperties.get(opt)); - } else if (systemProperties.containsKey(opt)) { - codegenConfig.additionalProperties().put(opt, systemProperties.get(opt)); - } - } - } - - private void setVerboseFlags() { - if (!verbose) { - return; - } - LOGGER.info("\nVERBOSE MODE: ON. Additional debug options are injected" - + "\n - [debugOpenAPI] prints the OpenAPI specification as interpreted by the codegen" - + "\n - [debugModels] prints models passed to the template engine" - + "\n - [debugOperations] prints operations passed to the template engine" - + "\n - [debugSupportingFiles] prints additional data passed to the template engine"); - - GeneratorProperties.setProperty("debugOpenAPI", ""); - GeneratorProperties.setProperty("debugModels", ""); - GeneratorProperties.setProperty("debugOperations", ""); - GeneratorProperties.setProperty("debugSupportingFiles", ""); - } - - private void setSystemProperties() { - for (Map.Entry entry : systemProperties.entrySet()) { - GeneratorProperties.setProperty(entry.getKey(), entry.getValue()); - } - } - - private static String toAbsolutePathStr(String path) { - if (isNotEmpty(path)) { - return Paths.get(path).toAbsolutePath().toString(); + if (isNotEmpty(generatorSettings.getLibrary())) { + config.setLibrary(generatorSettings.getLibrary()); } - return path; + // TODO: Work toward CodegenConfig having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. + config.setInputSpec(workflowSettings.getInputSpec()); + config.setOutputDir(workflowSettings.getOutputDir()); + config.setSkipOverwrite(workflowSettings.isSkipOverwrite()); + config.setIgnoreFilePathOverride(workflowSettings.getIgnoreFileOverride()); + config.setRemoveOperationIdPrefix(workflowSettings.isRemoveOperationIdPrefix()); + config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); + config.setEnableMinimalUpdate(workflowSettings.isEnableMinimalUpdate()); + config.setStrictSpecBehavior(workflowSettings.isStrictSpecBehavior()); - } + TemplatingEngineAdapter templatingEngine = TemplatingEngineLoader.byIdentifier(workflowSettings.getTemplatingEngineName()); + config.setTemplatingEngine(templatingEngine); - private void checkAndSetAdditionalProperty(String property, String propertyKey) { - checkAndSetAdditionalProperty(property, property, propertyKey); - } + // TODO: Work toward CodegenConfig having a "GeneratorSettings" property. + config.instantiationTypes().putAll(generatorSettings.getInstantiationTypes()); + config.typeMapping().putAll(generatorSettings.getTypeMappings()); + config.importMapping().putAll(generatorSettings.getImportMappings()); + config.languageSpecificPrimitives().addAll(generatorSettings.getLanguageSpecificPrimitives()); + config.reservedWordsMappings().putAll(generatorSettings.getReservedWordMappings()); + config.additionalProperties().putAll(generatorSettings.getAdditionalProperties()); - private void checkAndSetAdditionalProperty(String property, String valueToSet, - String propertyKey) { - if (isNotEmpty(property)) { - additionalProperties.put(propertyKey, valueToSet); - } - } + ClientOptInput input = new ClientOptInput() + .config(config); - public static CodegenConfigurator fromFile(String configFile) { - - if (isNotEmpty(configFile)) { - ObjectMapper mapper; - - if (FilenameUtils.isExtension(configFile, new String[] {"yml", "yaml"})) { - mapper = Yaml.mapper(); - } else { - mapper = Json.mapper(); - } - - try { - return mapper.readValue(new File(configFile), CodegenConfigurator.class); - } catch (IOException ex) { - LOGGER.error("Unable to deserialize config file: " + configFile, ex); - } - } - return null; - } - - public CodegenConfigurator setTemplatingEngineName(String templatingEngineName) { - this.templatingEngineName = templatingEngineName; - return this; + return input.openAPI((OpenAPI)context.getSpecDocument()); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java new file mode 100644 index 00000000000..60164226f29 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java @@ -0,0 +1,77 @@ +package org.openapitools.codegen.config; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Represents a serialization helper of {@link GeneratorSettings} and {@link WorkflowSettings}. When used to deserialize any available Jackson binding input, + * this will accumulate any "unknown properties" into {@link GeneratorSettings#getAdditionalProperties()} as a side effect of calling + * {@link DynamicSettings#getGeneratorSettings()}. + */ +@SuppressWarnings({"unused", "WeakerAccess"}) +public class DynamicSettings { + @JsonAnySetter + private Map dynamicProperties = new HashMap<>(); + + @JsonUnwrapped + @JsonDeserialize(builder = GeneratorSettings.Builder.class) + private GeneratorSettings generatorSettings; + + @JsonUnwrapped + @JsonDeserialize(builder = WorkflowSettings.Builder.class) + private WorkflowSettings workflowSettings; + + /** + * Gets the {@link GeneratorSettings} included in the config object. + * + * @return A new instance of settings + */ + public GeneratorSettings getGeneratorSettings() { + excludeSettingsFromDynamicProperties(); + return GeneratorSettings.newBuilder(generatorSettings) + .withAdditionalProperties(dynamicProperties) + .build(); + } + + /** + * Gets the {@link WorkflowSettings} included in the config object. + * + * @return A new instance of settings + */ + public WorkflowSettings getWorkflowSettings() { + excludeSettingsFromDynamicProperties(); + return WorkflowSettings.newBuilder(workflowSettings) + .build(); + } + + @JsonCreator + public DynamicSettings() { } + + /** + * Gets all "custom" properties included in the config object. + * + * @return All user-specified custom properties. + */ + public Map getDynamicProperties() { + return dynamicProperties; + } + + private void excludeSettingsFromDynamicProperties(){ + Set fieldNames = new HashSet<>(); + for (Field field : GeneratorSettings.class.getDeclaredFields()) { + fieldNames.add(field.getName()); + } + for (Field field : WorkflowSettings.class.getDeclaredFields()) { + fieldNames.add(field.getName()); + } + dynamicProperties.keySet().removeAll(fieldNames); + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GeneratorProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java similarity index 85% rename from modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GeneratorProperties.java rename to modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java index 97fcb07f2a5..0f078821024 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GeneratorProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java @@ -19,14 +19,17 @@ package org.openapitools.codegen.config; import java.util.Properties; /** - * GeneratorProperties encapsulates SystemProperties, since the codegen mechanism heavily relies on a stable, + * GlobalSettings encapsulates SystemProperties, since the codegen mechanism heavily relies on a stable, * non-changing System Property Basis. Using plain System.(get|set|clear)Property raises Race-Conditions in combination * with Code, that uses System.setProperties (e.g. maven-surefire-plugin). + * + * This provides a set of properties specific to the executing thread, such that the generator may not modify system properties + * consumed by other threads. * * @author gndrm * @since 2018 */ -public class GeneratorProperties { +public class GlobalSettings { private static ThreadLocal properties = new InheritableThreadLocal() { @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java index 7ceeece3fa9..d44daedd70b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java @@ -21,7 +21,7 @@ import io.swagger.v3.oas.models.Operation; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,8 +46,8 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen { invokerPackage = "org.openapitools.controllers"; artifactId = "openapi-inflector-server"; dateLibrary = "legacy"; //TODO: add joda support - apiPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.apipackage", "org.openapitools.controllers"); - modelPackage = GeneratorProperties.getProperty("swagger.codegen.inflector.modelpackage", "org.openapitools.model"); + apiPackage = GlobalSettings.getProperty("swagger.codegen.inflector.apipackage", "org.openapitools.controllers"); + modelPackage = GlobalSettings.getProperty("swagger.codegen.inflector.modelpackage", "org.openapitools.model"); // clear model and api doc template as this codegen // does not support auto-generated markdown doc at the moment diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index ef6b005fb0b..47df13f7295 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -19,7 +19,7 @@ package org.openapitools.codegen.languages; import org.apache.commons.lang3.BooleanUtils; import org.openapitools.codegen.*; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,17 +58,17 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen { modelDocTemplateFiles.remove("model_doc.mustache"); apiDocTemplateFiles.remove("api_doc.mustache"); - if(GeneratorProperties.getProperty("swagger.codegen.undertow.apipackage") != null && GeneratorProperties.getProperty("openapi.codegen.undertow.apipackage") == null) { + if(GlobalSettings.getProperty("swagger.codegen.undertow.apipackage") != null && GlobalSettings.getProperty("openapi.codegen.undertow.apipackage") == null) { LOGGER.warn("System property 'swagger.codegen.undertow.apipackage' was renamed to 'swagger.codegen.undertow.apipackage'"); - apiPackage = GeneratorProperties.getProperty("swagger.codegen.undertow.apipackage", "org.openapitools.handler"); + apiPackage = GlobalSettings.getProperty("swagger.codegen.undertow.apipackage", "org.openapitools.handler"); } else { - apiPackage = GeneratorProperties.getProperty("openapi.codegen.undertow.apipackage", "org.openapitools.handler"); + apiPackage = GlobalSettings.getProperty("openapi.codegen.undertow.apipackage", "org.openapitools.handler"); } - if(GeneratorProperties.getProperty("swagger.codegen.undertow.modelpackage") != null && GeneratorProperties.getProperty("openapi.codegen.undertow.modelpackage") == null) { + if(GlobalSettings.getProperty("swagger.codegen.undertow.modelpackage") != null && GlobalSettings.getProperty("openapi.codegen.undertow.modelpackage") == null) { LOGGER.warn("System property 'swagger.codegen.undertow.modelpackage' was renamed to 'openapi.codegen.undertow.modelpackage'"); - modelPackage = GeneratorProperties.getProperty("swagger.codegen.undertow.modelpackage", "org.openapitools.model"); + modelPackage = GlobalSettings.getProperty("swagger.codegen.undertow.modelpackage", "org.openapitools.model"); } else { - modelPackage = GeneratorProperties.getProperty("openapi.codegen.undertow.modelpackage", "org.openapitools.model"); + modelPackage = GlobalSettings.getProperty("openapi.codegen.undertow.modelpackage", "org.openapitools.model"); } additionalProperties.put("title", title); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java index 896f0837e57..2dd724f77f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java @@ -27,7 +27,7 @@ import io.swagger.v3.oas.models.PathItem.HttpMethod; import io.swagger.v3.oas.models.Paths; import io.swagger.v3.oas.models.info.Info; import org.openapitools.codegen.*; -import org.openapitools.codegen.config.GeneratorProperties; +import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -340,7 +340,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig } writeOptional(outputFolder, new SupportingFile("package.mustache", "", "package.json")); writeOptional(outputFolder, new SupportingFile("README.mustache", "", "README.md")); - if (GeneratorProperties.getProperty("noservice") == null) { + if (GlobalSettings.getProperty("noservice") == null) { apiTemplateFiles.put( "service.mustache", // the template to use "Service.js"); // the extension for each file to write diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 814035e9e81..15c29299696 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -42,7 +42,10 @@ import java.util.stream.Collectors; public class ModelUtils { private static final Logger LOGGER = LoggerFactory.getLogger(ModelUtils.class); + private static final String URI_FORMAT = "uri"; + + // TODO: Use GlobalSettings for all static/global properties in a more thread-safe way. private static boolean generateAliasAsModel = false; public static void setGenerateAliasAsModel(boolean value) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/AbstractIntegrationTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/AbstractIntegrationTest.java index 518f6fee879..fc9b05521c4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/AbstractIntegrationTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/AbstractIntegrationTest.java @@ -58,13 +58,12 @@ public abstract class AbstractIntegrationTest { CodegenConfig codegenConfig = getCodegenConfig(); codegenConfig.setOutputDir(integrationTestPathsConfig.getOutputPath().toString()); codegenConfig.setIgnoreFilePathOverride(integrationTestPathsConfig.getIgnoreFilePath().toFile().toString()); - ClientOpts clientOpts = new ClientOpts(); - clientOpts.setProperties(configProperties()); ClientOptInput opts = new ClientOptInput() .config(codegenConfig) - .opts(clientOpts) .openAPI(openAPI); + codegenConfig.additionalProperties().putAll(configProperties()); + codeGen.opts(opts).generate(); assertPathEqualsRecursively(integrationTestPathsConfig.getExpectedPath(), integrationTestPathsConfig.getOutputPath()); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java index 89ebd814187..e8097915a0f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java @@ -31,7 +31,6 @@ public class DefaultGeneratorTest { ClientOptInput opts = new ClientOptInput(); opts.setOpenAPI(openAPI); opts.setConfig(new DefaultCodegen()); - opts.setOpts(new ClientOpts()); DefaultGenerator generator = new DefaultGenerator(); generator.opts(opts); @@ -62,7 +61,6 @@ public class DefaultGeneratorTest { CodegenConfig config = new DefaultCodegen(); config.setStrictSpecBehavior(false); opts.setConfig(config); - opts.setOpts(new ClientOpts()); DefaultGenerator generator = new DefaultGenerator(); generator.opts(opts); @@ -85,7 +83,6 @@ public class DefaultGeneratorTest { DefaultCodegen codegen = new DefaultCodegen(); codegen.setEnableMinimalUpdate(true); opts.setConfig(codegen); - opts.setOpts(new ClientOpts()); DefaultGenerator generator = new DefaultGenerator(); generator.opts(opts); File testPath = new File("temp/overwrite.test"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/DynamicSettingsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/DynamicSettingsTest.java new file mode 100644 index 00000000000..062f906743f --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/DynamicSettingsTest.java @@ -0,0 +1,107 @@ +package org.openapitools.codegen.config; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.guava.GuavaModule; +import io.swagger.v3.core.util.Yaml; +import org.testng.annotations.Test; + +import java.io.File; + +import static org.testng.Assert.*; + +public class DynamicSettingsTest { + + @Test + public void tesDynamicSettingsWithDynamicProperties() throws Exception { + ObjectMapper mapper = Yaml.mapper(); + mapper.registerModule(new GuavaModule()); + + String spec = + "gemName: 'petstore'" + System.lineSeparator() + + "moduleName: 'Petstore'" + System.lineSeparator() + + "gemVersion: '1.0.0'" + System.lineSeparator() + + "apiPackage: 'testing'" + System.lineSeparator(); + + DynamicSettings dynamicSettings = mapper.readValue(spec, DynamicSettings.class); + GeneratorSettings generatorSettings = dynamicSettings.getGeneratorSettings(); + WorkflowSettings workflowSettings = dynamicSettings.getWorkflowSettings(); + + assertNotNull(dynamicSettings); + assertNotNull(generatorSettings); + assertNotNull(workflowSettings); + + assertEquals(generatorSettings.getApiPackage(), "testing"); + assertEquals(generatorSettings.getAdditionalProperties().size(), 7); + assertEquals(generatorSettings.getAdditionalProperties().get("gemName"), "petstore"); + assertEquals(generatorSettings.getAdditionalProperties().get("moduleName"), "Petstore"); + assertEquals(generatorSettings.getAdditionalProperties().get("gemVersion"), "1.0.0"); + assertEquals(generatorSettings.getAdditionalProperties().get("apiPackage"), "testing"); + assertEquals(generatorSettings.getAdditionalProperties().get("gitUserId"), "GIT_USER_ID"); + assertEquals(generatorSettings.getAdditionalProperties().get("gitRepoId"), "GIT_REPO_ID"); + assertEquals(generatorSettings.getAdditionalProperties().get("releaseNote"), "Minor update"); + } + + @Test + public void testDynamicSettingsWithBuilderSideEffects() throws Exception { + ObjectMapper mapper = Yaml.mapper(); + mapper.registerModule(new GuavaModule()); + + // example here is that templateDir is intended to provide the _full_ absolute path + String input = "."; + File current = new File(input); + + // sanity + assertTrue(current.exists()); + assertTrue(current.isDirectory()); + + String spec = + "generatorName: none" + System.lineSeparator() + + "templateDir: '" + input + "'" + System.lineSeparator(); + + DynamicSettings dynamicSettings = mapper.readValue(spec, DynamicSettings.class); + GeneratorSettings generatorSettings = dynamicSettings.getGeneratorSettings(); + WorkflowSettings workflowSettings = dynamicSettings.getWorkflowSettings(); + + assertNotNull(dynamicSettings); + assertNotNull(generatorSettings); + assertNotNull(workflowSettings); + + assertEquals(generatorSettings.getGeneratorName(), "none"); + assertEquals(workflowSettings.getTemplateDir(), current.getAbsolutePath()); + assertNotEquals(workflowSettings.getTemplateDir(), input); + + assertEquals(generatorSettings.getAdditionalProperties().size(), 3); + assertEquals(generatorSettings.getAdditionalProperties().get("gitUserId"), "GIT_USER_ID"); + assertEquals(generatorSettings.getAdditionalProperties().get("gitRepoId"), "GIT_REPO_ID"); + assertEquals(generatorSettings.getAdditionalProperties().get("releaseNote"), "Minor update"); + } + + @Test + public void testDynamicSettingsSetsConstructorDefaultsOnDeserialization() throws Exception { + ObjectMapper mapper = Yaml.mapper(); + mapper.registerModule(new GuavaModule()); + + String gitUserId = "openapitools"; + String spec = + "supportPython2: true" + System.lineSeparator() + + "gitUserId: '" + gitUserId + "'" + System.lineSeparator(); + + DynamicSettings dynamicSettings = mapper.readValue(spec, DynamicSettings.class); + GeneratorSettings generatorSettings = dynamicSettings.getGeneratorSettings(); + WorkflowSettings workflowSettings = dynamicSettings.getWorkflowSettings(); + + assertNotNull(dynamicSettings); + assertNotNull(generatorSettings); + assertNotNull(workflowSettings); + + assertEquals(generatorSettings.getGitUserId(), gitUserId); + assertEquals(generatorSettings.getGitRepoId(), "GIT_REPO_ID"); + assertEquals(generatorSettings.getReleaseNote(), "Minor update"); + + assertEquals(generatorSettings.getAdditionalProperties().size(), 4); + assertEquals(generatorSettings.getAdditionalProperties().get("supportPython2"), true); + assertEquals(generatorSettings.getAdditionalProperties().get("gitUserId"), gitUserId); + assertEquals(generatorSettings.getAdditionalProperties().get("gitRepoId"), "GIT_REPO_ID"); + assertEquals(generatorSettings.getAdditionalProperties().get("releaseNote"), "Minor update"); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 68c556e5b09..b024583a08d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -329,10 +329,6 @@ public class JavaClientCodegenTest { clientOptInput.setOpenAPI(openAPI); clientOptInput.setConfig(new JavaClientCodegen()); - final ClientOpts clientOpts = new ClientOpts(); - clientOpts.setProperties(Collections.emptyMap()); - clientOptInput.setOpts(clientOpts); - defaultGenerator.opts(clientOptInput); final List codegenOperations = defaultGenerator.processPaths(openAPI.getPaths()).get("Pet"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java index 339fc73c11b..074bf94c1c7 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java @@ -1280,7 +1280,6 @@ public class JavaModelTest { final ClientOptInput opts = new ClientOptInput(); opts.setConfig(config); opts.setOpenAPI(openAPI); - opts.setOpts(new ClientOpts()); new DefaultGenerator().opts(opts).generate(); File orderFile = new File(output, "src/main/java/org/openapitools/client/api/DefaultApi.java"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java index 273229f6300..d8260487034 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java @@ -369,11 +369,9 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { .getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -448,13 +446,11 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFExtServerFeatures.GENERATE_OPERATION_BODY, "true"); + codegen.additionalProperties().put(CXFExtServerFeatures.GENERATE_OPERATION_BODY, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -494,14 +490,12 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFExtServerFeatures.GENERATE_OPERATION_BODY, "true"); - opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(CXFExtServerFeatures.GENERATE_OPERATION_BODY, "true"); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java index e76f0bf6fe9..0b782aa3c4e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java @@ -5,7 +5,6 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.ClientOpts; import org.openapitools.codegen.MockDefaultGenerator; import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen; import org.openapitools.codegen.languages.features.CXFServerFeatures; @@ -33,13 +32,11 @@ public abstract class JavaJaxrsBaseTest { .readLocation("src/test/resources/3_0/generic.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -75,13 +72,11 @@ public abstract class JavaJaxrsBaseTest { .readLocation("src/test/resources/3_0/generic.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -112,13 +107,11 @@ public abstract class JavaJaxrsBaseTest { .readLocation("src/test/resources/3_0/arrayParameter.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -138,13 +131,11 @@ public abstract class JavaJaxrsBaseTest { openAPI.getComponents().getParameters().get("operationsQueryParam").setSchema(new StringSchema()._default("default")); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); - opts.getProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java index 6d2ac1c23e7..9fda8ba592d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java @@ -3,7 +3,6 @@ package org.openapitools.codegen.java.jaxrs; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.ClientOpts; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.MockDefaultGenerator; @@ -97,11 +96,9 @@ public class JavaJerseyServerCodegenTest extends JavaJaxrsBaseTest { ((JavaJerseyServerCodegen) codegen).setUseTags(false); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); @@ -176,11 +173,9 @@ public class JavaJerseyServerCodegenTest extends JavaJaxrsBaseTest { ((JavaJerseyServerCodegen) codegen).setUseTags(true); codegen.setOutputDir(output.getAbsolutePath()); - ClientOpts opts = new ClientOpts(); ClientOptInput input = new ClientOptInput(); input.setOpenAPI(openAPI); input.setConfig(codegen); - input.setOpts(opts); MockDefaultGenerator generator = new MockDefaultGenerator(); generator.opts(input).generate(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java index b0a5bf59604..922c8c4b520 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java @@ -53,7 +53,7 @@ public class RubyClientCodegenTest { CodegenConfig codegenConfig = new RubyClientCodegen(); codegenConfig.setOutputDir(output.getAbsolutePath()); - ClientOptInput clientOptInput = new ClientOptInput().opts(new ClientOpts()).openAPI(openAPI).config(codegenConfig); + ClientOptInput clientOptInput = new ClientOptInput().openAPI(openAPI).config(codegenConfig); DefaultGenerator generator = new DefaultGenerator(); List files = generator.opts(clientOptInput).generate(); @@ -117,7 +117,7 @@ public class RubyClientCodegenTest { CodegenConfig codegenConfig = new RubyClientCodegen(); codegenConfig.setOutputDir(output.getAbsolutePath()); - ClientOptInput clientOptInput = new ClientOptInput().opts(new ClientOpts()).openAPI(openAPI).config(codegenConfig); + ClientOptInput clientOptInput = new ClientOptInput().openAPI(openAPI).config(codegenConfig); DefaultGenerator generator = new DefaultGenerator(); List files = generator.opts(clientOptInput).generate(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java index 45e8e2e1b63..a8d3853b590 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -58,7 +58,7 @@ public class EnumArrays { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -96,7 +96,7 @@ public class EnumArrays { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumClass.java index e757f452e94..662427bb0ad 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumClass.java @@ -52,7 +52,7 @@ public enum EnumClass { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java index 8f94eabb281..54603549196 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java @@ -59,7 +59,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -99,7 +99,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -137,7 +137,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -175,7 +175,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java index a73986fa652..c140f59e870 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java @@ -62,7 +62,7 @@ public class MapTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java index 875c0fec717..2879cd2f5aa 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java @@ -71,7 +71,7 @@ public class Order { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterEnum.java index 82330046329..46c0003b4e6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -52,7 +52,7 @@ public enum OuterEnum { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java index 502673e1550..2bcbda44b2a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java @@ -77,7 +77,7 @@ public class Pet { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java index 03bcbcbd1fb..cb8d45860ae 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -59,7 +59,7 @@ public class EnumArrays { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -97,7 +97,7 @@ public class EnumArrays { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumClass.java index 5633f028051..a4cc808868d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumClass.java @@ -53,7 +53,7 @@ public enum EnumClass { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java index d7c41d30174..bdf61d52c93 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -60,7 +60,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -100,7 +100,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -138,7 +138,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @@ -176,7 +176,7 @@ public class EnumTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java index c47f0375752..625b6be97dd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java @@ -63,7 +63,7 @@ public class MapTest { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java index 3a7801b65b0..c6cee16a580 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java @@ -72,7 +72,7 @@ public class Order { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterEnum.java index f83b0c95877..dacbbdfb2c9 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -53,7 +53,7 @@ public enum OuterEnum { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java index f604115ce98..8a2408a296a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java @@ -78,7 +78,7 @@ public class Pet { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } diff --git a/samples/openapi3/client/petstore/ruby/README.md b/samples/openapi3/client/petstore/ruby/README.md index 6fb930ed9a8..6be30fc3115 100644 --- a/samples/openapi3/client/petstore/ruby/README.md +++ b/samples/openapi3/client/petstore/ruby/README.md @@ -139,6 +139,12 @@ Class | Method | HTTP request | Description - [Petstore::FormatTest](docs/FormatTest.md) - [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Petstore::HealthCheckResult](docs/HealthCheckResult.md) + - [Petstore::InlineObject](docs/InlineObject.md) + - [Petstore::InlineObject1](docs/InlineObject1.md) + - [Petstore::InlineObject2](docs/InlineObject2.md) + - [Petstore::InlineObject3](docs/InlineObject3.md) + - [Petstore::InlineObject4](docs/InlineObject4.md) + - [Petstore::InlineObject5](docs/InlineObject5.md) - [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md) - [Petstore::List](docs/List.md) - [Petstore::MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject.md new file mode 100644 index 00000000000..f5211d44464 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Updated name of the pet | [optional] +**status** | **String** | Updated status of the pet | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject.new(name: null, + status: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject1.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject1.md new file mode 100644 index 00000000000..bac17e753cd --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject1.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**file** | **File** | file to upload | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject1.new(additional_metadata: null, + file: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject2.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject2.md new file mode 100644 index 00000000000..31118c5b262 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject2.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_form_string_array** | **Array<String>** | Form parameter enum test (string array) | [optional] +**enum_form_string** | **String** | Form parameter enum test (string) | [optional] [default to '-efg'] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject2.new(enum_form_string_array: null, + enum_form_string: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject3.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject3.md new file mode 100644 index 00000000000..b6cb7ccb29b --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject3.md @@ -0,0 +1,43 @@ +# Petstore::InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | None | [optional] +**int32** | **Integer** | None | [optional] +**int64** | **Integer** | None | [optional] +**number** | **Float** | None | +**float** | **Float** | None | [optional] +**double** | **Float** | None | +**string** | **String** | None | [optional] +**pattern_without_delimiter** | **String** | None | +**byte** | **String** | None | +**binary** | **File** | None | [optional] +**date** | **Date** | None | [optional] +**date_time** | **DateTime** | None | [optional] +**password** | **String** | None | [optional] +**callback** | **String** | None | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject3.new(integer: null, + int32: null, + int64: null, + number: null, + float: null, + double: null, + string: null, + pattern_without_delimiter: null, + byte: null, + binary: null, + date: null, + date_time: null, + password: null, + callback: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject4.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject4.md new file mode 100644 index 00000000000..97179c3e377 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject4.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **String** | field1 | +**param2** | **String** | field2 | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject4.new(param: null, + param2: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/docs/InlineObject5.md b/samples/openapi3/client/petstore/ruby/docs/InlineObject5.md new file mode 100644 index 00000000000..23c1df99ffe --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/docs/InlineObject5.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**required_file** | **File** | file to upload | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject5.new(additional_metadata: null, + required_file: null) +``` + + diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore.rb b/samples/openapi3/client/petstore/ruby/lib/petstore.rb index 822ea45c06a..12ff44084b3 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore.rb @@ -40,6 +40,12 @@ require 'petstore/models/foo' require 'petstore/models/format_test' require 'petstore/models/has_only_read_only' require 'petstore/models/health_check_result' +require 'petstore/models/inline_object' +require 'petstore/models/inline_object1' +require 'petstore/models/inline_object2' +require 'petstore/models/inline_object3' +require 'petstore/models/inline_object4' +require 'petstore/models/inline_object5' require 'petstore/models/inline_response_default' require 'petstore/models/list' require 'petstore/models/map_test' diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb new file mode 100644 index 00000000000..3fc98931783 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb @@ -0,0 +1,207 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject + # Updated name of the pet + attr_accessor :name + + # Updated status of the pet + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'status' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb new file mode 100644 index 00000000000..e61b19c09b0 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb @@ -0,0 +1,207 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject1 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'file' => :'file' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'file' => :'File' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + file == o.file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb new file mode 100644 index 00000000000..50514beacec --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb @@ -0,0 +1,245 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject2 + # Form parameter enum test (string array) + attr_accessor :enum_form_string_array + + # Form parameter enum test (string) + attr_accessor :enum_form_string + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enum_form_string_array' => :'enum_form_string_array', + :'enum_form_string' => :'enum_form_string' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'enum_form_string_array' => :'Array', + :'enum_form_string' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enum_form_string_array') + if (value = attributes[:'enum_form_string_array']).is_a?(Array) + self.enum_form_string_array = value + end + end + + if attributes.key?(:'enum_form_string') + self.enum_form_string = attributes[:'enum_form_string'] + else + self.enum_form_string = '-efg' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + enum_form_string_validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + return false unless enum_form_string_validator.valid?(@enum_form_string) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] enum_form_string Object to be assigned + def enum_form_string=(enum_form_string) + validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + unless validator.valid?(enum_form_string) + fail ArgumentError, "invalid value for \"enum_form_string\", must be one of #{validator.allowable_values}." + end + @enum_form_string = enum_form_string + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enum_form_string_array == o.enum_form_string_array && + enum_form_string == o.enum_form_string + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enum_form_string_array, enum_form_string].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb new file mode 100644 index 00000000000..15245d845c6 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb @@ -0,0 +1,528 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject3 + # None + attr_accessor :integer + + # None + attr_accessor :int32 + + # None + attr_accessor :int64 + + # None + attr_accessor :number + + # None + attr_accessor :float + + # None + attr_accessor :double + + # None + attr_accessor :string + + # None + attr_accessor :pattern_without_delimiter + + # None + attr_accessor :byte + + # None + attr_accessor :binary + + # None + attr_accessor :date + + # None + attr_accessor :date_time + + # None + attr_accessor :password + + # None + attr_accessor :callback + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'integer' => :'integer', + :'int32' => :'int32', + :'int64' => :'int64', + :'number' => :'number', + :'float' => :'float', + :'double' => :'double', + :'string' => :'string', + :'pattern_without_delimiter' => :'pattern_without_delimiter', + :'byte' => :'byte', + :'binary' => :'binary', + :'date' => :'date', + :'date_time' => :'dateTime', + :'password' => :'password', + :'callback' => :'callback' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'integer' => :'Integer', + :'int32' => :'Integer', + :'int64' => :'Integer', + :'number' => :'Float', + :'float' => :'Float', + :'double' => :'Float', + :'string' => :'String', + :'pattern_without_delimiter' => :'String', + :'byte' => :'String', + :'binary' => :'File', + :'date' => :'Date', + :'date_time' => :'DateTime', + :'password' => :'String', + :'callback' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'integer') + self.integer = attributes[:'integer'] + end + + if attributes.key?(:'int32') + self.int32 = attributes[:'int32'] + end + + if attributes.key?(:'int64') + self.int64 = attributes[:'int64'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'float') + self.float = attributes[:'float'] + end + + if attributes.key?(:'double') + self.double = attributes[:'double'] + end + + if attributes.key?(:'string') + self.string = attributes[:'string'] + end + + if attributes.key?(:'pattern_without_delimiter') + self.pattern_without_delimiter = attributes[:'pattern_without_delimiter'] + end + + if attributes.key?(:'byte') + self.byte = attributes[:'byte'] + end + + if attributes.key?(:'binary') + self.binary = attributes[:'binary'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'date_time') + self.date_time = attributes[:'date_time'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'callback') + self.callback = attributes[:'callback'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@integer.nil? && @integer > 100 + invalid_properties.push('invalid value for "integer", must be smaller than or equal to 100.') + end + + if !@integer.nil? && @integer < 10 + invalid_properties.push('invalid value for "integer", must be greater than or equal to 10.') + end + + if !@int32.nil? && @int32 > 200 + invalid_properties.push('invalid value for "int32", must be smaller than or equal to 200.') + end + + if !@int32.nil? && @int32 < 20 + invalid_properties.push('invalid value for "int32", must be greater than or equal to 20.') + end + + if @number.nil? + invalid_properties.push('invalid value for "number", number cannot be nil.') + end + + if @number > 543.2 + invalid_properties.push('invalid value for "number", must be smaller than or equal to 543.2.') + end + + if @number < 32.1 + invalid_properties.push('invalid value for "number", must be greater than or equal to 32.1.') + end + + if !@float.nil? && @float > 987.6 + invalid_properties.push('invalid value for "float", must be smaller than or equal to 987.6.') + end + + if @double.nil? + invalid_properties.push('invalid value for "double", double cannot be nil.') + end + + if @double > 123.4 + invalid_properties.push('invalid value for "double", must be smaller than or equal to 123.4.') + end + + if @double < 67.8 + invalid_properties.push('invalid value for "double", must be greater than or equal to 67.8.') + end + + pattern = Regexp.new(/[a-z]/i) + if !@string.nil? && @string !~ pattern + invalid_properties.push("invalid value for \"string\", must conform to the pattern #{pattern}.") + end + + if @pattern_without_delimiter.nil? + invalid_properties.push('invalid value for "pattern_without_delimiter", pattern_without_delimiter cannot be nil.') + end + + pattern = Regexp.new(/^[A-Z].*/) + if @pattern_without_delimiter !~ pattern + invalid_properties.push("invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}.") + end + + if @byte.nil? + invalid_properties.push('invalid value for "byte", byte cannot be nil.') + end + + if !@password.nil? && @password.to_s.length > 64 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 64.') + end + + if !@password.nil? && @password.to_s.length < 10 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@integer.nil? && @integer > 100 + return false if !@integer.nil? && @integer < 10 + return false if !@int32.nil? && @int32 > 200 + return false if !@int32.nil? && @int32 < 20 + return false if @number.nil? + return false if @number > 543.2 + return false if @number < 32.1 + return false if !@float.nil? && @float > 987.6 + return false if @double.nil? + return false if @double > 123.4 + return false if @double < 67.8 + return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) + return false if @pattern_without_delimiter.nil? + return false if @pattern_without_delimiter !~ Regexp.new(/^[A-Z].*/) + return false if @byte.nil? + return false if !@password.nil? && @password.to_s.length > 64 + return false if !@password.nil? && @password.to_s.length < 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] integer Value to be assigned + def integer=(integer) + if !integer.nil? && integer > 100 + fail ArgumentError, 'invalid value for "integer", must be smaller than or equal to 100.' + end + + if !integer.nil? && integer < 10 + fail ArgumentError, 'invalid value for "integer", must be greater than or equal to 10.' + end + + @integer = integer + end + + # Custom attribute writer method with validation + # @param [Object] int32 Value to be assigned + def int32=(int32) + if !int32.nil? && int32 > 200 + fail ArgumentError, 'invalid value for "int32", must be smaller than or equal to 200.' + end + + if !int32.nil? && int32 < 20 + fail ArgumentError, 'invalid value for "int32", must be greater than or equal to 20.' + end + + @int32 = int32 + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + if number > 543.2 + fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 543.2.' + end + + if number < 32.1 + fail ArgumentError, 'invalid value for "number", must be greater than or equal to 32.1.' + end + + @number = number + end + + # Custom attribute writer method with validation + # @param [Object] float Value to be assigned + def float=(float) + if !float.nil? && float > 987.6 + fail ArgumentError, 'invalid value for "float", must be smaller than or equal to 987.6.' + end + + @float = float + end + + # Custom attribute writer method with validation + # @param [Object] double Value to be assigned + def double=(double) + if double.nil? + fail ArgumentError, 'double cannot be nil' + end + + if double > 123.4 + fail ArgumentError, 'invalid value for "double", must be smaller than or equal to 123.4.' + end + + if double < 67.8 + fail ArgumentError, 'invalid value for "double", must be greater than or equal to 67.8.' + end + + @double = double + end + + # Custom attribute writer method with validation + # @param [Object] string Value to be assigned + def string=(string) + pattern = Regexp.new(/[a-z]/i) + if !string.nil? && string !~ pattern + fail ArgumentError, "invalid value for \"string\", must conform to the pattern #{pattern}." + end + + @string = string + end + + # Custom attribute writer method with validation + # @param [Object] pattern_without_delimiter Value to be assigned + def pattern_without_delimiter=(pattern_without_delimiter) + if pattern_without_delimiter.nil? + fail ArgumentError, 'pattern_without_delimiter cannot be nil' + end + + pattern = Regexp.new(/^[A-Z].*/) + if pattern_without_delimiter !~ pattern + fail ArgumentError, "invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}." + end + + @pattern_without_delimiter = pattern_without_delimiter + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if !password.nil? && password.to_s.length > 64 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 64.' + end + + if !password.nil? && password.to_s.length < 10 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integer == o.integer && + int32 == o.int32 && + int64 == o.int64 && + number == o.number && + float == o.float && + double == o.double && + string == o.string && + pattern_without_delimiter == o.pattern_without_delimiter && + byte == o.byte && + binary == o.binary && + date == o.date && + date_time == o.date_time && + password == o.password && + callback == o.callback + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [integer, int32, int64, number, float, double, string, pattern_without_delimiter, byte, binary, date, date_time, password, callback].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb new file mode 100644 index 00000000000..72c7595b858 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb @@ -0,0 +1,217 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject4 + # field1 + attr_accessor :param + + # field2 + attr_accessor :param2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'param' => :'param', + :'param2' => :'param2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'param' => :'String', + :'param2' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'param') + self.param = attributes[:'param'] + end + + if attributes.key?(:'param2') + self.param2 = attributes[:'param2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @param.nil? + invalid_properties.push('invalid value for "param", param cannot be nil.') + end + + if @param2.nil? + invalid_properties.push('invalid value for "param2", param2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @param.nil? + return false if @param2.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + param == o.param && + param2 == o.param2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [param, param2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb new file mode 100644 index 00000000000..fdff4997056 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb @@ -0,0 +1,212 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject5 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :required_file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'required_file' => :'requiredFile' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'required_file' => :'File' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject5`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'required_file') + self.required_file = attributes[:'required_file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @required_file.nil? + invalid_properties.push('invalid value for "required_file", required_file cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @required_file.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + required_file == o.required_file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, required_file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb new file mode 100644 index 00000000000..40d5f80b322 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject1' do + before do + # run before each test + @instance = Petstore::InlineObject1.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject1' do + it 'should create an instance of InlineObject1' do + expect(@instance).to be_instance_of(Petstore::InlineObject1) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb new file mode 100644 index 00000000000..d9ee4e8d6bd --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb @@ -0,0 +1,55 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject2' do + before do + # run before each test + @instance = Petstore::InlineObject2.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject2' do + it 'should create an instance of InlineObject2' do + expect(@instance).to be_instance_of(Petstore::InlineObject2) + end + end + describe 'test attribute "enum_form_string_array"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', [">", "$"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string_array = value }.not_to raise_error + # end + end + end + + describe 'test attribute "enum_form_string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string = value }.not_to raise_error + # end + end + end + +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb new file mode 100644 index 00000000000..2fb2d0acd0a --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb @@ -0,0 +1,119 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject3 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject3' do + before do + # run before each test + @instance = Petstore::InlineObject3.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject3' do + it 'should create an instance of InlineObject3' do + expect(@instance).to be_instance_of(Petstore::InlineObject3) + end + end + describe 'test attribute "integer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int32"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int64"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "float"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "double"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "pattern_without_delimiter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "byte"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "binary"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "callback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb new file mode 100644 index 00000000000..467108f38b7 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject4 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject4' do + before do + # run before each test + @instance = Petstore::InlineObject4.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject4' do + it 'should create an instance of InlineObject4' do + expect(@instance).to be_instance_of(Petstore::InlineObject4) + end + end + describe 'test attribute "param"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "param2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb new file mode 100644 index 00000000000..76b646c1949 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject5 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject5' do + before do + # run before each test + @instance = Petstore::InlineObject5.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject5' do + it 'should create an instance of InlineObject5' do + expect(@instance).to be_instance_of(Petstore::InlineObject5) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "required_file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb new file mode 100644 index 00000000000..ccb47629bd3 --- /dev/null +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject' do + before do + # run before each test + @instance = Petstore::InlineObject.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject' do + it 'should create an instance of InlineObject' do + expect(@instance).to be_instance_of(Petstore::InlineObject) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.gitignore b/samples/server/petstore/php-symfony/SymfonyBundle-php/.gitignore deleted file mode 100644 index 20b7b989760..00000000000 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -# ref: https://github.com/github/gitignore/blob/master/Symfony.gitignore - -# Cache and logs (Symfony2) -/app/cache/* -/app/logs/* -!app/cache/.gitkeep -!app/logs/.gitkeep - -# Email spool folder -/app/spool/* - -# Cache, session files and logs (Symfony3) -/var/cache/* -/var/logs/* -/var/sessions/* -!var/cache/.gitkeep -!var/logs/.gitkeep -!var/sessions/.gitkeep - -# Parameters -/app/config/parameters.yml -/app/config/parameters.ini - -# Managed by Composer -/app/bootstrap.php.cache -/var/bootstrap.php.cache -/bin/* -!bin/console -!bin/symfony_requirements -/vendor/ - -# Assets and user uploads -/web/bundles/ -/web/uploads/ - -# PHPUnit -/app/phpunit.xml -/phpunit.xml - -# Build data -/build/ - -# Composer PHAR -/composer.phar - -# Backup entities generated with doctrine:generate:entities command -**/Entity/*~ - -# Embedded web-server pid file -/.web-server-pid - -# From root gitignore -/Tests/cache/ -/Tests/logs/ \ No newline at end of file From 6c98046ee6f6312dac802f2f55441118b679d690 Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Fri, 7 Jun 2019 23:37:49 +0200 Subject: [PATCH 34/73] [C++] [cpprestsdk] Add examples and test for cpprestsdk (#3109) Add examples and test for cpprestsdk --- bin/cpp-restsdk-petstore.sh | 2 +- bin/windows/cpp-restsdk-petstore.bat | 2 +- .../petstore/cpp-restsdk/CMakeLists.txt | 77 ++++++---------- .../petstore/cpp-restsdk/PetApiTests.cpp | 92 +++++++++++++++++++ .../client/petstore/cpp-restsdk/PetApiTests.h | 34 +++++++ .../cpp-restsdk/{ => client}/ApiClient.cpp | 4 +- .../cpp-restsdk/{ => client}/ApiClient.h | 4 +- .../{ => client}/ApiConfiguration.cpp | 4 +- .../{ => client}/ApiConfiguration.h | 4 +- .../cpp-restsdk/{ => client}/ApiException.cpp | 4 +- .../cpp-restsdk/{ => client}/ApiException.h | 4 +- .../cpp-restsdk/client/CMakeLists.txt | 54 +++++++++++ .../cpp-restsdk/{ => client}/HttpContent.cpp | 4 +- .../cpp-restsdk/{ => client}/HttpContent.h | 4 +- .../cpp-restsdk/{ => client}/IHttpBody.h | 4 +- .../cpp-restsdk/{ => client}/JsonBody.cpp | 4 +- .../cpp-restsdk/{ => client}/JsonBody.h | 4 +- .../cpp-restsdk/{ => client}/ModelBase.cpp | 4 +- .../cpp-restsdk/{ => client}/ModelBase.h | 4 +- .../{ => client}/MultipartFormData.cpp | 4 +- .../{ => client}/MultipartFormData.h | 4 +- .../cpp-restsdk/{ => client}/Object.cpp | 4 +- .../cpp-restsdk/{ => client}/Object.h | 4 +- .../cpp-restsdk/{ => client}/README.md | 0 .../cpp-restsdk/{ => client}/api/PetApi.cpp | 4 +- .../cpp-restsdk/{ => client}/api/PetApi.h | 4 +- .../cpp-restsdk/{ => client}/api/StoreApi.cpp | 4 +- .../cpp-restsdk/{ => client}/api/StoreApi.h | 4 +- .../cpp-restsdk/{ => client}/api/UserApi.cpp | 4 +- .../cpp-restsdk/{ => client}/api/UserApi.h | 4 +- .../cpp-restsdk/{ => client}/git_push.sh | 0 .../{ => client}/model/ApiResponse.cpp | 4 +- .../{ => client}/model/ApiResponse.h | 4 +- .../{ => client}/model/Category.cpp | 4 +- .../cpp-restsdk/{ => client}/model/Category.h | 4 +- .../cpp-restsdk/{ => client}/model/Order.cpp | 4 +- .../cpp-restsdk/{ => client}/model/Order.h | 4 +- .../cpp-restsdk/{ => client}/model/Pet.cpp | 4 +- .../cpp-restsdk/{ => client}/model/Pet.h | 4 +- .../cpp-restsdk/{ => client}/model/Tag.cpp | 4 +- .../cpp-restsdk/{ => client}/model/Tag.h | 4 +- .../cpp-restsdk/{ => client}/model/User.cpp | 4 +- .../cpp-restsdk/{ => client}/model/User.h | 4 +- .../petstore/cpp-restsdk/{ => client}/pom.xml | 0 samples/client/petstore/cpp-restsdk/main.cpp | 6 ++ 45 files changed, 288 insertions(+), 119 deletions(-) create mode 100644 samples/client/petstore/cpp-restsdk/PetApiTests.cpp create mode 100644 samples/client/petstore/cpp-restsdk/PetApiTests.h rename samples/client/petstore/cpp-restsdk/{ => client}/ApiClient.cpp (98%) rename samples/client/petstore/cpp-restsdk/{ => client}/ApiClient.h (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/ApiConfiguration.cpp (93%) rename samples/client/petstore/cpp-restsdk/{ => client}/ApiConfiguration.h (93%) rename samples/client/petstore/cpp-restsdk/{ => client}/ApiException.cpp (91%) rename samples/client/petstore/cpp-restsdk/{ => client}/ApiException.h (92%) create mode 100644 samples/client/petstore/cpp-restsdk/client/CMakeLists.txt rename samples/client/petstore/cpp-restsdk/{ => client}/HttpContent.cpp (92%) rename samples/client/petstore/cpp-restsdk/{ => client}/HttpContent.h (93%) rename samples/client/petstore/cpp-restsdk/{ => client}/IHttpBody.h (87%) rename samples/client/petstore/cpp-restsdk/{ => client}/JsonBody.cpp (83%) rename samples/client/petstore/cpp-restsdk/{ => client}/JsonBody.h (88%) rename samples/client/petstore/cpp-restsdk/{ => client}/ModelBase.cpp (99%) rename samples/client/petstore/cpp-restsdk/{ => client}/ModelBase.h (98%) rename samples/client/petstore/cpp-restsdk/{ => client}/MultipartFormData.cpp (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/MultipartFormData.h (93%) rename samples/client/petstore/cpp-restsdk/{ => client}/Object.cpp (94%) rename samples/client/petstore/cpp-restsdk/{ => client}/Object.h (92%) rename samples/client/petstore/cpp-restsdk/{ => client}/README.md (100%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/PetApi.cpp (99%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/PetApi.h (97%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/StoreApi.cpp (99%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/StoreApi.h (95%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/UserApi.cpp (99%) rename samples/client/petstore/cpp-restsdk/{ => client}/api/UserApi.h (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/git_push.sh (100%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/ApiResponse.cpp (97%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/ApiResponse.h (94%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Category.cpp (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Category.h (94%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Order.cpp (98%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Order.h (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Pet.cpp (98%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Pet.h (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Tag.cpp (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/Tag.h (93%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/User.cpp (98%) rename samples/client/petstore/cpp-restsdk/{ => client}/model/User.h (96%) rename samples/client/petstore/cpp-restsdk/{ => client}/pom.xml (100%) create mode 100644 samples/client/petstore/cpp-restsdk/main.cpp diff --git a/bin/cpp-restsdk-petstore.sh b/bin/cpp-restsdk-petstore.sh index 1c5f0ad54e5..ad9090d0b5c 100755 --- a/bin/cpp-restsdk-petstore.sh +++ b/bin/cpp-restsdk-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk $@" +ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk/client $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/cpp-restsdk-petstore.bat b/bin/windows/cpp-restsdk-petstore.bat index be6046bc59c..074bef98668 100755 --- a/bin/windows/cpp-restsdk-petstore.bat +++ b/bin/windows/cpp-restsdk-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restsdk -o samples\client\petstore\cpp-restsdk +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restsdk -o samples\client\petstore\cpp-restsdk\client java %JAVA_OPTS% -jar %executable% %ags% diff --git a/samples/client/petstore/cpp-restsdk/CMakeLists.txt b/samples/client/petstore/cpp-restsdk/CMakeLists.txt index 6c7bfafe813..6aec7474b59 100644 --- a/samples/client/petstore/cpp-restsdk/CMakeLists.txt +++ b/samples/client/petstore/cpp-restsdk/CMakeLists.txt @@ -1,54 +1,37 @@ -# -# OpenAPI Petstore -# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -# -# OpenAPI spec version: 1.0.0 -# -# https://openapi-generator.tech -# -# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech). +cmake_minimum_required (VERSION 3.2) -cmake_minimum_required (VERSION 2.8) - -#PROJECT's NAME -project(CppRestOpenAPIClient) +project(cpprest-petstore) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# THE LOCATION OF OUTPUT BINARIES -set(CMAKE_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib) -set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_DIR}) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wno-unused-variable") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++14 -Wall -Wno-unused-variable") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg -g3") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -g3") +set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_PREFIX_PATH /usr/lib/x86_64-linux-gnu/cmake) +find_package(cpprestsdk REQUIRED) +find_package(Boost REQUIRED) +add_subdirectory(client) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) -endif() +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp +) +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/client + ${CMAKE_CURRENT_SOURCE_DIR}/client/model + ${CMAKE_CURRENT_SOURCE_DIR}/client/api +) -# BUILD TYPE -message("A ${CMAKE_BUILD_TYPE} build configuration is detected") +link_directories( + ${Boost_LIBRARY_DIRS} +) +add_executable(${PROJECT_NAME} ${SRCS}) +add_dependencies(${PROJECT_NAME} CppRestOpenAPIClient ) +target_link_libraries(${PROJECT_NAME} CppRestOpenAPIClient cpprest pthread boost_system crypto) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) -# Update require components as necessary -#find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) - -# build and set path to cpp rest sdk -set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest) -set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include) -set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib) - -include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR}) - - -# If using vcpkg, set include directories. Also comment out CPPREST section above since vcpkg will handle it. -# To install required vcpkg packages execute: -# > vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows -# set(VCPKG_ROOT "C:\\vcpkg\\installed\\x64-windows") -# set(VCPKG_INCLUDE_DIR ${VCPKG_ROOT}/include) -# set(VCPKG_LIBRARY_DIR ${VCPKG_ROOT}/lib) -# include_directories(${PROJECT_SOURCE_DIR} api model ${VCPKG_INCLUDE_DIR}) - -#SUPPORTING FILES -set(SUPPORTING_FILES "ApiClient" "ApiConfiguration" "ApiException" "HttpContent" "IHttpBody" "JsonBody" "ModelBase" "MultipartFormData" "Object") -#SOURCE FILES -file(GLOB SOURCE_FILES "api/*" "model/*") - -add_library(${PROJECT_NAME} ${SUPPORTING_FILES} ${SOURCE_FILES}) +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/samples/client/petstore/cpp-restsdk/PetApiTests.cpp b/samples/client/petstore/cpp-restsdk/PetApiTests.cpp new file mode 100644 index 00000000000..c8a1bdad1a0 --- /dev/null +++ b/samples/client/petstore/cpp-restsdk/PetApiTests.cpp @@ -0,0 +1,92 @@ +#include "PetApiTests.h" +#include +#include +#include +#include + +OAIPetApiTests::OAIPetApiTests(std::string host, std::string basePath){ + apiconfiguration = std::make_shared(); + apiconfiguration->setBaseUrl(host + basePath); + apiconfiguration->setUserAgent(U("OpenAPI Client")); + apiclient = std::make_shared(apiconfiguration); + api = std::make_shared(apiclient); +} + +OAIPetApiTests::~OAIPetApiTests() { + +} + +void OAIPetApiTests::runTests(){ + testAddPet(); + testFindPetsByStatus(); + testGetPetById(); +} + +void OAIPetApiTests::testAddPet(){ + auto req = std::make_shared(); + req->setId(12345); + req->setName("cpprest-pet"); + req->setStatus(U("123")); + + std::function responseCallback = []() + { + std::cout << "added pet successfully" << std::endl; + }; + + auto reqTask = api->addPet(req).then(responseCallback); + try{ + reqTask.wait(); + } + catch(const ApiException& ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } + catch(const std::exception &ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } +} + +void OAIPetApiTests::testFindPetsByStatus(){ + auto req = std::vector(); + req.push_back(U("123")); + auto reqTask = api->findPetsByStatus(req) + .then([=](std::vector> pets) + { + std::cout << "found pet successfully" << std::endl; + }); + try{ + reqTask.wait(); + } + catch(const ApiException& ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } + catch(const std::exception &ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } +} + +void OAIPetApiTests::testGetPetById(){ + int req = 12345; + auto responseCallback = std::bind(&OAIPetApiTests::getPetByIdCallback, this, std::placeholders::_1); + + auto reqTask = api->getPetById(req).then(responseCallback); + + try{ + reqTask.wait(); + } + catch(const ApiException& ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } + catch(const std::exception &ex){ + std::cout << ex.what() << std::endl << std::flush; + std::string err(ex.what()); + } +} + +void OAIPetApiTests::getPetByIdCallback(std::shared_ptr pet){ + std::cout << "found pet by id successfully" << std::endl; +} diff --git a/samples/client/petstore/cpp-restsdk/PetApiTests.h b/samples/client/petstore/cpp-restsdk/PetApiTests.h new file mode 100644 index 00000000000..7727a6437fd --- /dev/null +++ b/samples/client/petstore/cpp-restsdk/PetApiTests.h @@ -0,0 +1,34 @@ +#ifndef OAI_PETAPI_TESTS_H +#define OAI_PETAPI_TESTS_H + +#include +#include "client/ApiClient.h" +#include "client/ApiConfiguration.h" +#include "client/api/PetApi.h" +#include "client/model/Pet.h" + + +using namespace std; +using namespace org::openapitools::client::api; + +class OAIPetApiTests +{ +public: + explicit OAIPetApiTests(std::string host = U("http://petstore.swagger.io"), std::string basePath = U("/v2")); + + virtual ~OAIPetApiTests(); +public: + void runTests(); +private: + void testAddPet(); + void testFindPetsByStatus(); + void testGetPetById(); + + void getPetByIdCallback(std::shared_ptr pet); + + std::shared_ptr apiconfiguration; + std::shared_ptr apiclient; + std::shared_ptr api; +}; + +#endif // OAI_PETAPI_TESTS_H diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp similarity index 98% rename from samples/client/petstore/cpp-restsdk/ApiClient.cpp rename to samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index f9445bd20c6..384eb8a8bc5 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h similarity index 96% rename from samples/client/petstore/cpp-restsdk/ApiClient.h rename to samples/client/petstore/cpp-restsdk/client/ApiClient.h index 2e34724d596..5c5d78c765e 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp similarity index 93% rename from samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp rename to samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 531320239fb..251b0d0d299 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h similarity index 93% rename from samples/client/petstore/cpp-restsdk/ApiConfiguration.h rename to samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index d89fea879e4..f6f35205990 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp similarity index 91% rename from samples/client/petstore/cpp-restsdk/ApiException.cpp rename to samples/client/petstore/cpp-restsdk/client/ApiException.cpp index 124bf391142..b0a637cf600 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h similarity index 92% rename from samples/client/petstore/cpp-restsdk/ApiException.h rename to samples/client/petstore/cpp-restsdk/client/ApiException.h index d419f13f3dd..30f5ef51df3 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt b/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt new file mode 100644 index 00000000000..86565fec65e --- /dev/null +++ b/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt @@ -0,0 +1,54 @@ +# +# OpenAPI Petstore +# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +# +# The version of the OpenAPI document: 1.0.0 +# +# https://openapi-generator.tech +# +# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech). + +cmake_minimum_required (VERSION 2.8) + +#PROJECT's NAME +project(CppRestOpenAPIClient) + + +# THE LOCATION OF OUTPUT BINARIES +set(CMAKE_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_DIR}) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +# BUILD TYPE +message("A ${CMAKE_BUILD_TYPE} build configuration is detected") + +# Update require components as necessary +#find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) + +# build and set path to cpp rest sdk +set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest) +set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include) +set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib) + +include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR}) + + +# If using vcpkg, set include directories. Also comment out CPPREST section above since vcpkg will handle it. +# To install required vcpkg packages execute: +# > vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows +# set(VCPKG_ROOT "C:\\vcpkg\\installed\\x64-windows") +# set(VCPKG_INCLUDE_DIR ${VCPKG_ROOT}/include) +# set(VCPKG_LIBRARY_DIR ${VCPKG_ROOT}/lib) +# include_directories(${PROJECT_SOURCE_DIR} api model ${VCPKG_INCLUDE_DIR}) + +#SUPPORTING FILES +set(SUPPORTING_FILES "ApiClient" "ApiConfiguration" "ApiException" "HttpContent" "IHttpBody" "JsonBody" "ModelBase" "MultipartFormData" "Object") +#SOURCE FILES +file(GLOB SOURCE_FILES "api/*" "model/*") + +add_library(${PROJECT_NAME} ${SUPPORTING_FILES} ${SOURCE_FILES}) diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp similarity index 92% rename from samples/client/petstore/cpp-restsdk/HttpContent.cpp rename to samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index 0c0cce5fcdd..6dedcd29908 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h similarity index 93% rename from samples/client/petstore/cpp-restsdk/HttpContent.h rename to samples/client/petstore/cpp-restsdk/client/HttpContent.h index 25dd1d5c6e0..b357475da38 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h similarity index 87% rename from samples/client/petstore/cpp-restsdk/IHttpBody.h rename to samples/client/petstore/cpp-restsdk/client/IHttpBody.h index 07d0e5c84ce..865bd467f30 100644 --- a/samples/client/petstore/cpp-restsdk/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp similarity index 83% rename from samples/client/petstore/cpp-restsdk/JsonBody.cpp rename to samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index b523ba6f67c..e2edc1b67ef 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h similarity index 88% rename from samples/client/petstore/cpp-restsdk/JsonBody.h rename to samples/client/petstore/cpp-restsdk/client/JsonBody.h index dacf42985c9..fba123dfc42 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp similarity index 99% rename from samples/client/petstore/cpp-restsdk/ModelBase.cpp rename to samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index ec9192c14e2..8b9f859dd6e 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h similarity index 98% rename from samples/client/petstore/cpp-restsdk/ModelBase.h rename to samples/client/petstore/cpp-restsdk/client/ModelBase.h index 80e8a76edbf..26459aa5895 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp similarity index 96% rename from samples/client/petstore/cpp-restsdk/MultipartFormData.cpp rename to samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index fda5c805bdd..ec6af2de5e0 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h similarity index 93% rename from samples/client/petstore/cpp-restsdk/MultipartFormData.h rename to samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index cff61c6cb5c..96d8c3a662a 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp similarity index 94% rename from samples/client/petstore/cpp-restsdk/Object.cpp rename to samples/client/petstore/cpp-restsdk/client/Object.cpp index a63e69cea48..3624e24a017 100644 --- a/samples/client/petstore/cpp-restsdk/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h similarity index 92% rename from samples/client/petstore/cpp-restsdk/Object.h rename to samples/client/petstore/cpp-restsdk/client/Object.h index 99179be55bd..bc2c7aa7573 100644 --- a/samples/client/petstore/cpp-restsdk/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/README.md b/samples/client/petstore/cpp-restsdk/client/README.md similarity index 100% rename from samples/client/petstore/cpp-restsdk/README.md rename to samples/client/petstore/cpp-restsdk/client/README.md diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp similarity index 99% rename from samples/client/petstore/cpp-restsdk/api/PetApi.cpp rename to samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index d8530e324c0..0c67b5ecbf5 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h similarity index 97% rename from samples/client/petstore/cpp-restsdk/api/PetApi.h rename to samples/client/petstore/cpp-restsdk/client/api/PetApi.h index bb7b6f7b199..09b2f06da9b 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp similarity index 99% rename from samples/client/petstore/cpp-restsdk/api/StoreApi.cpp rename to samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index 0ec396c54e4..a7bcf614ee2 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h similarity index 95% rename from samples/client/petstore/cpp-restsdk/api/StoreApi.h rename to samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index 700f788df27..2aaf9bf5969 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp similarity index 99% rename from samples/client/petstore/cpp-restsdk/api/UserApi.cpp rename to samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index ba8769d344a..a4c4f1bf462 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h similarity index 96% rename from samples/client/petstore/cpp-restsdk/api/UserApi.h rename to samples/client/petstore/cpp-restsdk/client/api/UserApi.h index fc76cfc9177..aa840cf1f90 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh similarity index 100% rename from samples/client/petstore/cpp-restsdk/git_push.sh rename to samples/client/petstore/cpp-restsdk/client/git_push.sh diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp similarity index 97% rename from samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp rename to samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 4122b863fb6..3fa6061fb04 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h similarity index 94% rename from samples/client/petstore/cpp-restsdk/model/ApiResponse.h rename to samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index 83115c794ab..9b1d7abc1a7 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp similarity index 96% rename from samples/client/petstore/cpp-restsdk/model/Category.cpp rename to samples/client/petstore/cpp-restsdk/client/model/Category.cpp index ad6422cb906..8d21469964c 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h similarity index 94% rename from samples/client/petstore/cpp-restsdk/model/Category.h rename to samples/client/petstore/cpp-restsdk/client/model/Category.h index 026ec860728..1d425850a5b 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp similarity index 98% rename from samples/client/petstore/cpp-restsdk/model/Order.cpp rename to samples/client/petstore/cpp-restsdk/client/model/Order.cpp index a15f779237c..e137a045fa6 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h similarity index 96% rename from samples/client/petstore/cpp-restsdk/model/Order.h rename to samples/client/petstore/cpp-restsdk/client/model/Order.h index c5d4153cfcd..9d697587404 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp similarity index 98% rename from samples/client/petstore/cpp-restsdk/model/Pet.cpp rename to samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index 6e4ebb69c4d..76a39be3db6 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h similarity index 96% rename from samples/client/petstore/cpp-restsdk/model/Pet.h rename to samples/client/petstore/cpp-restsdk/client/model/Pet.h index 881685336df..3ebb80bf285 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp similarity index 96% rename from samples/client/petstore/cpp-restsdk/model/Tag.cpp rename to samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index 9f5f5b14636..a4af089387e 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h similarity index 93% rename from samples/client/petstore/cpp-restsdk/model/Tag.h rename to samples/client/petstore/cpp-restsdk/client/model/Tag.h index 9df0f2c2e7e..db92cc2549c 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp similarity index 98% rename from samples/client/petstore/cpp-restsdk/model/User.cpp rename to samples/client/petstore/cpp-restsdk/client/model/User.cpp index 93a64fbb360..8ffd2ea50d0 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h similarity index 96% rename from samples/client/petstore/cpp-restsdk/model/User.h rename to samples/client/petstore/cpp-restsdk/client/model/User.h index 851dcc57a25..e3a970cb4df 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -2,9 +2,9 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/pom.xml b/samples/client/petstore/cpp-restsdk/client/pom.xml similarity index 100% rename from samples/client/petstore/cpp-restsdk/pom.xml rename to samples/client/petstore/cpp-restsdk/client/pom.xml diff --git a/samples/client/petstore/cpp-restsdk/main.cpp b/samples/client/petstore/cpp-restsdk/main.cpp new file mode 100644 index 00000000000..27ca41ceb64 --- /dev/null +++ b/samples/client/petstore/cpp-restsdk/main.cpp @@ -0,0 +1,6 @@ +#include "PetApiTests.h" + +int main(int argc, char *argv[]) { + auto petTest = std::make_shared(); + petTest->runTests(); +} From 2a5a2723002e28e1f994e7078a77e8bdd22adaec Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Sat, 8 Jun 2019 23:12:13 +0900 Subject: [PATCH 35/73] Bump up babel-cli version to fix security alert (#3121) * Bump up babel version * Update samples bin/javascript-flowtyped-petstore.sh * The dependency `babel-preset-react-app` requires `NODE_ENV` or `BABEL_ENV` * Run `env BABEL_ENV=development npm run build` to update the samples --- .../Javascript-Flowtyped/README.mustache | 3 +- .../resources/Javascript-Flowtyped/babelrc | 9 +- .../Javascript-Flowtyped/package.mustache | 9 +- .../petstore/javascript-flowtyped/.babelrc | 9 +- .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-flowtyped/README.md | 3 +- .../petstore/javascript-flowtyped/lib/api.js | 2007 ++++++++--------- .../javascript-flowtyped/lib/api.js.flow | 16 +- .../javascript-flowtyped/lib/configuration.js | 104 +- .../lib/configuration.js.flow | 2 +- .../javascript-flowtyped/lib/index.js | 4 +- .../javascript-flowtyped/lib/index.js.flow | 2 +- .../javascript-flowtyped/package.json | 9 +- .../petstore/javascript-flowtyped/src/api.js | 2 +- .../javascript-flowtyped/src/configuration.js | 2 +- .../javascript-flowtyped/src/index.js | 2 +- 16 files changed, 1075 insertions(+), 1110 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache index f13c6322bb9..e93ab6f53dd 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache @@ -18,7 +18,8 @@ Module system To build an compile the flow typed sources to javascript use: ``` npm install -npm run build +# The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables +env BABEL_ENV={YOUR_ENV} npm run build ``` ### Publishing diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc index 75148dc5edb..4bf17b5e66e 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc @@ -1,4 +1,9 @@ { - "presets": ["react-app"], - "plugins": ["transform-flow-strip-types"] + "presets": [ + "react-app", + "@babel/preset-flow" + ], + "plugins": [ + "@babel/plugin-transform-flow-strip-types" + ] } diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache index eed7d2042df..b8f07e12eec 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache @@ -27,10 +27,11 @@ "portable-fetch": "^3.0.0" }, "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-plugin-transform-flow-strip-types": "^6.22.0", - "babel-preset-react-app": "^3.1.1", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/preset-flow": "^7.0.0", + "babel-preset-react-app": "^7.0.0", "flow-copy-source": "^1.3.0", "rimraf": "^2.6.2" } diff --git a/samples/client/petstore/javascript-flowtyped/.babelrc b/samples/client/petstore/javascript-flowtyped/.babelrc index 75148dc5edb..4bf17b5e66e 100644 --- a/samples/client/petstore/javascript-flowtyped/.babelrc +++ b/samples/client/petstore/javascript-flowtyped/.babelrc @@ -1,4 +1,9 @@ { - "presets": ["react-app"], - "plugins": ["transform-flow-strip-types"] + "presets": [ + "react-app", + "@babel/preset-flow" + ], + "plugins": [ + "@babel/plugin-transform-flow-strip-types" + ] } diff --git a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION index afa63656064..d96260ba335 100644 --- a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-flowtyped/README.md b/samples/client/petstore/javascript-flowtyped/README.md index f9b11cbd029..9c2bec57335 100644 --- a/samples/client/petstore/javascript-flowtyped/README.md +++ b/samples/client/petstore/javascript-flowtyped/README.md @@ -18,7 +18,8 @@ Module system To build an compile the flow typed sources to javascript use: ``` npm install -npm run build +# The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables +env BABEL_ENV={YOUR_ENV} npm run build ``` ### Publishing diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js b/samples/client/petstore/javascript-flowtyped/lib/api.js index 0dec200768e..e0ed087f022 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/api.js +++ b/samples/client/petstore/javascript-flowtyped/lib/api.js @@ -1,427 +1,391 @@ -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +import _classCallCheck from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/classCallCheck"; +import _possibleConstructorReturn from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn"; +import _getPrototypeOf from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/getPrototypeOf"; +import _inherits from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/inherits"; +import _wrapNativeSuper from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper"; /* eslint-disable no-use-before-define */ + /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech * Do not edit the class manually. */ - import * as url from "url"; import * as portableFetch from "portable-fetch"; import { Configuration } from "./configuration"; - var BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); - /** * * @export */ + export var COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|" + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|" }; - /** * * @export */ - -/** - * - * @export - */ - - -/** - * - * @export - */ - - /** * * @export * @class RequiredError * @extends {Error} */ -export var RequiredError = function (_Error) { - _inherits(RequiredError, _Error); +export var RequiredError = +/*#__PURE__*/ +function (_Error) { + _inherits(RequiredError, _Error); - function RequiredError(field, msg) { - _classCallCheck(this, RequiredError); + function RequiredError(field, msg) { + var _this; - var _this = _possibleConstructorReturn(this, (RequiredError.__proto__ || Object.getPrototypeOf(RequiredError)).call(this, msg)); + _classCallCheck(this, RequiredError); - _this.name = "RequiredError"; - return _this; - } - - return RequiredError; -}(Error); + _this = _possibleConstructorReturn(this, _getPrototypeOf(RequiredError).call(this, msg)); + _this.name = "RequiredError"; + return _this; + } + return RequiredError; +}(_wrapNativeSuper(Error)); /** * Describes the result of uploading an image resource * @export */ - -/** - * A category for a pet - * @export - */ - -/** - * An order for a pets from the pet store - * @export - */ - -/** - * A pet for sale in the pet store - * @export - */ - - -/** - * A tag for a pet - * @export - */ - - -/** - * A User who is purchasing from the pet store - * @export - */ - - /** * PetApi - fetch parameter creator * @export */ export var PetApiFetchParamCreator = function PetApiFetchParamCreator(configuration) { - return { - /** - * - * @summary Add a new pet to the store - * @throws {RequiredError} - */ - addPet: function addPet(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling addPet.'); - } - var localVarPath = "/pet"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + return { + /** + * + * @summary Add a new pet to the store + * @throws {RequiredError} + */ + addPet: function addPet(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling addPet.'); + } - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + var localVarPath = "/pet"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication petstore_auth required + // oauth required - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * - * @summary Deletes a pet - * @throws {RequiredError} - */ - deletePet: function deletePet(petId, apiKey, options) { - // verify required parameter 'petId' is not null or undefined - if (petId === null || petId === undefined) { - throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling deletePet.'); - } - var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * + * @summary Deletes a pet + * @throws {RequiredError} + */ + deletePet: function deletePet(petId, apiKey, options) { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling deletePet.'); + } - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'DELETE' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication petstore_auth required + // oauth required - if (apiKey !== undefined && apiKey !== null) { - localVarHeaderParameter['api_key'] = apiKey; - } + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + if (apiKey !== undefined && apiKey !== null) { + localVarHeaderParameter['api_key'] = apiKey; + } - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * @throws {RequiredError} - */ - findPetsByStatus: function findPetsByStatus(status, options) { - // verify required parameter 'status' is not null or undefined - if (status === null || status === undefined) { - throw new RequiredError('status', 'Required parameter status was null or undefined when calling findPetsByStatus.'); - } - var localVarPath = "/pet/findByStatus"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @throws {RequiredError} + */ + findPetsByStatus: function findPetsByStatus(status, options) { + // verify required parameter 'status' is not null or undefined + if (status === null || status === undefined) { + throw new RequiredError('status', 'Required parameter status was null or undefined when calling findPetsByStatus.'); + } - if (status) { - localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS["csv"]); - } + var localVarPath = "/pet/findByStatus"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication petstore_auth required + // oauth required - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + if (status) { + localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS["csv"]); + } - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * @throws {RequiredError} - */ - findPetsByTags: function findPetsByTags(tags, options) { - // verify required parameter 'tags' is not null or undefined - if (tags === null || tags === undefined) { - throw new RequiredError('tags', 'Required parameter tags was null or undefined when calling findPetsByTags.'); - } - var localVarPath = "/pet/findByTags"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - if (tags) { - localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS["csv"]); - } + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @throws {RequiredError} + */ + findPetsByTags: function findPetsByTags(tags, options) { + // verify required parameter 'tags' is not null or undefined + if (tags === null || tags === undefined) { + throw new RequiredError('tags', 'Required parameter tags was null or undefined when calling findPetsByTags.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var localVarPath = "/pet/findByTags"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication petstore_auth required + // oauth required - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - /** - * Returns a single pet - * @summary Find pet by ID - * @throws {RequiredError} - */ - getPetById: function getPetById(petId, options) { - // verify required parameter 'petId' is not null or undefined - if (petId === null || petId === undefined) { - throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling getPetById.'); - } - var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + if (tags) { + localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS["csv"]); + } - // authentication api_key required - if (configuration && configuration.apiKey) { - var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey; - localVarHeaderParameter["api_key"] = localVarApiKeyValue; - } + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + /** + * Returns a single pet + * @summary Find pet by ID + * @throws {RequiredError} + */ + getPetById: function getPetById(petId, options) { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling getPetById.'); + } - /** - * - * @summary Update an existing pet - * @throws {RequiredError} - */ - updatePet: function updatePet(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling updatePet.'); - } - var localVarPath = "/pet"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'PUT' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication api_key required - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + if (configuration && configuration.apiKey) { + var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey; + localVarHeaderParameter["api_key"] = localVarApiKeyValue; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + /** + * + * @summary Update an existing pet + * @throws {RequiredError} + */ + updatePet: function updatePet(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling updatePet.'); + } - /** - * - * @summary Updates a pet in the store with form data - * @throws {RequiredError} - */ - updatePetWithForm: function updatePetWithForm(petId, name, status, options) { - // verify required parameter 'petId' is not null or undefined - if (petId === null || petId === undefined) { - throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; - var localVarFormParams = new FormData(); + var localVarPath = "/pet"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'PUT' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication petstore_auth required + // oauth required - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - if (name !== undefined) { - localVarFormParams.set('name', name); - } + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - if (status !== undefined) { - localVarFormParams.set('status', status); - } + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - localVarRequestOptions.body = localVarFormParams; + /** + * + * @summary Updates a pet in the store with form data + * @throws {RequiredError} + */ + updatePetWithForm: function updatePetWithForm(petId, name, status, options) { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling updatePetWithForm.'); + } - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + var localVarFormParams = new FormData(); // authentication petstore_auth required + // oauth required - /** - * - * @summary uploads an image - * @throws {RequiredError} - */ - uploadFile: function uploadFile(petId, additionalMetadata, file, options) { - // verify required parameter 'petId' is not null or undefined - if (petId === null || petId === undefined) { - throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling uploadFile.'); - } - var localVarPath = "/pet/{petId}/uploadImage".replace("{" + "petId" + "}", encodeURIComponent(String(petId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; - var localVarFormParams = new FormData(); + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } - // authentication petstore_auth required - // oauth required - if (configuration && configuration.accessToken) { - var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; - } + if (name !== undefined) { + localVarFormParams.set('name', name); + } - if (additionalMetadata !== undefined) { - localVarFormParams.set('additionalMetadata', additionalMetadata); - } + if (status !== undefined) { + localVarFormParams.set('status', status); + } - if (file !== undefined) { - localVarFormParams.set('file', file); - } + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - localVarRequestOptions.body = localVarFormParams; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + localVarRequestOptions.body = localVarFormParams; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - } - }; + /** + * + * @summary uploads an image + * @throws {RequiredError} + */ + uploadFile: function uploadFile(petId, additionalMetadata, file, options) { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling uploadFile.'); + } + + var localVarPath = "/pet/{petId}/uploadImage".replace("{".concat("petId", "}"), encodeURIComponent(String(petId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + var localVarFormParams = new FormData(); // authentication petstore_auth required + // oauth required + + if (configuration && configuration.accessToken) { + var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + if (additionalMetadata !== undefined) { + localVarFormParams.set('additionalMetadata', additionalMetadata); + } + + if (file !== undefined) { + localVarFormParams.set('file', file); + } + + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + localVarRequestOptions.body = localVarFormParams; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + } + }; }; /** @@ -429,276 +393,269 @@ export var PetApiFetchParamCreator = function PetApiFetchParamCreator(configurat * @export */ export var PetApi = function PetApi(configuration) { - var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; - - var basePath = configuration && configuration.basePath || BASE_PATH; - return { - /** - * - * @summary Add a new pet to the store - * @throws {RequiredError} - */ - addPet: function addPet(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).addPet(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary Deletes a pet - * @throws {RequiredError} - */ - deletePet: function deletePet(petId, apiKey) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).deletePet(petId, apiKey, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - * @throws {RequiredError} - */ - findPetsByStatus: function findPetsByStatus(status) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByStatus(status, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - * @throws {RequiredError} - */ - findPetsByTags: function findPetsByTags(tags) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByTags(tags, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * Returns a single pet - * @summary Find pet by ID - * @throws {RequiredError} - */ - getPetById: function getPetById(petId) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).getPetById(petId, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * - * @summary Update an existing pet - * @throws {RequiredError} - */ - updatePet: function updatePet(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePet(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary Updates a pet in the store with form data - * @throws {RequiredError} - */ - updatePetWithForm: function updatePetWithForm(petId, name, status) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePetWithForm(petId, name, status, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary uploads an image - * @throws {RequiredError} - */ - uploadFile: function uploadFile(petId, additionalMetadata, file) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - var localVarFetchArgs = PetApiFetchParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); + var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; + var basePath = configuration && configuration.basePath || BASE_PATH; + return { + /** + * + * @summary Add a new pet to the store + * @throws {RequiredError} + */ + addPet: function addPet(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).addPet(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; } - }; -}; + }); + }, + /** + * + * @summary Deletes a pet + * @throws {RequiredError} + */ + deletePet: function deletePet(petId, apiKey) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).deletePet(petId, apiKey, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @throws {RequiredError} + */ + findPetsByStatus: function findPetsByStatus(status) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByStatus(status, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @throws {RequiredError} + */ + findPetsByTags: function findPetsByTags(tags) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByTags(tags, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * Returns a single pet + * @summary Find pet by ID + * @throws {RequiredError} + */ + getPetById: function getPetById(petId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).getPetById(petId, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * + * @summary Update an existing pet + * @throws {RequiredError} + */ + updatePet: function updatePet(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePet(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * + * @summary Updates a pet in the store with form data + * @throws {RequiredError} + */ + updatePetWithForm: function updatePetWithForm(petId, name, status) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePetWithForm(petId, name, status, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * + * @summary uploads an image + * @throws {RequiredError} + */ + uploadFile: function uploadFile(petId, additionalMetadata, file) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var localVarFetchArgs = PetApiFetchParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + } + }; +}; /** * StoreApi - fetch parameter creator * @export */ + export var StoreApiFetchParamCreator = function StoreApiFetchParamCreator(configuration) { - return { - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - * @throws {RequiredError} - */ - deleteOrder: function deleteOrder(orderId, options) { - // verify required parameter 'orderId' is not null or undefined - if (orderId === null || orderId === undefined) { - throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling deleteOrder.'); - } - var localVarPath = "/store/order/{orderId}".replace("{" + "orderId" + "}", encodeURIComponent(String(orderId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @throws {RequiredError} + */ + deleteOrder: function deleteOrder(orderId, options) { + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling deleteOrder.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var localVarPath = "/store/order/{orderId}".replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'DELETE' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - * @throws {RequiredError} - */ - getInventory: function getInventory(options) { - var localVarPath = "/store/inventory"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @throws {RequiredError} + */ + getInventory: function getInventory(options) { + var localVarPath = "/store/inventory"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; // authentication api_key required - // authentication api_key required - if (configuration && configuration.apiKey) { - var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey; - localVarHeaderParameter["api_key"] = localVarApiKeyValue; - } + if (configuration && configuration.apiKey) { + var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey; + localVarHeaderParameter["api_key"] = localVarApiKeyValue; + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - * @throws {RequiredError} - */ - getOrderById: function getOrderById(orderId, options) { - // verify required parameter 'orderId' is not null or undefined - if (orderId === null || orderId === undefined) { - throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling getOrderById.'); - } - var localVarPath = "/store/order/{orderId}".replace("{" + "orderId" + "}", encodeURIComponent(String(orderId))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @throws {RequiredError} + */ + getOrderById: function getOrderById(orderId, options) { + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling getOrderById.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var localVarPath = "/store/order/{orderId}".replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * - * @summary Place an order for a pet - * @throws {RequiredError} - */ - placeOrder: function placeOrder(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling placeOrder.'); - } - var localVarPath = "/store/order"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * + * @summary Place an order for a pet + * @throws {RequiredError} + */ + placeOrder: function placeOrder(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling placeOrder.'); + } - localVarHeaderParameter['Content-Type'] = 'application/json'; + var localVarPath = "/store/order"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; - - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - } - }; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + } + }; }; /** @@ -706,334 +663,335 @@ export var StoreApiFetchParamCreator = function StoreApiFetchParamCreator(config * @export */ export var StoreApi = function StoreApi(configuration) { - var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; - - var basePath = configuration && configuration.basePath || BASE_PATH; - return { - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - * @throws {RequiredError} - */ - deleteOrder: function deleteOrder(orderId) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = StoreApiFetchParamCreator(configuration).deleteOrder(orderId, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - * @throws {RequiredError} - */ - getInventory: function getInventory() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getInventory(options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - * @throws {RequiredError} - */ - getOrderById: function getOrderById(orderId) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getOrderById(orderId, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * - * @summary Place an order for a pet - * @throws {RequiredError} - */ - placeOrder: function placeOrder(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = StoreApiFetchParamCreator(configuration).placeOrder(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); + var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; + var basePath = configuration && configuration.basePath || BASE_PATH; + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @throws {RequiredError} + */ + deleteOrder: function deleteOrder(orderId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = StoreApiFetchParamCreator(configuration).deleteOrder(orderId, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; } - }; -}; + }); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @throws {RequiredError} + */ + getInventory: function getInventory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getInventory(options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @throws {RequiredError} + */ + getOrderById: function getOrderById(orderId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getOrderById(orderId, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * + * @summary Place an order for a pet + * @throws {RequiredError} + */ + placeOrder: function placeOrder(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = StoreApiFetchParamCreator(configuration).placeOrder(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + } + }; +}; /** * UserApi - fetch parameter creator * @export */ + export var UserApiFetchParamCreator = function UserApiFetchParamCreator(configuration) { - return { - /** - * This can only be done by the logged in user. - * @summary Create user - * @throws {RequiredError} - */ - createUser: function createUser(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUser.'); - } - var localVarPath = "/user"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @throws {RequiredError} + */ + createUser: function createUser(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUser.'); + } - localVarHeaderParameter['Content-Type'] = 'application/json'; + var localVarPath = "/user"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + /** + * + * @summary Creates list of users with given input array + * @throws {RequiredError} + */ + createUsersWithArrayInput: function createUsersWithArrayInput(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithArrayInput.'); + } - /** - * - * @summary Creates list of users with given input array - * @throws {RequiredError} - */ - createUsersWithArrayInput: function createUsersWithArrayInput(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - var localVarPath = "/user/createWithArray"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + var localVarPath = "/user/createWithArray"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarHeaderParameter['Content-Type'] = 'application/json'; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + /** + * + * @summary Creates list of users with given input array + * @throws {RequiredError} + */ + createUsersWithListInput: function createUsersWithListInput(body, options) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithListInput.'); + } - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + var localVarPath = "/user/createWithList"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'POST' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - /** - * - * @summary Creates list of users with given input array - * @throws {RequiredError} - */ - createUsersWithListInput: function createUsersWithListInput(body, options) { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - var localVarPath = "/user/createWithList"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - localVarHeaderParameter['Content-Type'] = 'application/json'; + /** + * This can only be done by the logged in user. + * @summary Delete user + * @throws {RequiredError} + */ + deleteUser: function deleteUser(username, options) { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username', 'Required parameter username was null or undefined when calling deleteUser.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'DELETE' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * This can only be done by the logged in user. - * @summary Delete user - * @throws {RequiredError} - */ - deleteUser: function deleteUser(username, options) { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username', 'Required parameter username was null or undefined when calling deleteUser.'); - } - var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * + * @summary Get user by user name + * @throws {RequiredError} + */ + getUserByName: function getUserByName(username, options) { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username', 'Required parameter username was null or undefined when calling getUserByName.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * - * @summary Get user by user name - * @throws {RequiredError} - */ - getUserByName: function getUserByName(username, options) { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username', 'Required parameter username was null or undefined when calling getUserByName.'); - } - var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * + * @summary Logs user into the system + * @throws {RequiredError} + */ + loginUser: function loginUser(username, password, options) { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username', 'Required parameter username was null or undefined when calling loginUser.'); + } // verify required parameter 'password' is not null or undefined - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + if (password === null || password === undefined) { + throw new RequiredError('password', 'Required parameter password was null or undefined when calling loginUser.'); + } - /** - * - * @summary Logs user into the system - * @throws {RequiredError} - */ - loginUser: function loginUser(username, password, options) { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username', 'Required parameter username was null or undefined when calling loginUser.'); - } - // verify required parameter 'password' is not null or undefined - if (password === null || password === undefined) { - throw new RequiredError('password', 'Required parameter password was null or undefined when calling loginUser.'); - } - var localVarPath = "/user/login"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + var localVarPath = "/user/login"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; - if (username !== undefined) { - localVarQueryParameter['username'] = username; - } + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } - if (password !== undefined) { - localVarQueryParameter['password'] = password; - } + if (password !== undefined) { + localVarQueryParameter['password'] = password; + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - /** - * - * @summary Logs out current logged in user session - * @throws {RequiredError} - */ - logoutUser: function logoutUser(options) { - var localVarPath = "/user/logout"; - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; + /** + * + * @summary Logs out current logged in user session + * @throws {RequiredError} + */ + logoutUser: function logoutUser(options) { + var localVarPath = "/user/logout"; + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'GET' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + }, - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @throws {RequiredError} + */ + updateUser: function updateUser(username, body, options) { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username', 'Required parameter username was null or undefined when calling updateUser.'); + } // verify required parameter 'body' is not null or undefined - /** - * This can only be done by the logged in user. - * @summary Updated user - * @throws {RequiredError} - */ - updateUser: function updateUser(username, body, options) { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username', 'Required parameter username was null or undefined when calling updateUser.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateUser.'); - } - var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username))); - var localVarUrlObj = url.parse(localVarPath, true); - var localVarRequestOptions = Object.assign({}, { method: 'PUT' }, options); - var localVarHeaderParameter = {}; - var localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (body === null || body === undefined) { + throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateUser.'); + } - localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); - // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - delete localVarUrlObj.search; - localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); - var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || ""; + var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username))); + var localVarUrlObj = url.parse(localVarPath, true); + var localVarRequestOptions = Object.assign({}, { + method: 'PUT' + }, options); + var localVarHeaderParameter = {}; + var localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 - return { - url: url.format(localVarUrlObj), - options: localVarRequestOptions - }; - } - }; + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || ""; + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions + }; + } + }; }; /** @@ -1041,152 +999,143 @@ export var UserApiFetchParamCreator = function UserApiFetchParamCreator(configur * @export */ export var UserApi = function UserApi(configuration) { - var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; - - var basePath = configuration && configuration.basePath || BASE_PATH; - return { - /** - * This can only be done by the logged in user. - * @summary Create user - * @throws {RequiredError} - */ - createUser: function createUser(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUser(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary Creates list of users with given input array - * @throws {RequiredError} - */ - createUsersWithArrayInput: function createUsersWithArrayInput(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithArrayInput(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary Creates list of users with given input array - * @throws {RequiredError} - */ - createUsersWithListInput: function createUsersWithListInput(body) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithListInput(body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * This can only be done by the logged in user. - * @summary Delete user - * @throws {RequiredError} - */ - deleteUser: function deleteUser(username) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).deleteUser(username, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * - * @summary Get user by user name - * @throws {RequiredError} - */ - getUserByName: function getUserByName(username) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).getUserByName(username, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * - * @summary Logs user into the system - * @throws {RequiredError} - */ - loginUser: function loginUser(username, password) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).loginUser(username, password, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - throw response; - } - }); - }, - - /** - * - * @summary Logs out current logged in user session - * @throws {RequiredError} - */ - logoutUser: function logoutUser() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).logoutUser(options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); - }, - - /** - * This can only be done by the logged in user. - * @summary Updated user - * @throws {RequiredError} - */ - updateUser: function updateUser(username, body) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var localVarFetchArgs = UserApiFetchParamCreator(configuration).updateUser(username, body, options); - return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { - if (response.status >= 200 && response.status < 300) { - return response; - } else { - throw response; - } - }); + var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch; + var basePath = configuration && configuration.basePath || BASE_PATH; + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @throws {RequiredError} + */ + createUser: function createUser(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUser(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; } - }; + }); + }, + + /** + * + * @summary Creates list of users with given input array + * @throws {RequiredError} + */ + createUsersWithArrayInput: function createUsersWithArrayInput(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithArrayInput(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * + * @summary Creates list of users with given input array + * @throws {RequiredError} + */ + createUsersWithListInput: function createUsersWithListInput(body) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithListInput(body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * This can only be done by the logged in user. + * @summary Delete user + * @throws {RequiredError} + */ + deleteUser: function deleteUser(username) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).deleteUser(username, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * + * @summary Get user by user name + * @throws {RequiredError} + */ + getUserByName: function getUserByName(username) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).getUserByName(username, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * + * @summary Logs user into the system + * @throws {RequiredError} + */ + loginUser: function loginUser(username, password) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).loginUser(username, password, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }, + + /** + * + * @summary Logs out current logged in user session + * @throws {RequiredError} + */ + logoutUser: function logoutUser() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).logoutUser(options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + }, + + /** + * This can only be done by the logged in user. + * @summary Updated user + * @throws {RequiredError} + */ + updateUser: function updateUser(username, body) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var localVarFetchArgs = UserApiFetchParamCreator(configuration).updateUser(username, body, options); + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + throw response; + } + }); + } + }; }; \ No newline at end of file diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow index cd921bbc237..bc4367b6dfc 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow +++ b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow @@ -4,7 +4,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech @@ -323,7 +323,7 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -515,7 +515,7 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -878,7 +878,7 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -997,7 +997,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -1027,7 +1027,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -1057,7 +1057,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), @@ -1206,7 +1206,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration) delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || ""); + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || ""); return { url: url.format(localVarUrlObj), diff --git a/samples/client/petstore/javascript-flowtyped/lib/configuration.js b/samples/client/petstore/javascript-flowtyped/lib/configuration.js index 4d6e700a54d..f1670e52540 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/configuration.js +++ b/samples/client/petstore/javascript-flowtyped/lib/configuration.js @@ -1,6 +1,36 @@ -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +import _classCallCheck from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/classCallCheck"; +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI-Generator + * https://openapi-generator.tech + * Do not edit the class manually. + */ export var Configuration = +/** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + +/** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + +/** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + /** * parameter for oauth2 security * @param name security name @@ -8,60 +38,34 @@ export var Configuration = * @memberof Configuration */ -/** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ -function Configuration() { - var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Configuration); - - if (param.apiKey) { - this.apiKey = param.apiKey; - } - if (param.username) { - this.username = param.username; - } - if (param.password) { - this.password = param.password; - } - if (param.accessToken) { - this.accessToken = param.accessToken; - } - if (param.basePath) { - this.basePath = param.basePath; - } -} /** * override base path * * @type {string} * @memberof Configuration */ +function Configuration() { + var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; -/** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ + _classCallCheck(this, Configuration); -/** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ -; -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator - * https://openapi-generator.tech - * Do not edit the class manually. - */ \ No newline at end of file + if (param.apiKey) { + this.apiKey = param.apiKey; + } + + if (param.username) { + this.username = param.username; + } + + if (param.password) { + this.password = param.password; + } + + if (param.accessToken) { + this.accessToken = param.accessToken; + } + + if (param.basePath) { + this.basePath = param.basePath; + } +}; \ No newline at end of file diff --git a/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow b/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow index e2717b94012..690f033dd1d 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow +++ b/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow @@ -3,7 +3,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech diff --git a/samples/client/petstore/javascript-flowtyped/lib/index.js b/samples/client/petstore/javascript-flowtyped/lib/index.js index 0460f725d97..cc9361b86e8 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/index.js +++ b/samples/client/petstore/javascript-flowtyped/lib/index.js @@ -1,14 +1,12 @@ - /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech * Do not edit the class manually. */ - export * from "./api"; export * from "./configuration"; \ No newline at end of file diff --git a/samples/client/petstore/javascript-flowtyped/lib/index.js.flow b/samples/client/petstore/javascript-flowtyped/lib/index.js.flow index fc756135245..9864e99fec2 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/index.js.flow +++ b/samples/client/petstore/javascript-flowtyped/lib/index.js.flow @@ -3,7 +3,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech diff --git a/samples/client/petstore/javascript-flowtyped/package.json b/samples/client/petstore/javascript-flowtyped/package.json index eb946480593..35f0d5bd937 100644 --- a/samples/client/petstore/javascript-flowtyped/package.json +++ b/samples/client/petstore/javascript-flowtyped/package.json @@ -22,10 +22,11 @@ "portable-fetch": "^3.0.0" }, "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-plugin-transform-flow-strip-types": "^6.22.0", - "babel-preset-react-app": "^3.1.1", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/preset-flow": "^7.0.0", + "babel-preset-react-app": "^7.0.0", "flow-copy-source": "^1.3.0", "rimraf": "^2.6.2" } diff --git a/samples/client/petstore/javascript-flowtyped/src/api.js b/samples/client/petstore/javascript-flowtyped/src/api.js index a651816178b..bc4367b6dfc 100644 --- a/samples/client/petstore/javascript-flowtyped/src/api.js +++ b/samples/client/petstore/javascript-flowtyped/src/api.js @@ -4,7 +4,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech diff --git a/samples/client/petstore/javascript-flowtyped/src/configuration.js b/samples/client/petstore/javascript-flowtyped/src/configuration.js index e2717b94012..690f033dd1d 100644 --- a/samples/client/petstore/javascript-flowtyped/src/configuration.js +++ b/samples/client/petstore/javascript-flowtyped/src/configuration.js @@ -3,7 +3,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech diff --git a/samples/client/petstore/javascript-flowtyped/src/index.js b/samples/client/petstore/javascript-flowtyped/src/index.js index fc756135245..9864e99fec2 100644 --- a/samples/client/petstore/javascript-flowtyped/src/index.js +++ b/samples/client/petstore/javascript-flowtyped/src/index.js @@ -3,7 +3,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech From ab9facd905176a5f427e1d5642674b140203e581 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 8 Jun 2019 14:20:48 -0400 Subject: [PATCH 36/73] [gradle] Document consuming via gradle plugin portal (#3125) --- .../openapi-generator-gradle-plugin/README.adoc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 47200a6754c..2c93cc751f2 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -40,12 +40,23 @@ compileJava.dependsOn tasks.openApiGenerate == Plugin Setup +[source,group] +---- +plugins { + id "org.openapi.generator" version "4.0.1" +} +---- + +Using https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application[legacy plugin application]: + [source,groovy] ---- buildscript { repositories { mavenLocal() mavenCentral() + // or, via Gradle Plugin Portal: + // url "https://plugins.gradle.org/m2/" } dependencies { classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.1" @@ -55,11 +66,6 @@ buildscript { apply plugin: 'org.openapi.generator' ---- -[NOTE] -==== -The gradle plugin is not currently published to https://plugins.gradle.org/m2/. -==== - == Configuration === openApiGenerate From d86f3edc73b5ae5736cf5eddbf994f05c3d1577c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 9 Jun 2019 11:48:13 +0800 Subject: [PATCH 37/73] update core team in pom.xml (#3126) --- README.md | 4 ++-- pom.xml | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 744ad200d7d..0ee49a7492e 100644 --- a/README.md +++ b/README.md @@ -603,7 +603,7 @@ OpenAPI Generator core team members are contributors who have been making signif * [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert) * [@cbornet](https://github.com/cbornet) (2016/05) * [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview) -* [@jmini](https://github.com/jmini) (2018/04) +* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini) * [@etherealjoy](https://github.com/etherealjoy) (2019/06) :heart: = Link to support the contributor directly @@ -812,7 +812,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/ - [Jean-François Côté](https://github.com/JFCote) - [Jim Schubert](https://github.com/jimschubert) - [Jon Schoning](https://github.com/jonschoning) -- [Jérémie Bresson](https://github.com/jmini) +- [Jérémie Bresson](https://github.com/jmini) [:heart:](https://www.patreon.com/jmini) - [Jörn Ahrens](https://github.com/jayearn) - [Keni Steward](https://github.com/kenisteward) - [Marcin Stefaniuk](https://github.com/mstefaniuk) diff --git a/pom.xml b/pom.xml index bb23a1f9874..693734cbc3f 100644 --- a/pom.xml +++ b/pom.xml @@ -38,23 +38,20 @@ cbornet Christophe Bornet - - jaz-ah - Joseph Zuromski - ackintosh Akihito Nakano - - JFCote - Jean-François Côté - jmini Jérémie Bresson dev@jmini.fr + + etherealjoy + Sunn + sunn.ssb@live.com + github From 314f18a2c142e20b3d3d33a3d5b63318d765465d Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Sun, 9 Jun 2019 05:56:22 +0200 Subject: [PATCH 38/73] Import inner items for map (#3123) fix #3094 --- .../openapitools/codegen/DefaultCodegen.java | 10 +- .../codegen/DefaultCodegenTest.java | 16 + .../src/test/resources/2_0/mapArgs.yaml | 358 ++++++++++++++++++ 3 files changed, 383 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/mapArgs.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 4595d855077..e22a4f8ea50 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4660,9 +4660,17 @@ public class DefaultCodegen implements CodegenConfig { schema.setAdditionalProperties(inner); } CodegenProperty codegenProperty = fromProperty("property", schema); - // only support 1-dimension map only + imports.add(codegenProperty.baseType); + CodegenProperty innerCp = codegenProperty; + while (innerCp != null) { + if (innerCp.complexType != null) { + imports.add(innerCp.complexType); + } + innerCp = innerCp.items; + } + if (StringUtils.isEmpty(bodyParameterName)) { codegenParameter.baseName = "request_body"; } else { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 334ae65e518..fcb8a9f916f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -17,6 +17,7 @@ package org.openapitools.codegen; +import com.google.common.collect.Sets; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -638,4 +639,19 @@ public class DefaultCodegenTest { Assert.assertEquals(imports.iterator().next(), "PageQuery"); } + @Test + public void mapParamImportInnerObject() { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/mapArgs.yaml"); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + RequestBody requestBody = openAPI.getPaths().get("/api/instruments").getPost().getRequestBody(); + + HashSet imports = new HashSet<>(); + codegen.fromRequestBody(requestBody, imports, ""); + + HashSet expected = Sets.newHashSet("InstrumentDefinition", "map"); + + Assert.assertEquals(imports, expected); + } } diff --git a/modules/openapi-generator/src/test/resources/2_0/mapArgs.yaml b/modules/openapi-generator/src/test/resources/2_0/mapArgs.yaml new file mode 100644 index 00000000000..c023311ae45 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/mapArgs.yaml @@ -0,0 +1,358 @@ +--- +swagger: '2.0' +info: + version: 0.10.190 + title: LUSID API +paths: + "/api/instruments": + post: + tags: + - Instruments + summary: Upsert instruments + description: Upsert instruments + operationId: UpsertInstruments + consumes: [] + produces: + - text/plain + - application/json + - text/json + parameters: + - name: requests + in: body + description: The instrument definitions + required: false + schema: + type: object + additionalProperties: + "$ref": "#/definitions/InstrumentDefinition" + responses: + '201': + description: Success + schema: + type: object + additionalProperties: + "$ref": "#/definitions/UpsertInstrumentsResponse" + '400': + description: The details of the input related failure + schema: + type: object + additionalProperties: + "$ref": "#/definitions/LusidValidationProblemDetails" + default: + description: Error response + schema: + type: object + additionalProperties: + "$ref": "#/definitions/LusidProblemDetails" +definitions: + Link: + required: + - relation + - href + - method + type: object + properties: + relation: + enum: + - Root + - Properties + - Transactions + - Details + - Constituents + - Holdings + - Commands + - HoldingsAdjustments + - Parent + - PropertySchema + - EntitySchema + - NextPage + - PreviousPage + - Quote + - ConstituentsAdjustments + - Values + type: string + href: + type: string + description: + type: string + method: + enum: + - POST + - GET + - PATCH + - DELETE + type: string + LusidValidationProblemDetails: + required: + - name + - code + type: object + properties: + name: + type: string + errorDetails: + uniqueItems: false + type: array + items: + type: object + additionalProperties: + type: string + code: + format: int32 + type: integer + errors: + type: object + additionalProperties: + uniqueItems: false + type: array + items: + type: string + readOnly: true + type: + type: string + title: + type: string + status: + format: int32 + type: integer + detail: + type: string + instance: + type: string + LusidProblemDetails: + required: + - name + - code + type: object + properties: + name: + type: string + errorDetails: + uniqueItems: false + type: array + items: + type: object + additionalProperties: + type: string + code: + format: int32 + type: integer + type: + type: string + title: + type: string + status: + format: int32 + type: integer + detail: + type: string + instance: + type: string + ResourceId: + type: object + properties: + scope: + type: string + code: + type: string + Version: + description: Describes the version metadata of an entity. + type: object + properties: + effectiveFrom: + format: date-time + description: '' + type: string + asAtDate: + format: date-time + description: '' + type: string + ErrorDetail: + type: object + properties: + id: + type: string + type: + type: string + detail: + type: string + InstrumentDefinition: + required: + - name + - identifiers + type: object + properties: + name: + description: Required. The name of the instrument + type: string + identifiers: + description: Required. A set of identifiers that identify this instrument + type: object + additionalProperties: + "$ref": "#/definitions/InstrumentIdValue" + properties: + description: Optional. A collection of properties to upsert on the instrument. + uniqueItems: false + type: array + items: + "$ref": "#/definitions/InstrumentProperty" + lookThroughPortfolioId: + "$ref": "#/definitions/ResourceId" + description: Optional. The identifier of the portfolio that represents this + instrument. + definition: + "$ref": "#/definitions/InstrumentEconomicDefinition" + description: Expanded instrument definition + InstrumentIdValue: + required: + - value + type: object + properties: + value: + description: The value of the instrument id, which must not be empty or null. + e.g, 'BBG123456' + type: string + effectiveAt: + format: date-time + description: "The effective at date of the instrument id, which is optional. + The default value in the null case\r\nis DateTimeOffset.MinValue." + type: string + InstrumentProperty: + type: object + properties: + key: + description: The property key of the property, e.g, 'Instrument/default/Isin' + type: string + value: + "$ref": "#/definitions/PropertyValue" + description: The value of the property, which must not be empty or null. e.g, + 'US0378331005' + InstrumentEconomicDefinition: + description: Expanded instrument definition + required: + - instrumentFormat + - content + type: object + properties: + instrumentFormat: + type: string + content: + type: string + PropertyValue: + type: object + properties: + labelValue: + description: '' + type: string + metricValue: + "$ref": "#/definitions/MetricValue" + description: '' + effectiveFrom: + format: date-time + description: Date for which the property is effective from + type: string + MetricValue: + type: object + properties: + value: + format: double + type: number + unit: + type: string + UpsertInstrumentsResponse: + type: object + properties: + href: + type: string + values: + description: The collection of upserted instruments with their latest parameters. + type: object + additionalProperties: + "$ref": "#/definitions/Instrument" + failed: + description: "If any instruments failed to be upserted, they will be listed + in 'Failed', along\r\nwith a reason why." + type: object + additionalProperties: + "$ref": "#/definitions/ErrorDetail" + links: + uniqueItems: false + type: array + items: + "$ref": "#/definitions/Link" + Instrument: + required: + - state + type: object + properties: + href: + type: string + lusidInstrumentId: + description: The lusid instrument id (LUID) of the instrument + type: string + version: + "$ref": "#/definitions/Version" + description: The version of the instrument + name: + description: The name of the instrument + type: string + identifiers: + description: The set of identifiers that can be used to uniquely identify + the instrument + type: object + additionalProperties: + type: string + properties: + description: "Any requested instrument properties. If no property can be found + for the instrument, then\r\na value of 'Unknown' will be returned" + uniqueItems: false + type: array + items: + "$ref": "#/definitions/Property" + lookthroughPortfolio: + "$ref": "#/definitions/ResourceId" + description: The lookthrough portfolio of the instrument (if any). + instrumentDefinition: + "$ref": "#/definitions/InstrumentEconomicDefinition" + description: The economic definition of the instrument for an OTC or instrument + where an expanded definition exists. + state: + enum: + - Active + - Inactive + type: string + links: + uniqueItems: false + type: array + items: + "$ref": "#/definitions/Link" + Property: + required: + - key + - value + type: object + properties: + key: + description: '' + type: string + value: + description: '' + type: object + unit: + description: '' + type: string + effectiveFrom: + format: date-time + description: Date for which the property is effective from + type: string +securityDefinitions: + oauth2: + flow: implicit + authorizationUrl: https://lusid.okta.com/oauth2/aus5al5yopbHW2wJn2p6/v1/authorize + type: oauth2 + description: OAuth2 Implicit Grant +security: + - oauth2: [] +tags: + - name: Instruments + description: Methods for interacting with instruments From a864ae90de0c80d88e7e63694ba26c400abdd11f Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Wed, 12 Jun 2019 20:16:12 +0200 Subject: [PATCH 39/73] Add API timeout handling (#3078) --- .../cpp-qt5-client/HttpRequest.cpp.mustache | 44 +++++++++++++++---- .../cpp-qt5-client/HttpRequest.h.mustache | 10 +++-- .../cpp-qt5-client/api-body.mustache | 11 ++++- .../cpp-qt5-client/api-header.mustache | 4 +- .../cpp-qt5/client/OAIHttpRequest.cpp | 44 +++++++++++++++---- .../petstore/cpp-qt5/client/OAIHttpRequest.h | 10 +++-- .../petstore/cpp-qt5/client/OAIPetApi.cpp | 18 +++++++- .../petstore/cpp-qt5/client/OAIPetApi.h | 4 +- .../petstore/cpp-qt5/client/OAIStoreApi.cpp | 14 +++++- .../petstore/cpp-qt5/client/OAIStoreApi.h | 4 +- .../petstore/cpp-qt5/client/OAIUserApi.cpp | 18 +++++++- .../petstore/cpp-qt5/client/OAIUserApi.h | 4 +- 12 files changed, 147 insertions(+), 38 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache index 6c61ca461e6..f9c036f8207 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache @@ -45,18 +45,29 @@ void {{prefix}}HttpRequestInput::add_file(QString variable_name, QString local_f : QObject(parent), manager(nullptr) { qsrand(QDateTime::currentDateTime().toTime_t()); - + timeout = 0; + timer = new QTimer(); manager = new QNetworkAccessManager(this); connect(manager, &QNetworkAccessManager::finished, this, &{{prefix}}HttpRequestWorker::on_manager_finished); } {{prefix}}HttpRequestWorker::~{{prefix}}HttpRequestWorker() { + if(timer != nullptr){ + if(timer->isActive()){ + timer->stop(); + } + timer->deleteLater(); + } } QMap {{prefix}}HttpRequestWorker::getResponseHeaders() const { return headers; } +void {{prefix}}HttpRequestWorker::setTimeOut(int tout){ + timeout = tout; +} + QString {{prefix}}HttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) { // result structure follows RFC 5987 bool need_utf_encoding = false; @@ -108,7 +119,7 @@ QString {{prefix}}HttpRequestWorker::http_attribute_encode(QString attribute_nam void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { // reset variables - + QNetworkReply* reply = nullptr; QByteArray request_content = ""; response = ""; error_type = QNetworkReply::NoError; @@ -276,19 +287,19 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { } if (input->http_method == "GET") { - manager->get(request); + reply = manager->get(request); } else if (input->http_method == "POST") { - manager->post(request, request_content); + reply = manager->post(request, request_content); } else if (input->http_method == "PUT") { - manager->put(request, request_content); + reply = manager->put(request, request_content); } else if (input->http_method == "HEAD") { - manager->head(request); + reply = manager->head(request); } else if (input->http_method == "DELETE") { - manager->deleteResource(request); + reply = manager->deleteResource(request); } else { #if (QT_VERSION >= 0x050800) @@ -298,11 +309,16 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { buffer->setData(request_content); buffer->open(QIODevice::ReadOnly); - QNetworkReply* reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer); + reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer); buffer->setParent(reply); #endif } - + if(timeout > 0){ + timer->setSingleShot(true); + timer->setInterval(timeout); + connect(timer, &QTimer::timeout, this, [=](){ on_manager_timeout(reply); }); + timer->start(); + } } void {{prefix}}HttpRequestWorker::on_manager_finished(QNetworkReply *reply) { @@ -318,6 +334,16 @@ void {{prefix}}HttpRequestWorker::on_manager_finished(QNetworkReply *reply) { emit on_execution_finished(this); } +void {{prefix}}HttpRequestWorker::on_manager_timeout(QNetworkReply *reply) { + error_type = QNetworkReply::TimeoutError; + response = ""; + error_str = "Timed out waiting for response"; + disconnect(manager, nullptr, nullptr, nullptr); + reply->abort(); + reply->deleteLater(); + + emit on_execution_finished(this); +} QSslConfiguration* {{prefix}}HttpRequestWorker::sslDefaultConfiguration; diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache index a8a50e266ab..6ba6b63117a 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -60,7 +61,7 @@ public: QByteArray response; QNetworkReply::NetworkError error_type; QString error_str; - + QTimer *timer; explicit {{prefix}}HttpRequestWorker(QObject *parent = nullptr); virtual ~{{prefix}}HttpRequestWorker(); @@ -68,16 +69,17 @@ public: QString http_attribute_encode(QString attribute_name, QString input); void execute({{prefix}}HttpRequestInput *input); static QSslConfiguration* sslDefaultConfiguration; - + void setTimeOut(int tout); signals: void on_execution_finished({{prefix}}HttpRequestWorker *worker); private: QNetworkAccessManager *manager; QMap headers; + int timeout; + void on_manager_timeout(QNetworkReply *reply); private slots: - void on_manager_finished(QNetworkReply *reply); - + void on_manager_finished(QNetworkReply *reply); }; {{#cppNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache index c2355916bfa..899a16b0597 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache @@ -10,7 +10,8 @@ namespace {{this}} { {{/cppNamespaceDeclarations}} {{classname}}::{{classname}}() : basePath("{{{basePathWithoutHost}}}"), - host("{{#serverHost}}{{#scheme}}{{scheme}}://{{/scheme}}{{serverHost}}{{#serverPort}}:{{serverPort}}{{/serverPort}}{{/serverHost}}") { + host("{{#serverHost}}{{#scheme}}{{scheme}}://{{/scheme}}{{serverHost}}{{#serverPort}}:{{serverPort}}{{/serverPort}}{{/serverHost}}"), + timeout(0){ } @@ -18,9 +19,10 @@ namespace {{this}} { } -{{classname}}::{{classname}}(const QString& host, const QString& basePath) { +{{classname}}::{{classname}}(const QString& host, const QString& basePath, const int tout) { this->host = host; this->basePath = basePath; + this->timeout = tout; } void {{classname}}::setBasePath(const QString& basePath){ @@ -31,6 +33,10 @@ void {{classname}}::setHost(const QString& host){ this->host = host; } +void {{classname}}::setApiTimeOutMs(const int tout){ + timeout = tout; +} + void {{classname}}::addHeaders(const QString& key, const QString& value){ defaultHeaders.insert(key, value); } @@ -97,6 +103,7 @@ void } {{/collectionFormat}}{{/queryParams}} {{prefix}}HttpRequestWorker *worker = new {{prefix}}HttpRequestWorker(); + worker->setTimeOut(timeout); {{prefix}}HttpRequestInput input(fullPath, "{{httpMethod}}"); {{#formParams}} if ({{paramName}} != nullptr) { diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache index b213f344a64..ea9218ad529 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache @@ -18,11 +18,12 @@ class {{classname}}: public QObject { public: {{classname}}(); - {{classname}}(const QString& host, const QString& basePath); + {{classname}}(const QString& host, const QString& basePath, const int toutMs = 0); ~{{classname}}(); void setBasePath(const QString& basePath); void setHost(const QString& host); + void setApiTimeOutMs(const int tout); void addHeaders(const QString& key, const QString& value); {{#operations}}{{#operation}}void {{nickname}}({{#allParams}}const {{{dataType}}}& {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); @@ -30,6 +31,7 @@ public: private: QString basePath; QString host; + int timeout; QMap defaultHeaders; {{#operations}}{{#operation}}void {{nickname}}Callback ({{prefix}}HttpRequestWorker * worker); {{/operation}}{{/operations}} diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp index 01e8797795d..8fdd4ea5e97 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp +++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp @@ -54,18 +54,29 @@ OAIHttpRequestWorker::OAIHttpRequestWorker(QObject *parent) : QObject(parent), manager(nullptr) { qsrand(QDateTime::currentDateTime().toTime_t()); - + timeout = 0; + timer = new QTimer(); manager = new QNetworkAccessManager(this); connect(manager, &QNetworkAccessManager::finished, this, &OAIHttpRequestWorker::on_manager_finished); } OAIHttpRequestWorker::~OAIHttpRequestWorker() { + if(timer != nullptr){ + if(timer->isActive()){ + timer->stop(); + } + timer->deleteLater(); + } } QMap OAIHttpRequestWorker::getResponseHeaders() const { return headers; } +void OAIHttpRequestWorker::setTimeOut(int tout){ + timeout = tout; +} + QString OAIHttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) { // result structure follows RFC 5987 bool need_utf_encoding = false; @@ -117,7 +128,7 @@ QString OAIHttpRequestWorker::http_attribute_encode(QString attribute_name, QStr void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) { // reset variables - + QNetworkReply* reply = nullptr; QByteArray request_content = ""; response = ""; error_type = QNetworkReply::NoError; @@ -285,19 +296,19 @@ void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) { } if (input->http_method == "GET") { - manager->get(request); + reply = manager->get(request); } else if (input->http_method == "POST") { - manager->post(request, request_content); + reply = manager->post(request, request_content); } else if (input->http_method == "PUT") { - manager->put(request, request_content); + reply = manager->put(request, request_content); } else if (input->http_method == "HEAD") { - manager->head(request); + reply = manager->head(request); } else if (input->http_method == "DELETE") { - manager->deleteResource(request); + reply = manager->deleteResource(request); } else { #if (QT_VERSION >= 0x050800) @@ -307,11 +318,16 @@ void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) { buffer->setData(request_content); buffer->open(QIODevice::ReadOnly); - QNetworkReply* reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer); + reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer); buffer->setParent(reply); #endif } - + if(timeout > 0){ + timer->setSingleShot(true); + timer->setInterval(timeout); + connect(timer, &QTimer::timeout, this, [=](){ on_manager_timeout(reply); }); + timer->start(); + } } void OAIHttpRequestWorker::on_manager_finished(QNetworkReply *reply) { @@ -327,6 +343,16 @@ void OAIHttpRequestWorker::on_manager_finished(QNetworkReply *reply) { emit on_execution_finished(this); } +void OAIHttpRequestWorker::on_manager_timeout(QNetworkReply *reply) { + error_type = QNetworkReply::TimeoutError; + response = ""; + error_str = "Timed out waiting for response"; + disconnect(manager, nullptr, nullptr, nullptr); + reply->abort(); + reply->deleteLater(); + + emit on_execution_finished(this); +} QSslConfiguration* OAIHttpRequestWorker::sslDefaultConfiguration; diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h index 5e58caf449b..b7380595c04 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h +++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -69,7 +70,7 @@ public: QByteArray response; QNetworkReply::NetworkError error_type; QString error_str; - + QTimer *timer; explicit OAIHttpRequestWorker(QObject *parent = nullptr); virtual ~OAIHttpRequestWorker(); @@ -77,16 +78,17 @@ public: QString http_attribute_encode(QString attribute_name, QString input); void execute(OAIHttpRequestInput *input); static QSslConfiguration* sslDefaultConfiguration; - + void setTimeOut(int tout); signals: void on_execution_finished(OAIHttpRequestWorker *worker); private: QNetworkAccessManager *manager; QMap headers; + int timeout; + void on_manager_timeout(QNetworkReply *reply); private slots: - void on_manager_finished(QNetworkReply *reply); - + void on_manager_finished(QNetworkReply *reply); }; } diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp index 46108a18fd7..3e83ea00668 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp @@ -19,7 +19,8 @@ namespace OpenAPI { OAIPetApi::OAIPetApi() : basePath("/v2"), - host("petstore.swagger.io") { + host("petstore.swagger.io"), + timeout(0){ } @@ -27,9 +28,10 @@ OAIPetApi::~OAIPetApi() { } -OAIPetApi::OAIPetApi(const QString& host, const QString& basePath) { +OAIPetApi::OAIPetApi(const QString& host, const QString& basePath, const int tout) { this->host = host; this->basePath = basePath; + this->timeout = tout; } void OAIPetApi::setBasePath(const QString& basePath){ @@ -40,6 +42,10 @@ void OAIPetApi::setHost(const QString& host){ this->host = host; } +void OAIPetApi::setApiTimeOutMs(const int tout){ + timeout = tout; +} + void OAIPetApi::addHeaders(const QString& key, const QString& value){ defaultHeaders.insert(key, value); } @@ -51,6 +57,7 @@ OAIPetApi::addPet(const OAIPet& body) { fullPath.append(this->host).append(this->basePath).append("/pet"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); @@ -102,6 +109,7 @@ OAIPetApi::deletePet(const qint64& pet_id, const QString& api_key) { fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "DELETE"); if (api_key != nullptr) { @@ -189,6 +197,7 @@ OAIPetApi::findPetsByStatus(const QList& status) { } OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -283,6 +292,7 @@ OAIPetApi::findPetsByTags(const QList& tags) { } OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -340,6 +350,7 @@ OAIPetApi::getPetById(const qint64& pet_id) { fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -385,6 +396,7 @@ OAIPetApi::updatePet(const OAIPet& body) { fullPath.append(this->host).append(this->basePath).append("/pet"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "PUT"); @@ -436,6 +448,7 @@ OAIPetApi::updatePetWithForm(const qint64& pet_id, const QString& name, const QS fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); if (name != nullptr) { input.add_var("name", name); @@ -489,6 +502,7 @@ OAIPetApi::uploadFile(const qint64& pet_id, const QString& additional_metadata, fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); if (additional_metadata != nullptr) { input.add_var("additionalMetadata", additional_metadata); diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h index 05881f65fc6..bd64db93db1 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h @@ -29,11 +29,12 @@ class OAIPetApi: public QObject { public: OAIPetApi(); - OAIPetApi(const QString& host, const QString& basePath); + OAIPetApi(const QString& host, const QString& basePath, const int toutMs = 0); ~OAIPetApi(); void setBasePath(const QString& basePath); void setHost(const QString& host); + void setApiTimeOutMs(const int tout); void addHeaders(const QString& key, const QString& value); void addPet(const OAIPet& body); @@ -48,6 +49,7 @@ public: private: QString basePath; QString host; + int timeout; QMap defaultHeaders; void addPetCallback (OAIHttpRequestWorker * worker); void deletePetCallback (OAIHttpRequestWorker * worker); diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp index e83f7f5139e..90ac22d129f 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp @@ -19,7 +19,8 @@ namespace OpenAPI { OAIStoreApi::OAIStoreApi() : basePath("/v2"), - host("petstore.swagger.io") { + host("petstore.swagger.io"), + timeout(0){ } @@ -27,9 +28,10 @@ OAIStoreApi::~OAIStoreApi() { } -OAIStoreApi::OAIStoreApi(const QString& host, const QString& basePath) { +OAIStoreApi::OAIStoreApi(const QString& host, const QString& basePath, const int tout) { this->host = host; this->basePath = basePath; + this->timeout = tout; } void OAIStoreApi::setBasePath(const QString& basePath){ @@ -40,6 +42,10 @@ void OAIStoreApi::setHost(const QString& host){ this->host = host; } +void OAIStoreApi::setApiTimeOutMs(const int tout){ + timeout = tout; +} + void OAIStoreApi::addHeaders(const QString& key, const QString& value){ defaultHeaders.insert(key, value); } @@ -54,6 +60,7 @@ OAIStoreApi::deleteOrder(const QString& order_id) { fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "DELETE"); @@ -98,6 +105,7 @@ OAIStoreApi::getInventory() { fullPath.append(this->host).append(this->basePath).append("/store/inventory"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -155,6 +163,7 @@ OAIStoreApi::getOrderById(const qint64& order_id) { fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -200,6 +209,7 @@ OAIStoreApi::placeOrder(const OAIOrder& body) { fullPath.append(this->host).append(this->basePath).append("/store/order"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h index 6026045168d..e532321dcd8 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h @@ -28,11 +28,12 @@ class OAIStoreApi: public QObject { public: OAIStoreApi(); - OAIStoreApi(const QString& host, const QString& basePath); + OAIStoreApi(const QString& host, const QString& basePath, const int toutMs = 0); ~OAIStoreApi(); void setBasePath(const QString& basePath); void setHost(const QString& host); + void setApiTimeOutMs(const int tout); void addHeaders(const QString& key, const QString& value); void deleteOrder(const QString& order_id); @@ -43,6 +44,7 @@ public: private: QString basePath; QString host; + int timeout; QMap defaultHeaders; void deleteOrderCallback (OAIHttpRequestWorker * worker); void getInventoryCallback (OAIHttpRequestWorker * worker); diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp index 79731867df9..36a418994f9 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp @@ -19,7 +19,8 @@ namespace OpenAPI { OAIUserApi::OAIUserApi() : basePath("/v2"), - host("petstore.swagger.io") { + host("petstore.swagger.io"), + timeout(0){ } @@ -27,9 +28,10 @@ OAIUserApi::~OAIUserApi() { } -OAIUserApi::OAIUserApi(const QString& host, const QString& basePath) { +OAIUserApi::OAIUserApi(const QString& host, const QString& basePath, const int tout) { this->host = host; this->basePath = basePath; + this->timeout = tout; } void OAIUserApi::setBasePath(const QString& basePath){ @@ -40,6 +42,10 @@ void OAIUserApi::setHost(const QString& host){ this->host = host; } +void OAIUserApi::setApiTimeOutMs(const int tout){ + timeout = tout; +} + void OAIUserApi::addHeaders(const QString& key, const QString& value){ defaultHeaders.insert(key, value); } @@ -51,6 +57,7 @@ OAIUserApi::createUser(const OAIUser& body) { fullPath.append(this->host).append(this->basePath).append("/user"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); @@ -99,6 +106,7 @@ OAIUserApi::createUsersWithArrayInput(const QList& body) { fullPath.append(this->host).append(this->basePath).append("/user/createWithArray"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); @@ -148,6 +156,7 @@ OAIUserApi::createUsersWithListInput(const QList& body) { fullPath.append(this->host).append(this->basePath).append("/user/createWithList"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "POST"); @@ -200,6 +209,7 @@ OAIUserApi::deleteUser(const QString& username) { fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "DELETE"); @@ -247,6 +257,7 @@ OAIUserApi::getUserByName(const QString& username) { fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -308,6 +319,7 @@ OAIUserApi::loginUser(const QString& username, const QString& password) { .append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(password))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -354,6 +366,7 @@ OAIUserApi::logoutUser() { fullPath.append(this->host).append(this->basePath).append("/user/logout"); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "GET"); @@ -401,6 +414,7 @@ OAIUserApi::updateUser(const QString& username, const OAIUser& body) { fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username))); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(); + worker->setTimeOut(timeout); OAIHttpRequestInput input(fullPath, "PUT"); diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h index 178b1804a98..d95814e0710 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h @@ -28,11 +28,12 @@ class OAIUserApi: public QObject { public: OAIUserApi(); - OAIUserApi(const QString& host, const QString& basePath); + OAIUserApi(const QString& host, const QString& basePath, const int toutMs = 0); ~OAIUserApi(); void setBasePath(const QString& basePath); void setHost(const QString& host); + void setApiTimeOutMs(const int tout); void addHeaders(const QString& key, const QString& value); void createUser(const OAIUser& body); @@ -47,6 +48,7 @@ public: private: QString basePath; QString host; + int timeout; QMap defaultHeaders; void createUserCallback (OAIHttpRequestWorker * worker); void createUsersWithArrayInputCallback (OAIHttpRequestWorker * worker); From 242d2960822a02e4bf1e2f874ff5ba5ec770c4db Mon Sep 17 00:00:00 2001 From: Michael Edwards Date: Fri, 14 Jun 2019 10:26:36 +0200 Subject: [PATCH 40/73] Idiomatic Rust returns for Error conversions (#2812) * Idiomatic Rust returns for Error conversions * Regenerate Rust samples --- .../src/main/resources/rust/reqwest/api_mod.mustache | 6 +++--- .../client/petstore/rust-reqwest/.openapi-generator/VERSION | 2 +- samples/client/petstore/rust-reqwest/docs/UserApi.md | 4 ++-- .../client/petstore/rust-reqwest/src/apis/configuration.rs | 2 +- samples/client/petstore/rust-reqwest/src/apis/mod.rs | 6 +++--- samples/client/petstore/rust-reqwest/src/apis/pet_api.rs | 2 +- samples/client/petstore/rust-reqwest/src/apis/store_api.rs | 2 +- samples/client/petstore/rust-reqwest/src/apis/user_api.rs | 2 +- .../client/petstore/rust-reqwest/src/models/api_response.rs | 2 +- samples/client/petstore/rust-reqwest/src/models/category.rs | 2 +- samples/client/petstore/rust-reqwest/src/models/order.rs | 2 +- samples/client/petstore/rust-reqwest/src/models/pet.rs | 2 +- samples/client/petstore/rust-reqwest/src/models/tag.rs | 2 +- samples/client/petstore/rust-reqwest/src/models/user.rs | 2 +- samples/client/petstore/rust/.openapi-generator/VERSION | 2 +- samples/client/petstore/rust/docs/UserApi.md | 4 ++-- samples/client/petstore/rust/src/apis/configuration.rs | 2 +- samples/client/petstore/rust/src/apis/pet_api.rs | 2 +- samples/client/petstore/rust/src/apis/store_api.rs | 2 +- samples/client/petstore/rust/src/apis/user_api.rs | 2 +- samples/client/petstore/rust/src/models/api_response.rs | 2 +- samples/client/petstore/rust/src/models/category.rs | 2 +- samples/client/petstore/rust/src/models/order.rs | 2 +- samples/client/petstore/rust/src/models/pet.rs | 2 +- samples/client/petstore/rust/src/models/tag.rs | 2 +- samples/client/petstore/rust/src/models/user.rs | 2 +- 26 files changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index 80c30e7dcb6..318b0f7a0db 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -10,19 +10,19 @@ pub enum Error { impl From for Error { fn from(e: reqwest::Error) -> Self { - return Error::Reqwest(e) + Error::Reqwest(e) } } impl From for Error { fn from(e: serde_json::Error) -> Self { - return Error::Serde(e) + Error::Serde(e) } } impl From for Error { fn from(e: std::io::Error) -> Self { - return Error::Io(e) + Error::Io(e) } } diff --git a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION index afa63656064..d96260ba335 100644 --- a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust-reqwest/docs/UserApi.md b/samples/client/petstore/rust-reqwest/docs/UserApi.md index 17d278b4b5c..d469a52df88 100644 --- a/samples/client/petstore/rust-reqwest/docs/UserApi.md +++ b/samples/client/petstore/rust-reqwest/docs/UserApi.md @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](array.md)| List of user object | + **body** | [**Vec<::models::User>**](User.md)| List of user object | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](array.md)| List of user object | + **body** | [**Vec<::models::User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/rust-reqwest/src/apis/configuration.rs b/samples/client/petstore/rust-reqwest/src/apis/configuration.rs index 9493b6ff9ec..4194f7a52d1 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/configuration.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/configuration.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/apis/mod.rs b/samples/client/petstore/rust-reqwest/src/apis/mod.rs index 99d5b323764..8ca9138588c 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/mod.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/mod.rs @@ -10,19 +10,19 @@ pub enum Error { impl From for Error { fn from(e: reqwest::Error) -> Self { - return Error::Reqwest(e) + Error::Reqwest(e) } } impl From for Error { fn from(e: serde_json::Error) -> Self { - return Error::Serde(e) + Error::Serde(e) } } impl From for Error { fn from(e: std::io::Error) -> Self { - return Error::Io(e) + Error::Io(e) } } diff --git a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs index 2bf993408e2..53d2b82ea72 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/apis/store_api.rs b/samples/client/petstore/rust-reqwest/src/apis/store_api.rs index 787072191f1..d9d60f09960 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/store_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/store_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/apis/user_api.rs b/samples/client/petstore/rust-reqwest/src/apis/user_api.rs index ea877eb0378..68d4c9f1266 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/user_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/user_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/api_response.rs b/samples/client/petstore/rust-reqwest/src/models/api_response.rs index c256dd541f2..7884fba590e 100644 --- a/samples/client/petstore/rust-reqwest/src/models/api_response.rs +++ b/samples/client/petstore/rust-reqwest/src/models/api_response.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/category.rs b/samples/client/petstore/rust-reqwest/src/models/category.rs index c65206929e3..804f9f4c707 100644 --- a/samples/client/petstore/rust-reqwest/src/models/category.rs +++ b/samples/client/petstore/rust-reqwest/src/models/category.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/order.rs b/samples/client/petstore/rust-reqwest/src/models/order.rs index b3cfb487b8d..118dc310767 100644 --- a/samples/client/petstore/rust-reqwest/src/models/order.rs +++ b/samples/client/petstore/rust-reqwest/src/models/order.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/pet.rs b/samples/client/petstore/rust-reqwest/src/models/pet.rs index 73189d5bcfc..64dae06e454 100644 --- a/samples/client/petstore/rust-reqwest/src/models/pet.rs +++ b/samples/client/petstore/rust-reqwest/src/models/pet.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/tag.rs b/samples/client/petstore/rust-reqwest/src/models/tag.rs index cb76addf6e6..503fb7f61bd 100644 --- a/samples/client/petstore/rust-reqwest/src/models/tag.rs +++ b/samples/client/petstore/rust-reqwest/src/models/tag.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust-reqwest/src/models/user.rs b/samples/client/petstore/rust-reqwest/src/models/user.rs index 08bb9db1b6c..6bfa6e2167a 100644 --- a/samples/client/petstore/rust-reqwest/src/models/user.rs +++ b/samples/client/petstore/rust-reqwest/src/models/user.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION index afa63656064..d96260ba335 100644 --- a/samples/client/petstore/rust/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/docs/UserApi.md b/samples/client/petstore/rust/docs/UserApi.md index 2ec2362730d..ffa733d64de 100644 --- a/samples/client/petstore/rust/docs/UserApi.md +++ b/samples/client/petstore/rust/docs/UserApi.md @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](array.md)| List of user object | + **body** | [**Vec<::models::User>**](User.md)| List of user object | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](array.md)| List of user object | + **body** | [**Vec<::models::User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/rust/src/apis/configuration.rs b/samples/client/petstore/rust/src/apis/configuration.rs index 4b703512133..c282a0c30df 100644 --- a/samples/client/petstore/rust/src/apis/configuration.rs +++ b/samples/client/petstore/rust/src/apis/configuration.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/apis/pet_api.rs b/samples/client/petstore/rust/src/apis/pet_api.rs index fddbf5a569d..0c98efec5cf 100644 --- a/samples/client/petstore/rust/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/src/apis/pet_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/apis/store_api.rs b/samples/client/petstore/rust/src/apis/store_api.rs index a68411466ca..46f0bf53cf4 100644 --- a/samples/client/petstore/rust/src/apis/store_api.rs +++ b/samples/client/petstore/rust/src/apis/store_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/apis/user_api.rs b/samples/client/petstore/rust/src/apis/user_api.rs index 896bcbd5112..ba3ad140b46 100644 --- a/samples/client/petstore/rust/src/apis/user_api.rs +++ b/samples/client/petstore/rust/src/apis/user_api.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/api_response.rs b/samples/client/petstore/rust/src/models/api_response.rs index c256dd541f2..7884fba590e 100644 --- a/samples/client/petstore/rust/src/models/api_response.rs +++ b/samples/client/petstore/rust/src/models/api_response.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/category.rs b/samples/client/petstore/rust/src/models/category.rs index c65206929e3..804f9f4c707 100644 --- a/samples/client/petstore/rust/src/models/category.rs +++ b/samples/client/petstore/rust/src/models/category.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/order.rs b/samples/client/petstore/rust/src/models/order.rs index b3cfb487b8d..118dc310767 100644 --- a/samples/client/petstore/rust/src/models/order.rs +++ b/samples/client/petstore/rust/src/models/order.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/pet.rs b/samples/client/petstore/rust/src/models/pet.rs index 73189d5bcfc..64dae06e454 100644 --- a/samples/client/petstore/rust/src/models/pet.rs +++ b/samples/client/petstore/rust/src/models/pet.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/tag.rs b/samples/client/petstore/rust/src/models/tag.rs index cb76addf6e6..503fb7f61bd 100644 --- a/samples/client/petstore/rust/src/models/tag.rs +++ b/samples/client/petstore/rust/src/models/tag.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ diff --git a/samples/client/petstore/rust/src/models/user.rs b/samples/client/petstore/rust/src/models/user.rs index 08bb9db1b6c..6bfa6e2167a 100644 --- a/samples/client/petstore/rust/src/models/user.rs +++ b/samples/client/petstore/rust/src/models/user.rs @@ -3,7 +3,7 @@ * * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ From 4ead766b9e7ecaf250d8e69ccf88270e94338d5a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 18 Jun 2019 16:45:13 +0800 Subject: [PATCH 41/73] Add Fuse to the company list (#3164) Add Fuse to the company list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0ee49a7492e..73412e02810 100644 --- a/README.md +++ b/README.md @@ -536,6 +536,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [codecentric AG](https://www.codecentric.de/) - [Cupix](https://www.cupix.com/) - [FormAPI](https://formapi.io/) +- [Fuse](https://www.fuse.no/) - [GenFlow](https://github.com/RepreZen/GenFlow) - [GMO Pepabo](https://pepabo.com/en/) - [GoDaddy](https://godaddy.com) From 93edd7650bba316e8faf6cbaf7313f458054ce72 Mon Sep 17 00:00:00 2001 From: Rhuan <283004+rhuanbarreto@users.noreply.github.com> Date: Wed, 19 Jun 2019 18:50:29 +0200 Subject: [PATCH 42/73] Fix rubocop obsolescence (#3175) * Update obsolete rubocop configuration * Update obsolete rubocop config * Update obsolete rubocop config --- .../src/main/resources/ruby-client/rubocop.mustache | 2 +- samples/client/petstore/ruby/.rubocop.yml | 2 +- samples/openapi3/client/petstore/ruby/.rubocop.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache index e9f19c082d9..0ef33ce5e32 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache @@ -46,7 +46,7 @@ Layout/EmptyLinesAroundMethodBody: Layout/EmptyLinesAroundModuleBody: Enabled: true -Layout/FirstParameterIndentation: +Layout/IndentFirstArgument: Enabled: true # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. diff --git a/samples/client/petstore/ruby/.rubocop.yml b/samples/client/petstore/ruby/.rubocop.yml index e9f19c082d9..0ef33ce5e32 100644 --- a/samples/client/petstore/ruby/.rubocop.yml +++ b/samples/client/petstore/ruby/.rubocop.yml @@ -46,7 +46,7 @@ Layout/EmptyLinesAroundMethodBody: Layout/EmptyLinesAroundModuleBody: Enabled: true -Layout/FirstParameterIndentation: +Layout/IndentFirstArgument: Enabled: true # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. diff --git a/samples/openapi3/client/petstore/ruby/.rubocop.yml b/samples/openapi3/client/petstore/ruby/.rubocop.yml index e9f19c082d9..0ef33ce5e32 100644 --- a/samples/openapi3/client/petstore/ruby/.rubocop.yml +++ b/samples/openapi3/client/petstore/ruby/.rubocop.yml @@ -46,7 +46,7 @@ Layout/EmptyLinesAroundMethodBody: Layout/EmptyLinesAroundModuleBody: Enabled: true -Layout/FirstParameterIndentation: +Layout/IndentFirstArgument: Enabled: true # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. From fae9d4a37be74347abbe1cb3dd5b795d198c54de Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 20 Jun 2019 12:39:15 +0800 Subject: [PATCH 43/73] 4.0.2 release (#3181) * remove snapshot version * update stable version * remove build.gradle sample from relesae script --- README.md | 16 ++++++++-------- bin/utils/release_version_update_docs.sh | 1 - modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- .../openapi-generator-gradle-plugin/README.adoc | 6 +++--- .../gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/README.md | 2 +- .../samples/local-spec/gradle.properties | 2 +- modules/openapi-generator-maven-plugin/README.md | 2 +- .../examples/java-client.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- .../examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 4 ++-- pom.xml | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- 19 files changed, 28 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 73412e02810..061799132c6 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,8 @@ OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) 4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks) -4.0.2 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.1-SNAPSHOT/)| 15.06.2019 | Patch release (minor bug fixes, etc) -[4.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.1) (latest stable release) | 31.05.2019 | Patch release (bug fixes, minor enhancements, etc) +4.0.2 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.2-SNAPSHOT/)| 15.06.2019 | Patch release (minor bug fixes, etc) +[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 31.05.2019 | Patch release (bug fixes, minor enhancements, etc) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -156,16 +156,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar` +JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar -O openapi-generator-cli.jar +wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -368,10 +368,10 @@ npm install @openapitools/openapi-generator-cli -g openapi-generator version ``` -Or install a particualar OpenAPI Generator version (e.g. v4.0.1): +Or install a particualar OpenAPI Generator version (e.g. v4.0.2): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.0.1 -g +npm install @openapitools/openapi-generator-cli@cli-4.0.2 -g ``` Or install it as dev-dependency: @@ -394,7 +394,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat ``` (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar) +You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` diff --git a/bin/utils/release_version_update_docs.sh b/bin/utils/release_version_update_docs.sh index a19299f34eb..df743e8e47d 100755 --- a/bin/utils/release_version_update_docs.sh +++ b/bin/utils/release_version_update_docs.sh @@ -41,7 +41,6 @@ declare -a files=("modules/openapi-generator-maven-plugin/README.md" "modules/openapi-generator-gradle-plugin/README.adoc" "modules/openapi-generator-gradle-plugin/gradle.properties" "modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties" - "modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle" "modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" "README.md") diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index 98251999816..b00a624b7c0 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 ../.. 4.0.0 diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index d5cb2acecaa..7e88bac61f4 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -5,7 +5,7 @@ openapi-generator-project org.openapitools - 4.0.2-SNAPSHOT + 4.0.2 ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 2c93cc751f2..266d5abd607 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -43,7 +43,7 @@ compileJava.dependsOn tasks.openApiGenerate [source,group] ---- plugins { - id "org.openapi.generator" version "4.0.1" + id "org.openapi.generator" version "4.0.2" } ---- @@ -59,7 +59,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.1" + classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.2" } } @@ -605,7 +605,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' - classpath('org.openapitools:openapi-generator-gradle-plugin:4.0.1') { + classpath('org.openapitools:openapi-generator-gradle-plugin:4.0.2') { exclude group: 'com.google.guava' } } diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index e07dd0df32d..290a3101c57 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,4 +1,4 @@ -openApiGeneratorVersion=4.0.2-SNAPSHOT +openApiGeneratorVersion=4.0.2 # BEGIN placeholders # these are just placeholders to allow contributors to build directly diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 507cfb120b3..046f7e2a483 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index ca68b2306f4..0e4c03fef15 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=4.0.1 openApiValidate +gradle -PopenApiGeneratorVersion=4.0.2 openApiValidate ``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 045cf002579..14930f35ca7 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1 @@ -openApiGeneratorVersion=4.0.2-SNAPSHOT +openApiGeneratorVersion=4.0.2 diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index bcf211db7d4..901e703c4c9 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 4.0.1 + 4.0.2 diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 0d6d91acadd..82a850c1f1c 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2-SNAPSHOT + 4.0.2 diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 1b1e28ee071..47646933f10 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -18,7 +18,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2-SNAPSHOT + 4.0.2 ${project.groupId} diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 06f7f10c733..521f5f39514 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2-SNAPSHOT + 4.0.2 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 6f8fbec5c45..bc2e19936f0 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2-SNAPSHOT + 4.0.2 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 45705f5586a..7b81bb115f0 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 ../.. openapi-generator-maven-plugin diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index cfde6839ac0..d42bdf0dad0 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 ../.. openapi-generator-online diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 7cf23e26d82..239e9df18dc 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 ../.. 4.0.0 @@ -313,7 +313,7 @@ org.openapitools openapi-generator-core - 4.0.2-SNAPSHOT + 4.0.2 diff --git a/pom.xml b/pom.xml index 693734cbc3f..f368fb23e2d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ openapi-generator-project pom openapi-generator-project - 4.0.2-SNAPSHOT + 4.0.2 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 0d7c935fe1b..d02049df835 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 4.0.2-SNAPSHOT + 4.0.2 1.0.0 4.8.1 From 8e11fd9fe4ec060b593ff9d3fcee614e86e3c46a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 20 Jun 2019 18:50:49 +0800 Subject: [PATCH 44/73] Prepare 4.0.3-SNAPSHOT (#3185) * update version to 4.0.3-SNAPSHOT * update readme * update gradle, maven plugin * update release schedule * update samples --- README.md | 8 ++++---- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/README.adoc | 6 +++--- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/README.md | 2 +- .../samples/local-spec/gradle.properties | 2 +- modules/openapi-generator-maven-plugin/README.md | 2 +- .../examples/java-client.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- .../openapi-generator-maven-plugin/examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 4 ++-- pom.xml | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../go/go-petstore-withXml/.openapi-generator/VERSION | 2 +- .../petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../haskell-http-client/.openapi-generator/VERSION | 2 +- .../client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../petstore/java/feign10x/.openapi-generator/VERSION | 2 +- .../java/google-api-client/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../java/jersey2-java6/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit/.openapi-generator/VERSION | 2 +- .../java/retrofit2-play24/.openapi-generator/VERSION | 2 +- .../java/retrofit2-play25/.openapi-generator/VERSION | 2 +- .../java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../javascript-promise-es6/.openapi-generator/VERSION | 2 +- .../javascript-promise/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-promise/src/ApiClient.js | 2 +- .../petstore/javascript-promise/src/api/AnotherFakeApi.js | 2 +- .../client/petstore/javascript-promise/src/api/FakeApi.js | 2 +- .../javascript-promise/src/api/FakeClassnameTags123Api.js | 2 +- .../client/petstore/javascript-promise/src/api/PetApi.js | 2 +- .../petstore/javascript-promise/src/api/StoreApi.js | 2 +- .../client/petstore/javascript-promise/src/api/UserApi.js | 2 +- samples/client/petstore/javascript-promise/src/index.js | 2 +- .../src/model/AdditionalPropertiesAnyType.js | 2 +- .../src/model/AdditionalPropertiesArray.js | 2 +- .../src/model/AdditionalPropertiesBoolean.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../src/model/AdditionalPropertiesInteger.js | 2 +- .../src/model/AdditionalPropertiesNumber.js | 2 +- .../src/model/AdditionalPropertiesObject.js | 2 +- .../src/model/AdditionalPropertiesString.js | 2 +- .../petstore/javascript-promise/src/model/Animal.js | 2 +- .../petstore/javascript-promise/src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../javascript-promise/src/model/ArrayOfNumberOnly.js | 2 +- .../petstore/javascript-promise/src/model/ArrayTest.js | 2 +- .../javascript-promise/src/model/Capitalization.js | 2 +- .../client/petstore/javascript-promise/src/model/Cat.js | 2 +- .../petstore/javascript-promise/src/model/CatAllOf.js | 2 +- .../petstore/javascript-promise/src/model/Category.js | 2 +- .../petstore/javascript-promise/src/model/ClassModel.js | 2 +- .../petstore/javascript-promise/src/model/Client.js | 2 +- .../client/petstore/javascript-promise/src/model/Dog.js | 2 +- .../petstore/javascript-promise/src/model/DogAllOf.js | 2 +- .../petstore/javascript-promise/src/model/EnumArrays.js | 2 +- .../petstore/javascript-promise/src/model/EnumClass.js | 2 +- .../petstore/javascript-promise/src/model/EnumTest.js | 2 +- .../client/petstore/javascript-promise/src/model/File.js | 2 +- .../javascript-promise/src/model/FileSchemaTestClass.js | 2 +- .../petstore/javascript-promise/src/model/FormatTest.js | 2 +- .../javascript-promise/src/model/HasOnlyReadOnly.js | 2 +- .../client/petstore/javascript-promise/src/model/List.js | 2 +- .../petstore/javascript-promise/src/model/MapTest.js | 2 +- .../model/MixedPropertiesAndAdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/Model200Response.js | 2 +- .../petstore/javascript-promise/src/model/ModelReturn.js | 2 +- .../client/petstore/javascript-promise/src/model/Name.js | 2 +- .../petstore/javascript-promise/src/model/NumberOnly.js | 2 +- .../client/petstore/javascript-promise/src/model/Order.js | 2 +- .../javascript-promise/src/model/OuterComposite.js | 2 +- .../petstore/javascript-promise/src/model/OuterEnum.js | 2 +- .../client/petstore/javascript-promise/src/model/Pet.js | 2 +- .../javascript-promise/src/model/ReadOnlyFirst.js | 2 +- .../javascript-promise/src/model/SpecialModelName.js | 2 +- .../client/petstore/javascript-promise/src/model/Tag.js | 2 +- .../javascript-promise/src/model/TypeHolderDefault.js | 2 +- .../javascript-promise/src/model/TypeHolderExample.js | 2 +- .../client/petstore/javascript-promise/src/model/User.js | 2 +- .../petstore/javascript-promise/src/model/XmlItem.js | 2 +- .../client/petstore/javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/src/ApiClient.js | 2 +- .../client/petstore/javascript/src/api/AnotherFakeApi.js | 2 +- samples/client/petstore/javascript/src/api/FakeApi.js | 2 +- .../javascript/src/api/FakeClassnameTags123Api.js | 2 +- samples/client/petstore/javascript/src/api/PetApi.js | 2 +- samples/client/petstore/javascript/src/api/StoreApi.js | 2 +- samples/client/petstore/javascript/src/api/UserApi.js | 2 +- samples/client/petstore/javascript/src/index.js | 2 +- .../javascript/src/model/AdditionalPropertiesAnyType.js | 2 +- .../javascript/src/model/AdditionalPropertiesArray.js | 2 +- .../javascript/src/model/AdditionalPropertiesBoolean.js | 2 +- .../javascript/src/model/AdditionalPropertiesClass.js | 2 +- .../javascript/src/model/AdditionalPropertiesInteger.js | 2 +- .../javascript/src/model/AdditionalPropertiesNumber.js | 2 +- .../javascript/src/model/AdditionalPropertiesObject.js | 2 +- .../javascript/src/model/AdditionalPropertiesString.js | 2 +- samples/client/petstore/javascript/src/model/Animal.js | 2 +- .../client/petstore/javascript/src/model/ApiResponse.js | 2 +- .../javascript/src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../petstore/javascript/src/model/ArrayOfNumberOnly.js | 2 +- samples/client/petstore/javascript/src/model/ArrayTest.js | 2 +- .../petstore/javascript/src/model/Capitalization.js | 2 +- samples/client/petstore/javascript/src/model/Cat.js | 2 +- samples/client/petstore/javascript/src/model/CatAllOf.js | 2 +- samples/client/petstore/javascript/src/model/Category.js | 2 +- .../client/petstore/javascript/src/model/ClassModel.js | 2 +- samples/client/petstore/javascript/src/model/Client.js | 2 +- samples/client/petstore/javascript/src/model/Dog.js | 2 +- samples/client/petstore/javascript/src/model/DogAllOf.js | 2 +- .../client/petstore/javascript/src/model/EnumArrays.js | 2 +- samples/client/petstore/javascript/src/model/EnumClass.js | 2 +- samples/client/petstore/javascript/src/model/EnumTest.js | 2 +- samples/client/petstore/javascript/src/model/File.js | 2 +- .../petstore/javascript/src/model/FileSchemaTestClass.js | 2 +- .../client/petstore/javascript/src/model/FormatTest.js | 2 +- .../petstore/javascript/src/model/HasOnlyReadOnly.js | 2 +- samples/client/petstore/javascript/src/model/List.js | 2 +- samples/client/petstore/javascript/src/model/MapTest.js | 2 +- .../model/MixedPropertiesAndAdditionalPropertiesClass.js | 2 +- .../petstore/javascript/src/model/Model200Response.js | 2 +- .../client/petstore/javascript/src/model/ModelReturn.js | 2 +- samples/client/petstore/javascript/src/model/Name.js | 2 +- .../client/petstore/javascript/src/model/NumberOnly.js | 2 +- samples/client/petstore/javascript/src/model/Order.js | 2 +- .../petstore/javascript/src/model/OuterComposite.js | 2 +- samples/client/petstore/javascript/src/model/OuterEnum.js | 2 +- samples/client/petstore/javascript/src/model/Pet.js | 2 +- .../client/petstore/javascript/src/model/ReadOnlyFirst.js | 2 +- .../petstore/javascript/src/model/SpecialModelName.js | 2 +- samples/client/petstore/javascript/src/model/Tag.js | 2 +- .../petstore/javascript/src/model/TypeHolderDefault.js | 2 +- .../petstore/javascript/src/model/TypeHolderExample.js | 2 +- samples/client/petstore/javascript/src/model/User.js | 2 +- samples/client/petstore/javascript/src/model/XmlItem.js | 2 +- .../petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- .../php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesAnyType.php | 2 +- .../lib/Model/AdditionalPropertiesArray.php | 2 +- .../lib/Model/AdditionalPropertiesBoolean.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../lib/Model/AdditionalPropertiesInteger.php | 2 +- .../lib/Model/AdditionalPropertiesNumber.php | 2 +- .../lib/Model/AdditionalPropertiesObject.php | 2 +- .../lib/Model/AdditionalPropertiesString.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php | 2 +- .../php/OpenAPIClient-php/lib/Model/TypeHolderExample.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php | 2 +- .../php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/StoreApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/UserApiTest.php | 2 +- .../test/Model/AdditionalPropertiesAnyTypeTest.php | 2 +- .../test/Model/AdditionalPropertiesArrayTest.php | 2 +- .../test/Model/AdditionalPropertiesBooleanTest.php | 2 +- .../test/Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AdditionalPropertiesIntegerTest.php | 2 +- .../test/Model/AdditionalPropertiesNumberTest.php | 2 +- .../test/Model/AdditionalPropertiesObjectTest.php | 2 +- .../test/Model/AdditionalPropertiesStringTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/AnimalTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 2 +- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/CapitalizationTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClientTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 2 +- .../test/Model/FileSchemaTestClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FileTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/MapTestTest.php | 2 +- .../MixedPropertiesAndAdditionalPropertiesClassTest.php | 2 +- .../OpenAPIClient-php/test/Model/Model200ResponseTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OrderTest.php | 2 +- .../OpenAPIClient-php/test/Model/OuterCompositeTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 2 +- .../OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../test/Model/TypeHolderDefaultTest.php | 2 +- .../test/Model/TypeHolderExampleTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/XmlItemTest.php | 2 +- .../petstore/python-asyncio/.openapi-generator/VERSION | 2 +- .../petstore/python-tornado/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_any_type.rb | 2 +- .../lib/petstore/models/additional_properties_array.rb | 2 +- .../lib/petstore/models/additional_properties_boolean.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../lib/petstore/models/additional_properties_integer.rb | 2 +- .../lib/petstore/models/additional_properties_number.rb | 2 +- .../lib/petstore/models/additional_properties_object.rb | 2 +- .../lib/petstore/models/additional_properties_string.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/category.rb | 2 +- .../petstore/ruby/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../ruby/lib/petstore/models/has_only_read_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../petstore/ruby/lib/petstore/models/number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../ruby/lib/petstore/models/type_holder_default.rb | 2 +- .../ruby/lib/petstore/models/type_holder_example.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/xml_item.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- .../petstore/ruby/spec/api/another_fake_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/fake_api_spec.rb | 2 +- .../ruby/spec/api/fake_classname_tags123_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/pet_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/store_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/user_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- .../spec/models/additional_properties_any_type_spec.rb | 2 +- .../ruby/spec/models/additional_properties_array_spec.rb | 2 +- .../spec/models/additional_properties_boolean_spec.rb | 2 +- .../ruby/spec/models/additional_properties_class_spec.rb | 2 +- .../spec/models/additional_properties_integer_spec.rb | 2 +- .../ruby/spec/models/additional_properties_number_spec.rb | 2 +- .../ruby/spec/models/additional_properties_object_spec.rb | 2 +- .../ruby/spec/models/additional_properties_string_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/animal_spec.rb | 2 +- .../client/petstore/ruby/spec/models/api_response_spec.rb | 2 +- .../spec/models/array_of_array_of_number_only_spec.rb | 2 +- .../ruby/spec/models/array_of_number_only_spec.rb | 2 +- .../client/petstore/ruby/spec/models/array_test_spec.rb | 2 +- .../petstore/ruby/spec/models/capitalization_spec.rb | 2 +- .../client/petstore/ruby/spec/models/cat_all_of_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/cat_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/category_spec.rb | 2 +- .../client/petstore/ruby/spec/models/class_model_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/client_spec.rb | 2 +- .../client/petstore/ruby/spec/models/dog_all_of_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/dog_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_arrays_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_test_spec.rb | 2 +- .../ruby/spec/models/file_schema_test_class_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/file_spec.rb | 2 +- .../client/petstore/ruby/spec/models/format_test_spec.rb | 2 +- .../petstore/ruby/spec/models/has_only_read_only_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/list_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/map_test_spec.rb | 2 +- ...xed_properties_and_additional_properties_class_spec.rb | 2 +- .../petstore/ruby/spec/models/model200_response_spec.rb | 2 +- .../client/petstore/ruby/spec/models/model_return_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/name_spec.rb | 2 +- .../client/petstore/ruby/spec/models/number_only_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/order_spec.rb | 2 +- .../petstore/ruby/spec/models/outer_composite_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_enum_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/pet_spec.rb | 2 +- .../petstore/ruby/spec/models/read_only_first_spec.rb | 2 +- .../petstore/ruby/spec/models/special_model_name_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/tag_spec.rb | 2 +- .../petstore/ruby/spec/models/type_holder_default_spec.rb | 2 +- .../petstore/ruby/spec/models/type_holder_example_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/user_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/xml_item_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../typescript-angular-v2/npm/.openapi-generator/VERSION | 2 +- .../with-interfaces/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../typescript-angular-v4/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../typescript-angularjs/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../typescript-node/default/.openapi-generator/VERSION | 2 +- .../typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- .../php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject1.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject2.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject3.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject4.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineObject5.php | 2 +- .../OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/DefaultApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/StoreApiTest.php | 2 +- .../php/OpenAPIClient-php/test/Api/UserApiTest.php | 2 +- .../test/Model/AdditionalPropertiesClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/AnimalTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 2 +- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/CapitalizationTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClientTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 2 +- .../test/Model/FileSchemaTestClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FileTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/FooTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 2 +- .../test/Model/HealthCheckResultTest.php | 2 +- .../OpenAPIClient-php/test/Model/InlineObject1Test.php | 2 +- .../OpenAPIClient-php/test/Model/InlineObject2Test.php | 2 +- .../OpenAPIClient-php/test/Model/InlineObject3Test.php | 2 +- .../OpenAPIClient-php/test/Model/InlineObject4Test.php | 2 +- .../OpenAPIClient-php/test/Model/InlineObject5Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObjectTest.php | 2 +- .../test/Model/InlineResponseDefaultTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/MapTestTest.php | 2 +- .../MixedPropertiesAndAdditionalPropertiesClassTest.php | 2 +- .../OpenAPIClient-php/test/Model/Model200ResponseTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../OpenAPIClient-php/test/Model/NullableClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OrderTest.php | 2 +- .../OpenAPIClient-php/test/Model/OuterCompositeTest.php | 2 +- .../test/Model/OuterEnumDefaultValueTest.php | 2 +- .../test/Model/OuterEnumIntegerDefaultValueTest.php | 2 +- .../OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 2 +- .../OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../client/petstore/python/.openapi-generator/VERSION | 2 +- .../client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/openapi3/client/petstore/ruby/lib/petstore.rb | 2 +- .../petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api_client.rb | 2 +- .../client/petstore/ruby/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/category.rb | 2 +- .../petstore/ruby/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/client.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- .../petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby/lib/petstore/models/health_check_result.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/list.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/number_only.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../petstore/models/outer_enum_integer_default_value.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../ruby/lib/petstore/models/special_model_name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/user.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/openapi3/client/petstore/ruby/petstore.gemspec | 2 +- .../petstore/ruby/spec/api/another_fake_api_spec.rb | 2 +- .../client/petstore/ruby/spec/api/default_api_spec.rb | 2 +- .../client/petstore/ruby/spec/api/fake_api_spec.rb | 2 +- .../ruby/spec/api/fake_classname_tags123_api_spec.rb | 2 +- .../client/petstore/ruby/spec/api/pet_api_spec.rb | 2 +- .../client/petstore/ruby/spec/api/store_api_spec.rb | 2 +- .../client/petstore/ruby/spec/api/user_api_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/api_client_spec.rb | 2 +- .../client/petstore/ruby/spec/configuration_spec.rb | 2 +- .../ruby/spec/models/additional_properties_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/animal_spec.rb | 2 +- .../client/petstore/ruby/spec/models/api_response_spec.rb | 2 +- .../spec/models/array_of_array_of_number_only_spec.rb | 2 +- .../ruby/spec/models/array_of_number_only_spec.rb | 2 +- .../client/petstore/ruby/spec/models/array_test_spec.rb | 2 +- .../petstore/ruby/spec/models/capitalization_spec.rb | 2 +- .../client/petstore/ruby/spec/models/cat_all_of_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/cat_spec.rb | 2 +- .../client/petstore/ruby/spec/models/category_spec.rb | 2 +- .../client/petstore/ruby/spec/models/class_model_spec.rb | 2 +- .../client/petstore/ruby/spec/models/client_spec.rb | 2 +- .../client/petstore/ruby/spec/models/dog_all_of_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/dog_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_arrays_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_test_spec.rb | 2 +- .../ruby/spec/models/file_schema_test_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/file_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/foo_spec.rb | 2 +- .../client/petstore/ruby/spec/models/format_test_spec.rb | 2 +- .../petstore/ruby/spec/models/has_only_read_only_spec.rb | 2 +- .../petstore/ruby/spec/models/health_check_result_spec.rb | 2 +- .../ruby/spec/models/inline_response_default_spec.rb | 2 +- .../client/petstore/ruby/spec/models/list_spec.rb | 2 +- .../client/petstore/ruby/spec/models/map_test_spec.rb | 2 +- ...xed_properties_and_additional_properties_class_spec.rb | 2 +- .../petstore/ruby/spec/models/model200_response_spec.rb | 2 +- .../client/petstore/ruby/spec/models/model_return_spec.rb | 2 +- .../client/petstore/ruby/spec/models/name_spec.rb | 2 +- .../petstore/ruby/spec/models/nullable_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/number_only_spec.rb | 2 +- .../client/petstore/ruby/spec/models/order_spec.rb | 2 +- .../petstore/ruby/spec/models/outer_composite_spec.rb | 2 +- .../ruby/spec/models/outer_enum_default_value_spec.rb | 2 +- .../spec/models/outer_enum_integer_default_value_spec.rb | 2 +- .../petstore/ruby/spec/models/outer_enum_integer_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_enum_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/pet_spec.rb | 2 +- .../petstore/ruby/spec/models/read_only_first_spec.rb | 2 +- .../petstore/ruby/spec/models/special_model_name_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/tag_spec.rb | 2 +- .../client/petstore/ruby/spec/models/user_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/spec_helper.rb | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- .../server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../php-silex/OpenAPIServer/.openapi-generator/VERSION | 2 +- .../server/petstore/php-slim/.openapi-generator/VERSION | 2 +- .../SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../server/petstore/php-ze-ph/.openapi-generator/VERSION | 2 +- .../output/openapi-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../spring-mvc-j8-async/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../server/petstore/spring-mvc/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-delegate/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-reactive/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-useoptional/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-virtualan/.openapi-generator/VERSION | 2 +- .../org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- .../server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- 771 files changed, 777 insertions(+), 777 deletions(-) diff --git a/README.md b/README.md index 061799132c6..cae8ada578c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.2`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.3`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) @@ -98,9 +98,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) -4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks) -4.0.2 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.2-SNAPSHOT/)| 15.06.2019 | Patch release (minor bug fixes, etc) -[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 31.05.2019 | Patch release (bug fixes, minor enhancements, etc) +4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 31.07.2019 | Minor release (breaking changes with fallbacks) +4.0.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.3-SNAPSHOT/)| 04.07.2019 | Patch release (minor bug fixes, etc) +[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index b00a624b7c0..41c13455d56 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT ../.. 4.0.0 diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index 7e88bac61f4..a8c2deeb134 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -5,7 +5,7 @@ openapi-generator-project org.openapitools - 4.0.2 + 4.0.3-SNAPSHOT ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 266d5abd607..78bccf0eddc 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -43,7 +43,7 @@ compileJava.dependsOn tasks.openApiGenerate [source,group] ---- plugins { - id "org.openapi.generator" version "4.0.2" + id "org.openapi.generator" version "4.0.3-SNAPSHOT" } ---- @@ -59,7 +59,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.2" + classpath "org.openapitools:openapi-generator-gradle-plugin:4.0.3-SNAPSHOT" } } @@ -605,7 +605,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' - classpath('org.openapitools:openapi-generator-gradle-plugin:4.0.2') { + classpath('org.openapitools:openapi-generator-gradle-plugin:4.0.3-SNAPSHOT') { exclude group: 'com.google.guava' } } diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 290a3101c57..5fc12b69996 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,4 +1,4 @@ -openApiGeneratorVersion=4.0.2 +openApiGeneratorVersion=4.0.3-SNAPSHOT # BEGIN placeholders # these are just placeholders to allow contributors to build directly diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 046f7e2a483..d50d25be751 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index 0e4c03fef15..0dc7527c2a4 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=4.0.2 openApiValidate +gradle -PopenApiGeneratorVersion=4.0.3-SNAPSHOT openApiValidate ``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 14930f35ca7..ff5fd0c2e04 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1 @@ -openApiGeneratorVersion=4.0.2 +openApiGeneratorVersion=4.0.3-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 901e703c4c9..6aeeef9d741 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 4.0.2 + 4.0.3-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 82a850c1f1c..7be98ce9451 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2 + 4.0.3-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 47646933f10..7ce9ae62f48 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -18,7 +18,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2 + 4.0.3-SNAPSHOT ${project.groupId} diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 521f5f39514..bac384aa7d4 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2 + 4.0.3-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index bc2e19936f0..74fab82198f 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 4.0.2 + 4.0.3-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 7b81bb115f0..65c682b2c75 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT ../.. openapi-generator-maven-plugin diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index d42bdf0dad0..7da9adbe7ed 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT ../.. openapi-generator-online diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 239e9df18dc..200d7dbc9f2 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT ../.. 4.0.0 @@ -313,7 +313,7 @@ org.openapitools openapi-generator-core - 4.0.2 + 4.0.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index f368fb23e2d..e47f6cedbf6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ openapi-generator-project pom openapi-generator-project - 4.0.2 + 4.0.3-SNAPSHOT https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign10x/.openapi-generator/VERSION b/samples/client/petstore/java/feign10x/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/feign10x/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign10x/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 4fef040e2b5..21309bb91ef 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 67d4be803bb..77e211b7d72 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index bb46be0bdde..07f8831c9bf 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index 62ec3f129d4..04ef8f0e0b9 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index c1f32608c9f..44b66519098 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index 85483d74677..6d6524de496 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index 0dba65ff97c..23f90b4e572 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index cdfb007867e..d99b3255660 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js index 39e57daff9b..01a6f46a829 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js index 55d228d899a..93813f985b8 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js index cab014040eb..2e13efd1862 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index d1225421cb5..bbb2d55f8c1 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js index 6cee082255f..87af8bc50cf 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js index d6448c61869..3a9e6014893 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js index 6aa30e70370..bd9929151a0 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js index 3a10fae677c..588b188ce0d 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 9a81130304b..dcaa25d5970 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index 717d2a446c9..46d7df90be7 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index aa7e0c203d8..917c7ef12b6 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index 10ed2e8883d..38a598418d6 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index 1cf3aec82db..b5dc556336f 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index 3da66ddf673..106f057c462 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index d9f628db7cf..4159fbccece 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/CatAllOf.js b/samples/client/petstore/javascript-promise/src/model/CatAllOf.js index af38f1ace9f..2c661a65dcb 100644 --- a/samples/client/petstore/javascript-promise/src/model/CatAllOf.js +++ b/samples/client/petstore/javascript-promise/src/model/CatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index 5aae0d34778..e87a1a94e59 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 38770451e94..ceb0d475551 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index 1852214a06e..5e4caf9849c 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index dd3c4775301..5bcde935c2f 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/DogAllOf.js b/samples/client/petstore/javascript-promise/src/model/DogAllOf.js index 3859ac376ce..fdb59976318 100644 --- a/samples/client/petstore/javascript-promise/src/model/DogAllOf.js +++ b/samples/client/petstore/javascript-promise/src/model/DogAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index f4f2bfc32a1..17072836a66 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index c3e6442de24..3773c2f5351 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index eb738521475..4cc4ca747ed 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/File.js b/samples/client/petstore/javascript-promise/src/model/File.js index fbda80bad06..b0eca93fe24 100644 --- a/samples/client/petstore/javascript-promise/src/model/File.js +++ b/samples/client/petstore/javascript-promise/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js index 761cd672fd1..1f986db54ce 100644 --- a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index e16144e0f2b..81ae0531f18 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 9154180515d..318eccf599a 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index 0ac533fa52d..41fc5c6ee61 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index 75a06546908..01f74c4c4b9 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 2d8ff16010c..1a6b689c55f 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index 59f0418fb16..7dd20902cb3 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index 7c1a30b79e9..1892e393667 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index a38a280e113..58f85c953d3 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index b726076021c..c5609501d02 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index 2338e05dfb9..3995314f7b8 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index 653080091ca..1552b89164b 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index 68fe853aca0..240feb4020c 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index b4500bd0bdc..dbbf49c022a 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index 83114b883f7..da91085825a 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index 8749131e4a2..bcadb7f3c8d 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index bf2fce0d721..d6d6b2626ac 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js index 0add51e2120..97bb1429fd1 100644 --- a/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js +++ b/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js b/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js index e52a79fc4d0..c1a701b9e1a 100644 --- a/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js +++ b/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index b5b9d7e2db2..b52e9fcb464 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/XmlItem.js b/samples/client/petstore/javascript-promise/src/model/XmlItem.js index a1e5bdb8462..2df81c391ad 100644 --- a/samples/client/petstore/javascript-promise/src/model/XmlItem.js +++ b/samples/client/petstore/javascript-promise/src/model/XmlItem.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index b952b5cb910..11541eb040b 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index 5bb934deb59..fdc6f0419c4 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index faeb7affeb9..d14731a0276 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index f38b8187142..8f093773353 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index 869605cfcc9..68de3e783d6 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index b62a1775bca..32dee66b57f 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index bd4f5966d1f..f872828adb6 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index cdfb007867e..d99b3255660 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js index 39e57daff9b..01a6f46a829 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js index 55d228d899a..93813f985b8 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js index cab014040eb..2e13efd1862 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index d1225421cb5..bbb2d55f8c1 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js index 6cee082255f..87af8bc50cf 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js index d6448c61869..3a9e6014893 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js index 6aa30e70370..bd9929151a0 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js index 3a10fae677c..588b188ce0d 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 9a81130304b..dcaa25d5970 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index 717d2a446c9..46d7df90be7 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index aa7e0c203d8..917c7ef12b6 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index 10ed2e8883d..38a598418d6 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index 1cf3aec82db..b5dc556336f 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index 3da66ddf673..106f057c462 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index d9f628db7cf..4159fbccece 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/CatAllOf.js b/samples/client/petstore/javascript/src/model/CatAllOf.js index af38f1ace9f..2c661a65dcb 100644 --- a/samples/client/petstore/javascript/src/model/CatAllOf.js +++ b/samples/client/petstore/javascript/src/model/CatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index 5aae0d34778..e87a1a94e59 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 38770451e94..ceb0d475551 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index 1852214a06e..5e4caf9849c 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index dd3c4775301..5bcde935c2f 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/DogAllOf.js b/samples/client/petstore/javascript/src/model/DogAllOf.js index 3859ac376ce..fdb59976318 100644 --- a/samples/client/petstore/javascript/src/model/DogAllOf.js +++ b/samples/client/petstore/javascript/src/model/DogAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index f4f2bfc32a1..17072836a66 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index c3e6442de24..3773c2f5351 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index eb738521475..4cc4ca747ed 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/File.js b/samples/client/petstore/javascript/src/model/File.js index fbda80bad06..b0eca93fe24 100644 --- a/samples/client/petstore/javascript/src/model/File.js +++ b/samples/client/petstore/javascript/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js index 761cd672fd1..1f986db54ce 100644 --- a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index e16144e0f2b..81ae0531f18 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 9154180515d..318eccf599a 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index 0ac533fa52d..41fc5c6ee61 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index 75a06546908..01f74c4c4b9 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 2d8ff16010c..1a6b689c55f 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index 59f0418fb16..7dd20902cb3 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index 7c1a30b79e9..1892e393667 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index a38a280e113..58f85c953d3 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index b726076021c..c5609501d02 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index 2338e05dfb9..3995314f7b8 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index 653080091ca..1552b89164b 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index 68fe853aca0..240feb4020c 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index b4500bd0bdc..dbbf49c022a 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index 83114b883f7..da91085825a 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index 8749131e4a2..bcadb7f3c8d 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index bf2fce0d721..d6d6b2626ac 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript/src/model/TypeHolderDefault.js index 0add51e2120..97bb1429fd1 100644 --- a/samples/client/petstore/javascript/src/model/TypeHolderDefault.js +++ b/samples/client/petstore/javascript/src/model/TypeHolderDefault.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/TypeHolderExample.js b/samples/client/petstore/javascript/src/model/TypeHolderExample.js index e52a79fc4d0..c1a701b9e1a 100644 --- a/samples/client/petstore/javascript/src/model/TypeHolderExample.js +++ b/samples/client/petstore/javascript/src/model/TypeHolderExample.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index b5b9d7e2db2..b52e9fcb464 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/XmlItem.js b/samples/client/petstore/javascript/src/model/XmlItem.js index a1e5bdb8462..2df81c391ad 100644 --- a/samples/client/petstore/javascript/src/model/XmlItem.js +++ b/samples/client/petstore/javascript/src/model/XmlItem.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 179654d0f9a..147e607529c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 5ac482b9ae5..bbbc02dcd4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 87e581241e0..ba195a75a9f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 9301626f7e7..d5cc2ff01c8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 7c6f6fea044..ebdedc1da51 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 574754f6566..67f2c2b7dcb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 989eb973ac3..4148733c5de 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 575218ee817..8394d5a18d9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 4fdd2d4767e..b9498a8907d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php index c66a7d4e184..b66244aade4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php index a2e1162867f..d95e3ce78a1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php index b3a48d586cf..066f13e4990 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 71c1e35041e..8cdcfaedd1b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php index 0900fa2c129..e3f74ab71ab 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php index 97e37d563a9..4777c322729 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php index 005eb6d5870..96ce0fb7544 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php index 60bf1e73905..251d3038893 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 2c5144ce5a2..dd8b67f8f17 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 44d1edac0f5..9bb7facaf62 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index e9a87adc9d2..0055343d84a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index c9256de2c77..d9dbf5db14e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 005b50477ee..3f90d5c992e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index f71ada678cc..f2aabee5302 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 4d136118f7a..4b194a150e8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index d7e0d915213..5a4f483d47d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 933c6a1605e..5f80bad93e2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 240bf490f33..de1bf8860fe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index a09c82dfd72..d17f7b7a2e1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index beec5b6dd22..733713a4fb5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 8aeceae767e..7d9ee7269b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 5ae72937f9c..0c3ad388a37 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 5359a4676c8..ae7d81a67b3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index cef9e84b5bc..840bb86b012 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index 415f0ebcb11..477d275dc59 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index a5b7791e2dc..0ad4faf43df 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index eb469006b61..b03b86799d0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 25eca85b022..5207ba99261 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 44ad6f18f10..d8447b1db7c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 4434ce3f8c4..ceb023ff220 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3f0ca8a92af..1bc1ea7f169 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index b49c7add38e..6a7ade36f60 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index bbc04c7f7c5..cbda722fbed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 5279792cc44..09cf92e8947 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 8223717236e..1ed9158e984 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index fad31f63a9e..7f79a5ae3ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 1db581afcbf..d97b31d94ef 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 6cd312a53ce..c50307c0ccf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 54f66d6c08c..60fcbc83877 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index d54100650b1..234a9c94906 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index a6311df732e..1ad31815543 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 2f3ff5e34f2..9f5f4d8e8d5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 921844a5245..aefcb452c52 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php index d934d13387c..f56fcfc6b25 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php index 80b27770100..d1b50ec3a5d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 7eadc95182f..2c00fdb5dee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php index 0be95efe46e..45b4c857ce7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 5cfec74b3e6..2bc5d1b7e5a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 5f604c19098..1d01c7abd2b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 1bc1d0a216f..5a720b3e4a4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index f8b3c6d2d67..5c9bdf92674 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 8df38eb8f6d..8cfb7f486bc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 1d72c8ecd3f..0c372c46798 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index e2d3492b438..91df6b9db04 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php index fc6faa0acd9..455dff3a88f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php index 4ae8c28c278..b7514544378 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php index 74302bbdac4..b652dae4b9f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 876238473d0..594ea915a35 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php index 474a15044b5..d3b4a0e8f40 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php index 79fa932242c..4bdd0980fe5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php index 9a3d775be41..8f745f089f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php index bb2bd231bd6..675a2fd5d5f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 5fd6920d976..4a5c906d32c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 409547a98f9..a9b8a5d07b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index bf0140906c6..23c3fc9b1e4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 28ff2a0ec44..8bb80a82d5c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index f7d65541cbc..7e8a462f4c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 3dce5624983..4d9d32107a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index f82d7bf32f3..a4cc76a99ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index a6867b5c52c..692d86e6f33 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 6920f98f31a..2adfebb0052 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index cd8dc262130..a312eadece2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index d68da002447..d7ab63b62a5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index 2030b723278..3a97078224e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index ae01db3ce6b..5dff0503c6a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 82b7b022d0f..e13c529bd03 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index dd3e7813792..94fc250c4a9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 69604f8cd87..e42e10aeee7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index a494e3dac29..b0878debb77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 5a581a4dedb..9cddea2397b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index b22e66e130f..31b42929859 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 8ffb9f20cb2..7da207cd82f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index f07b518bd72..3b9f6802242 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 1c691c4edd7..dc7779769a0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index f02e39adcd9..a8c5ee752dd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 998cc79f3ff..fc69bd8aebe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index a64eb1563cc..6c08a975e17 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index bb7b76707db..eedd9b2caa4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 71adbb4f6f4..445967039a8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 8f077d14e57..f71bb7487e9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 55be62442f7..edb352a1e27 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index af463f68c6c..06c0b8765bb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 9973081f84d..554c0f512dc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 98107694f4d..9c8ad267512 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 2bff0e1c883..b3e27d5b2d1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index fdfece6ef17..836c2b81981 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php index 3c6545c4bea..ffcd6501fb1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php index 3e622634eda..8ed5928f617 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 0a3b0436c2c..452e1a5386b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php index a3ea31a307c..c398e33d80a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index dde05e5c388..7223b4318f7 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index f957c352092..062db1452f8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 314b100ee77..37b8521370a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 6e33ef4e10e..fe9a97e9c59 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 936d0027a02..411a5b4e0de 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 774dc9a55a9..53bee28a727 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 3a90e874a20..7f93215bed8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 8d36b435ea4..812bc9d3120 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 5c9549b897c..5ba79adc419 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 08d9bb569f0..2d99220fcd0 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb index 2a34e4cc8c5..a3f58a9857d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb index 65c2b1d2960..aaffa5c63a5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb index ee8763fc7af..ab698e8d49b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 4d24050b9ce..a59c2071098 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb index f8eb4b8a879..dd62b9f0674 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb index 50d631e709b..6e21251f39b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb index 854d2f06dc2..0a8556524f1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb index c528de2e615..19d191b6b9b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 175ba6087f1..d7121f92150 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 257e6d3e318..2e1d8ec2630 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 44f71398b60..937965575ea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 51b503e22d2..e2074eafd1f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 963c352ebc3..858bea4d863 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index 58df2d4c218..cf4fbd41142 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 153ca893de9..a8bc8f78b99 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 15e90c36291..727c6c8223d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index fec033ab213..f971581ab7d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index e3b990b841e..80d6608f054 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index b8198a200af..7ea074ffcf2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index f83c29b7f98..522a5dcf5d5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index d9cd45293fc..b9fbcc963c9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index edb6067b2ad..0ad140a63d0 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 6c5910cd6f6..5fc39b0fef1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index b7c80157a70..96f575069fe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 6ba9843c572..c86976b1f63 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 6412937223a..19f0eaa4b83 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index d9a1957fab8..232992fd7e2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 748f46160c3..2d80d8a8226 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index de0e7ce5f09..bb2fec59834 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 46c5ffb9659..f9af8ab6b83 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 995d7e0555c..3250f5831b4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index b0f219667b6..412f609b9e0 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 41fd37ea775..0c26566e4dd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 9a389dbf73c..48104d3ce2f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 0ab884564cb..ea9039572a6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index dd9928ca7f0..e1ce45731f9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index bff85189ef1..816b0434eb6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 9df53b3fe8f..f0d5fb41982 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 8bc8b9caeb3..4e948c74160 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index f0f65d50848..16091b35886 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index aa411ba6590..437c41d2005 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index 2933a67a41b..ed84f9057ab 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb b/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb index 2d081539e88..e4faca2386d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb b/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb index a08276cbece..eb94467f73f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 0adb4d19caf..83b8c00f65f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb b/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb index 0f22f6943fe..7114cf2e56d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 905b3c30fd6..431b7234543 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 1a77140ea2d..3c07d63e1ce 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 1bd8a0802d6..5529eec5ea7 100644 --- a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb index 44741637ea3..5042576eee5 100644 --- a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index bd0d0c57153..df70a7cf05f 100644 --- a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/client/petstore/ruby/spec/api/pet_api_spec.rb index 1e93c9d722a..1c7dd2170a6 100644 --- a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/pet_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/client/petstore/ruby/spec/api/store_api_spec.rb index 08a584b7c64..45f58810140 100644 --- a/samples/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/store_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/client/petstore/ruby/spec/api/user_api_spec.rb index 5540cd9b60b..c76553a8a21 100644 --- a/samples/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/user_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 8394b483c0d..24de4450e0f 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index a235deb3692..e080ed6c312 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb index 8d029fa1d16..4be9efc3a91 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb index 572be779d68..cdc05049ff5 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb index 9335075b834..cf02b1750fe 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index 1ab5df12ddb..5b24c1eb152 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb index 5fc0ad1a005..525f6dad026 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb index 42b05b372ff..aa73a184208 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb index 00db1647381..3303d556d13 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb index 6e38ab9ffb7..ac88ccf8a4c 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/animal_spec.rb b/samples/client/petstore/ruby/spec/models/animal_spec.rb index 32185704b8c..60501a8f891 100644 --- a/samples/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/client/petstore/ruby/spec/models/animal_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/client/petstore/ruby/spec/models/api_response_spec.rb index 5dec6f58b4c..c096f4d6c3d 100644 --- a/samples/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index eff84e18c73..b6e2ff354fd 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index 025a7f3035d..450c902cb7a 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/client/petstore/ruby/spec/models/array_test_spec.rb index 1d12b6f59d0..3b38a04ea89 100644 --- a/samples/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/client/petstore/ruby/spec/models/capitalization_spec.rb index 96acb78e5e5..c2fee05230c 100644 --- a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/client/petstore/ruby/spec/models/capitalization_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 0433529778a..9ca18be74d6 100644 --- a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/cat_spec.rb b/samples/client/petstore/ruby/spec/models/cat_spec.rb index 824cad871a4..c89bc515dfe 100644 --- a/samples/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/category_spec.rb b/samples/client/petstore/ruby/spec/models/category_spec.rb index eaf0d4d709a..817e27b64c2 100644 --- a/samples/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/client/petstore/ruby/spec/models/category_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/client/petstore/ruby/spec/models/class_model_spec.rb index 52e3704dc7c..dc600c83478 100644 --- a/samples/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/client/petstore/ruby/spec/models/class_model_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/client_spec.rb b/samples/client/petstore/ruby/spec/models/client_spec.rb index 401ec6434b0..974de03ccb2 100644 --- a/samples/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/client/petstore/ruby/spec/models/client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 232c661c6f5..aff46497e8a 100644 --- a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/dog_spec.rb b/samples/client/petstore/ruby/spec/models/dog_spec.rb index 41317361177..deaf7e9bec5 100644 --- a/samples/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb index b897075e25f..168830a2f6a 100644 --- a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb index 1bc61fbfda0..07ce1c5cb91 100644 --- a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb index d55615a25d4..537f69366f7 100644 --- a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index 4390b420b8d..bfcd7f90d20 100644 --- a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/file_spec.rb b/samples/client/petstore/ruby/spec/models/file_spec.rb index 8305d1a237c..a7f461e1dc5 100644 --- a/samples/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb index dfd24d1d2f4..268a0319c20 100644 --- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index 842d0a77897..0763dd8135e 100644 --- a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/list_spec.rb b/samples/client/petstore/ruby/spec/models/list_spec.rb index 05363099fca..9eb38d52d32 100644 --- a/samples/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/client/petstore/ruby/spec/models/list_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/client/petstore/ruby/spec/models/map_test_spec.rb index 5c5ce301d9d..7b4ed936479 100644 --- a/samples/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/map_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index b2a22cfe286..00659436ff5 100644 --- a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/client/petstore/ruby/spec/models/model200_response_spec.rb index d651681ed55..0ba205530f3 100644 --- a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model200_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/client/petstore/ruby/spec/models/model_return_spec.rb index e5839a90a4c..14c2133145d 100644 --- a/samples/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model_return_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/name_spec.rb b/samples/client/petstore/ruby/spec/models/name_spec.rb index a2436c3f6d8..15ae83e287e 100644 --- a/samples/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/client/petstore/ruby/spec/models/number_only_spec.rb index 3142bac8388..b9c9935fefb 100644 --- a/samples/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/order_spec.rb b/samples/client/petstore/ruby/spec/models/order_spec.rb index 4881fcd6735..902870e2223 100644 --- a/samples/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/client/petstore/ruby/spec/models/order_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb index 655f25318ef..0322b7df3c3 100644 --- a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb index 632d61d450f..b8532bf2608 100644 --- a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/pet_spec.rb b/samples/client/petstore/ruby/spec/models/pet_spec.rb index 28d9ca394ff..61948e14846 100644 --- a/samples/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/models/pet_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb index 745e517cebf..3f94032172d 100644 --- a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb index 367cb2dd13b..709f344ccfb 100644 --- a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/tag_spec.rb b/samples/client/petstore/ruby/spec/models/tag_spec.rb index e4c937cde06..97836886ab8 100644 --- a/samples/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/client/petstore/ruby/spec/models/tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb index 1fcde4eaaa7..d8929c5a387 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb index fd254b5132c..37d71df5335 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/user_spec.rb b/samples/client/petstore/ruby/spec/models/user_spec.rb index 5580379e0a7..9de30cebc96 100644 --- a/samples/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/client/petstore/ruby/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb b/samples/client/petstore/ruby/spec/models/xml_item_spec.rb index e48a85fa8ad..4b3256d99fc 100644 --- a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb +++ b/samples/client/petstore/ruby/spec/models/xml_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index 72dc5e44cd8..d6e2161c73a 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 6256f6db18d..f162e010190 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index b26de483b46..7b887a1ff9d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 3f54740e435..49bdaafbc75 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index b951c34e044..508ff1fab03 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 85d1ff6810c..0a77e586e27 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 05fcbc445ac..5a643c7f94e 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index d02049df835..e48c8f444e0 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 4.0.2 + 4.0.3-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index f1a6a44a288..42db8a038b5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 4ac89f95692..4d5306f9ae1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 80d1094ee9b..8dd6b321d48 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 3f17e5d40a1..95b30f58ca0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 8fdc2cc36e4..ae38a9d3480 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 27146553d94..cd260cdab34 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 6946a929904..a8f2a1068ca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 989eb973ac3..4148733c5de 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 91affea9e52..ec691e77211 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 4fdd2d4767e..b9498a8907d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 26f308834e5..1c968163a99 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 2c5144ce5a2..dd8b67f8f17 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 44d1edac0f5..9bb7facaf62 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index e9a87adc9d2..0055343d84a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index c9256de2c77..d9dbf5db14e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 005b50477ee..3f90d5c992e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index f71ada678cc..f2aabee5302 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 4d136118f7a..4b194a150e8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index d7e0d915213..5a4f483d47d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 933c6a1605e..5f80bad93e2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 240bf490f33..de1bf8860fe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index a09c82dfd72..d17f7b7a2e1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index beec5b6dd22..733713a4fb5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 8aeceae767e..7d9ee7269b4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 5ae72937f9c..0c3ad388a37 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 5359a4676c8..ae7d81a67b3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 2bff9b384cc..1d6313fe806 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index 415f0ebcb11..477d275dc59 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index a5b7791e2dc..0ad4faf43df 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index 07bf92f667e..9b6f81936bd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 85b756daa11..878bfcd4b2c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 25eca85b022..5207ba99261 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index c8652e565d6..ac8b7373f07 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php index c32066ad332..9caaded4f93 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php index 126c2fd870f..25c3a3374be 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php index 370708a7195..b9331cd184e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php index befca190d95..b24162625a8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php index f81a1594d10..4933ed4e381 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php index 8604e863ab8..1ad882ce36a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index e6f0aca15d3..584bce777a8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 44ad6f18f10..d8447b1db7c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 4434ce3f8c4..ceb023ff220 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3f0ca8a92af..1bc1ea7f169 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index b49c7add38e..6a7ade36f60 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index bbc04c7f7c5..cbda722fbed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 5279792cc44..09cf92e8947 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 8223717236e..1ed9158e984 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index c75d953d40f..c358a4a5b46 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index fad31f63a9e..7f79a5ae3ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 1db581afcbf..d97b31d94ef 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 6cd312a53ce..c50307c0ccf 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 54f66d6c08c..60fcbc83877 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 2acd0a95bc2..5824ae48b07 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 9441111155d..7a59b701444 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index e5046658087..93be1607f00 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index d54100650b1..234a9c94906 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index a6311df732e..1ad31815543 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 8fac1373f0d..67cf1b3408e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 921844a5245..aefcb452c52 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 7eadc95182f..2c00fdb5dee 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 5cfec74b3e6..2bc5d1b7e5a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 5f604c19098..1d01c7abd2b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php index 5945b0734ba..329774d6d15 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 24e64e8f091..6ec83e40bb3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index f8b3c6d2d67..5c9bdf92674 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 8df38eb8f6d..8cfb7f486bc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 1d72c8ecd3f..0c372c46798 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index e2d3492b438..91df6b9db04 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index c812606c38e..8acc4b27e7e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 5fd6920d976..4a5c906d32c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 409547a98f9..a9b8a5d07b4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index bf0140906c6..23c3fc9b1e4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 28ff2a0ec44..8bb80a82d5c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index f7d65541cbc..7e8a462f4c2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 3dce5624983..4d9d32107a2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index f82d7bf32f3..a4cc76a99ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index a6867b5c52c..692d86e6f33 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 6920f98f31a..2adfebb0052 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index cd8dc262130..a312eadece2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index d68da002447..d7ab63b62a5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index 2030b723278..3a97078224e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index ae01db3ce6b..5dff0503c6a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 82b7b022d0f..e13c529bd03 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index dd3e7813792..94fc250c4a9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 78cf16ef485..fda7b492af3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index a494e3dac29..b0878debb77 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 5a581a4dedb..9cddea2397b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php index 7531653d8ec..b3d5e81c4b2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 9c5ec8f2dbb..4f9dafc06f0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 8ffb9f20cb2..7da207cd82f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php index ba1e2831049..411bbca43a3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php index 30ed6a76929..50c22d4b8cd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php index 87f48f101d2..276a02cb92f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php index 7dd4dfdd3e0..35eb3c2af0a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php index 5e4db047614..a999cbd8ee4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php index a88dc00ee55..f53332f780c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php index fe3d39fd4f0..203feede99f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php index 31deff2c8ee..71d80a4c93d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index f07b518bd72..3b9f6802242 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 1c691c4edd7..dc7779769a0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index f02e39adcd9..a8c5ee752dd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 998cc79f3ff..fc69bd8aebe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index a64eb1563cc..6c08a975e17 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index bb7b76707db..eedd9b2caa4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php index cefb26f82e9..7ef8bdc7349 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 71adbb4f6f4..445967039a8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 8f077d14e57..f71bb7487e9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 55be62442f7..edb352a1e27 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php index 53bea7c25b0..d2d2e0491b1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php index edb912bb73a..d8758e54ed3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php index dc53d7df4e7..17c5c819c0a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index af463f68c6c..06c0b8765bb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 9973081f84d..554c0f512dc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 98107694f4d..9c8ad267512 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 2bff0e1c883..b3e27d5b2d1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index fdfece6ef17..836c2b81981 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 0a3b0436c2c..452e1a5386b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.0.2-SNAPSHOT + * OpenAPI Generator version: 4.0.3-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION b/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore.rb b/samples/openapi3/client/petstore/ruby/lib/petstore.rb index b42e344f9cc..0b41fea65f3 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index ea4ed548f2d..ea6a82dc841 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb index bc85b460c84..97bee8656db 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb index 60d57a6bbfa..d0d40501815 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index a679d6277d0..513b2abc1fb 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb index 17debb4979e..b7159b2a7d3 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb index bda77f3a2b0..7f85b54bb90 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb index bb5e1f5f149..725bd32a104 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb index 8d36b435ea4..812bc9d3120 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb index 5c9549b897c..5ba79adc419 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb index 9d4385540e6..c48f2a8f787 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index f5e4b4bd745..6cc0a4bdb0c 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb index 175ba6087f1..d7121f92150 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb index 257e6d3e318..2e1d8ec2630 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 44f71398b60..937965575ea 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 51b503e22d2..e2074eafd1f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb index 963c352ebc3..858bea4d863 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb index 58df2d4c218..cf4fbd41142 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb index 153ca893de9..a8bc8f78b99 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 15e90c36291..727c6c8223d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb index fec033ab213..f971581ab7d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb index e3b990b841e..80d6608f054 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb index b8198a200af..7ea074ffcf2 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb index f83c29b7f98..522a5dcf5d5 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index d9cd45293fc..b9fbcc963c9 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index edb6067b2ad..0ad140a63d0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb index 6c5910cd6f6..5fc39b0fef1 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb index 02f2a8693ed..0e2be132c14 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb index 6ba9843c572..c86976b1f63 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 6412937223a..19f0eaa4b83 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb index f7f5dcad285..f07789e329f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb index a5d7b68de92..2669e1d5f69 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 748f46160c3..2d80d8a8226 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 18c871e9d4a..eee766a0fb4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 46b21e6437a..207685038f4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb index de0e7ce5f09..bb2fec59834 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb index 46c5ffb9659..f9af8ab6b83 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 995d7e0555c..3250f5831b4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb index b0f219667b6..412f609b9e0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb index 41fd37ea775..0c26566e4dd 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb index 9a389dbf73c..48104d3ce2f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb index c8d43ea1f80..41099081183 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb index 0ab884564cb..ea9039572a6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb index dd9928ca7f0..e1ce45731f9 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb index bff85189ef1..816b0434eb6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 9df53b3fe8f..f0d5fb41982 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index 57f880777f8..a961559ac49 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index 4d4aa79d65a..e6da01e0675 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 4a5102c9c2f..31a3f0d807d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb index 8bc8b9caeb3..4e948c74160 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb index f0f65d50848..16091b35886 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb index aa411ba6590..437c41d2005 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb index 2933a67a41b..ed84f9057ab 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb index 0adb4d19caf..83b8c00f65f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb index 905b3c30fd6..431b7234543 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/petstore.gemspec b/samples/openapi3/client/petstore/ruby/petstore.gemspec index 1a77140ea2d..3c07d63e1ce 100644 --- a/samples/openapi3/client/petstore/ruby/petstore.gemspec +++ b/samples/openapi3/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 00295d307c8..d9649fd4132 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb index f447074fa1a..79420e71e5c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb index 65ec3dcc486..9fb5aadf041 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index 6c812db2c32..5e1a02a531a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb index 977326c825c..9259ba7beea 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb index 50604018a03..30205938b1f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb index 8cc5a83afc8..881a578c1bc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb index 8394b483c0d..24de4450e0f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb b/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb index a235deb3692..e080ed6c312 100644 --- a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index 2ac0bfd047b..0e054bb9352 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb index 32185704b8c..60501a8f891 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb index 5dec6f58b4c..c096f4d6c3d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index eff84e18c73..b6e2ff354fd 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index 025a7f3035d..450c902cb7a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb index 1d12b6f59d0..3b38a04ea89 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb index 96acb78e5e5..c2fee05230c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 0433529778a..9ca18be74d6 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb index 824cad871a4..c89bc515dfe 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb index eaf0d4d709a..817e27b64c2 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb index 52e3704dc7c..dc600c83478 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb index 401ec6434b0..974de03ccb2 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 232c661c6f5..aff46497e8a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb index 41317361177..deaf7e9bec5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb index b897075e25f..168830a2f6a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb index 1bc61fbfda0..07ce1c5cb91 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb index 66a1059bc19..4ce30c981e6 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index 4390b420b8d..bfcd7f90d20 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb index 8305d1a237c..a7f461e1dc5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb index edd7d8c9a96..3195b071251 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb index d62973a682a..d1e0a485560 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index 842d0a77897..0763dd8135e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb index 9f6fd925b79..45382eda9ff 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb index 45300e313ad..56f41953332 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb index 05363099fca..9eb38d52d32 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb index 5c5ce301d9d..7b4ed936479 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index b2a22cfe286..00659436ff5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb index d651681ed55..0ba205530f3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb index e5839a90a4c..14c2133145d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb index a2436c3f6d8..15ae83e287e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb index 69462d17eca..bd9e1e49c16 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb index 3142bac8388..b9c9935fefb 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb index 4881fcd6735..902870e2223 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb index 655f25318ef..0322b7df3c3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb index a810384a06b..8d766998ea5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb index dac6a5d560a..9417c40a177 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb index 9d9286b711a..535b9f5588c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb index 632d61d450f..b8532bf2608 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb index 28d9ca394ff..61948e14846 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb index 745e517cebf..3f94032172d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb index 367cb2dd13b..709f344ccfb 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb index e4c937cde06..97836886ab8 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb index 5580379e0a7..9de30cebc96 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb b/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb index 72dc5e44cd8..d6e2161c73a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.2-SNAPSHOT +OpenAPI Generator version: 4.0.3-SNAPSHOT =end diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index c3c8d6879c7..6b95a4a8120 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 4.0.2-SNAPSHOT. +Generated by OpenAPI Generator 4.0.3-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim/.openapi-generator/VERSION b/samples/server/petstore/php-slim/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/php-slim/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 20f99abd033..b7fa693867f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index ad94e11a86a..be52da994db 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c71e42618e7..a03747eaa0f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index b89e1ae1b09..7cad12ff80f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 69ef71849a9..ff9d47e3cef 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index c366b39fffb..4fd823d7940 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5d592cda27b..a8a3ecfaa68 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index a713dab4725..b7f9788358b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7ff09b3beee..6d6fd7da170 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index b10476b58c1..427ee415c09 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index aaa7b21cf0b..05e2c7a582e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index a3958326ea8..de707ea4fd6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2e0ae8f62ed..cb55f7e9442 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index f0fd3a6a077..d86a50f0a82 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ecf6ce4deb1..446679caaeb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 44b1d0f85a2..8b8e974eb70 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 98ba0655037..3be166a8a65 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 9dd71c29957..747c8d82018 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2e0ae8f62ed..cb55f7e9442 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index f0fd3a6a077..d86a50f0a82 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ecf6ce4deb1..446679caaeb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 44b1d0f85a2..8b8e974eb70 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 98ba0655037..3be166a8a65 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 9dd71c29957..747c8d82018 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 904e6249d60..e6ad68a2b3d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 6c49dee4084..0d7415360b2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d9c793a6acb..2f3db072361 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 753a2706c4b..971f3305b80 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 3576c2110e1..fdc1e45c0a7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index e24e898c744..221a222d40f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2e0ae8f62ed..cb55f7e9442 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index f0fd3a6a077..d86a50f0a82 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ecf6ce4deb1..446679caaeb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 44b1d0f85a2..8b8e974eb70 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 98ba0655037..3be166a8a65 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 9dd71c29957..747c8d82018 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 614e6530fb0..068dbbf3ade 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index e72bf3fd093..d911ea427b5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 233f5646f80..5e11f18b82a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index a70f817e321..eee5c144c82 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 9c7c1926a10..ca3af40bc15 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index e6a7509a993..e737d5c4fdd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 30e4ba127ff..64f469a3db8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index ea9dfc310ad..41597c2d872 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a63c34f1244..83af80c8d66 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index f7c6ce2184c..4d49f340289 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 12f389e3308..dd48f3f7a7a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index d2abe3e1f6e..4c5735ad1ef 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5d592cda27b..a8a3ecfaa68 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 4a68c789fbd..e8dfe6e104a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7ff09b3beee..6d6fd7da170 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index a6cd9b82d9c..00f7108d31e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index aaa7b21cf0b..05e2c7a582e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index a3958326ea8..de707ea4fd6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 6c5a0b4067c..93b544d3126 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 125165e0e46..60c0cde45fa 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index d7795c61f16..fe72e55aff1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index ab824bf0708..968d1cd8eab 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 08be69cac7e..23c4c968ed4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index e6ae5322cc4..4e2dc2a4856 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5d592cda27b..a8a3ecfaa68 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 0e6a9760799..ce85a4a58b9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7ff09b3beee..6d6fd7da170 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index b10476b58c1..427ee415c09 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index aaa7b21cf0b..05e2c7a582e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index a3958326ea8..de707ea4fd6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.0.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ From 8e0dc2f15013666dd1e6ec71dfeff851b430743d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 21 Jun 2019 10:56:22 +0800 Subject: [PATCH 45/73] improve release checkout script (#3184) --- bin/utils/release_checkout.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb index 720f139c41e..8f82bf4bdc4 100755 --- a/bin/utils/release_checkout.rb +++ b/bin/utils/release_checkout.rb @@ -40,7 +40,8 @@ end def check_openapi_generator_online_docker print "Checking openapi-generator-online docker ... " - url = "https://hub.docker.com/r/openapitools/openapi-generator-online/tags/" + url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-online/tags/?page_size=25&page=1" + docker_tag = "v#{$version}" open(url) do |f| content = f.read @@ -56,7 +57,7 @@ end def check_openapi_generator_cli_docker print "Checking openapi-generator-cli docker ... " - url = "https://hub.docker.com/r/openapitools/openapi-generator-cli/tags/" + url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-cli/tags/?page_size=25&page=1" docker_tag = "v#{$version}" open(url) do |f| content = f.read @@ -202,6 +203,8 @@ $version = ARGV[0] puts "Running checkout on OpenAPI Generator release #{$version}" +check_openapi_generator_online_docker +check_openapi_generator_cli_docker check_npmjs check_homebrew check_openapi_generator_jar @@ -211,5 +214,3 @@ check_openapi_generator_gradle_plugin_jar check_openapi_generator_online_jar check_openapi_generator_project_pom check_readme -check_openapi_generator_online_docker -check_openapi_generator_cli_docker From 46c18ad4dd86d104ab152ab3a089357d8fe0f786 Mon Sep 17 00:00:00 2001 From: Ramanth Date: Fri, 21 Jun 2019 14:08:32 +0530 Subject: [PATCH 46/73] [R] feat(r) : Alternate PR for serialization fixes along with WithHttpInfo method enhancement (#3099) * feat(r): fixing serialization and deserialization issues * feat(r): pet store file generated with serialization fixes * fix(r): updated the query params with keyname in get request * fix(r):fix issue with package name and other minor * fix(r): fixing unit tests * feat(r): adding api calls WithHttpInfo method * fix(r): reverting unit test changes * feat(r): saving changes for reference * Revert "feat(r): saving changes for reference" This reverts commit 0d091b5c20f8f7f83e8b3318c1f7ddf5c0a4cced. * feat(r): minor refactor of method position * fix(r): fixing bug in withhttpinfo method args passing * fix(r): generated petstore with fix --- bin/windows/r-petstore.bat | 2 +- .../codegen/languages/RClientCodegen.java | 8 +- .../src/main/resources/r/api.mustache | 22 +++- .../src/main/resources/r/api_client.mustache | 44 ++++++- .../src/main/resources/r/model.mustache | 100 ++++++-------- samples/client/petstore/R/R/api_client.R | 44 ++++++- samples/client/petstore/R/R/category.R | 24 ++-- .../client/petstore/R/R/model_api_response.R | 34 +++-- samples/client/petstore/R/R/order.R | 64 ++++++--- samples/client/petstore/R/R/pet.R | 86 +++++++----- samples/client/petstore/R/R/pet_api.R | 124 +++++++++++++++--- samples/client/petstore/R/R/store_api.R | 63 +++++++-- samples/client/petstore/R/R/tag.R | 24 ++-- samples/client/petstore/R/R/user.R | 84 ++++++++---- samples/client/petstore/R/R/user_api.R | 122 ++++++++++++++--- samples/client/petstore/R/docs/Pet.md | 4 +- samples/client/petstore/R/docs/PetApi.md | 16 +-- samples/client/petstore/R/docs/StoreApi.md | 4 +- samples/client/petstore/R/docs/UserApi.md | 8 +- 19 files changed, 642 insertions(+), 235 deletions(-) diff --git a/bin/windows/r-petstore.bat b/bin/windows/r-petstore.bat index e62f94857c4..89b1d7327be 100755 --- a/bin/windows/r-petstore.bat +++ b/bin/windows/r-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g r -o samples\client\petstore\R +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g r -o samples\client\petstore\R --additional-properties packageName=petstore java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 443bb43863e..0ce2cee9914 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -103,8 +103,10 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.put("file", "data.frame"); typeMapping.put("binary", "data.frame"); typeMapping.put("ByteArray", "character"); - typeMapping.put("map", "object"); + typeMapping.put("map", "map"); + typeMapping.put("object", "object"); + importMapping.clear(); cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "R package name (convention: lowercase).") .defaultValue("openapi")); @@ -288,10 +290,10 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); - return getTypeDeclaration(inner); + return getSchemaType(p) + "[" + getTypeDeclaration(inner)+ "]"; } else if (ModelUtils.isMapSchema(p)) { Schema inner = ModelUtils.getAdditionalProperties(p); - return getTypeDeclaration(inner); + return getSchemaType(p) + "(" + getTypeDeclaration(inner) + ")"; } // Not using the supertype invocation, because we want to UpperCamelize diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 2612d6c838e..955bd104bbe 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -33,6 +33,18 @@ }, {{#operation}} {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{#defaultValue}}{{{.}}}{{/defaultValue}}, {{/optionalParams}}...){ + apiResponse <- self${{{operationId}}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + {{{operationId}}}WithHttpInfo = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{#defaultValue}}{{{.}}}{{/defaultValue}}, {{/optionalParams}}...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -119,21 +131,23 @@ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { {{#returnType}} {{#isPrimitiveType}} - httr::content(resp, "text", encoding = "UTF-8" + content <- httr::content(resp, "text", encoding = "UTF-8") + ApiResponse$new(content,resp) {{/isPrimitiveType}} {{^isPrimitiveType}} - {{returnType}}$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "{{returnType}}", "package:{{packageName}}") + ApiResponse$new(deserializedRespObj, resp) {{/isPrimitiveType}} {{/returnType}} {{^returnType}} - # void response, no need to return anything + {{! Returning the ApiResponse object with NULL object when the endpoint doesn't return anything}} + ApiResponse$new(NULL, resp) {{/returnType}} } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }{{#hasMore}},{{/hasMore}} {{/operation}} ) diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 80510b10e8b..585ddee77f3 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -74,7 +74,7 @@ ApiClient <- R6::R6Class( headers <- httr::add_headers(c(headerParams, self$defaultHeaders)) if (method == "GET") { - httr::GET(url, queryParams, headers, ...) + httr::GET(url, query = queryParams, headers, ...) } else if (method == "POST") { httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) } else if (method == "PUT") { @@ -88,6 +88,48 @@ ApiClient <- R6::R6Class( } else { stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") } + }, + + deserialize = function(resp, returnType, pkgEnv) { + respObj <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + self$deserializeObj(respObj, returnType, pkgEnv) + }, + + deserializeObj = function(obj, returnType, pkgEnv) { + returnObj <- NULL + primitiveTypes <- c("character", "numeric", "integer", "logical", "complex") + + if (startsWith(returnType, "map(")) { + innerReturnType <- regmatches(returnType, regexec(pattern = "map\\((.*)\\)", returnType))[[1]][2] + returnObj <- lapply(names(obj), function(name) { + self$deserializeObj(obj[[name]], innerReturnType, pkgEnv) + }) + names(returnObj) <- names(obj) + } else if (startsWith(returnType, "array[")) { + innerReturnType <- regmatches(returnType, regexec(pattern = "array\\[(.*)\\]", returnType))[[1]][2] + if (c(innerReturnType) %in% primitiveTypes) { + returnObj <- vector("list", length = length(obj)) + if (length(obj) > 0) { + for (row in 1:length(obj)) { + returnObj[[row]] <- self$deserializeObj(obj[row], innerReturnType, pkgEnv) + } + } + } else { + returnObj <- vector("list", length = nrow(obj)) + if (nrow(obj) > 0) { + for (row in 1:nrow(obj)) { + returnObj[[row]] <- self$deserializeObj(obj[row, , drop = FALSE], innerReturnType, pkgEnv) + } + } + } + } else if (exists(returnType, pkgEnv) && !(c(returnType) %in% primitiveTypes)) { + returnType <- get(returnType, envir = as.environment(pkgEnv)) + returnObj <- returnType$new() + returnObj$fromJSON(jsonlite::toJSON(obj, digits = NA)) + } else { + returnObj <- obj + } + returnObj } ) ) diff --git a/modules/openapi-generator/src/main/resources/r/model.mustache b/modules/openapi-generator/src/main/resources/r/model.mustache index 9c41f3a034c..6559ef18067 100644 --- a/modules/openapi-generator/src/main/resources/r/model.mustache +++ b/modules/openapi-generator/src/main/resources/r/model.mustache @@ -132,99 +132,79 @@ {{classname}}Object <- jsonlite::fromJSON({{classname}}Json) {{#vars}} if (!is.null({{classname}}Object$`{{baseName}}`)) { - {{#isListContainer}} - {{#isPrimitiveType}} - self$`{{baseName}}` <- {{classname}}Object$`{{baseName}}` - {{/isPrimitiveType}} - {{^isPrimitiveType}} - self$`{{baseName}}` <- sapply({{classname}}Object$`{{baseName}}`, function(x) { - {{baseName}}Object <- {{dataType}}$new() - {{baseName}}Object$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)) - {{baseName}}Object - }) - {{/isPrimitiveType}} - {{/isListContainer}} - {{^isListContainer}} + {{#isContainer}} + self$`{{baseName}}` <- ApiClient$new()$deserializeObj({{classname}}Object$`{{baseName}}`, "{{dataType}}", "package:{{packageName}}") + {{/isContainer}} + {{^isContainer}} {{#isPrimitiveType}} self$`{{baseName}}` <- {{classname}}Object$`{{baseName}}` {{/isPrimitiveType}} {{^isPrimitiveType}} {{baseName}}Object <- {{dataType}}$new() - {{baseName}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE)) + {{baseName}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE, digits = NA)) self$`{{baseName}}` <- {{baseName}}Object {{/isPrimitiveType}} - {{/isListContainer}} + {{/isContainer}} } {{/vars}} }, toJSONString = function() { - sprintf( - '{ - {{#vars}} - "{{baseName}}": - {{#isListContainer}} - {{#isPrimitiveType}} - {{#isNumeric}}[%d]{{/isNumeric}}{{^isNumeric}}[%s]{{/isNumeric}}{{#hasMore}},{{/hasMore}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - [%s]{{#hasMore}},{{/hasMore}} - {{/isPrimitiveType}} - {{/isListContainer}} - {{^isListContainer}} - {{#isPrimitiveType}} - {{#isNumeric}}%d{{/isNumeric}}{{^isNumeric}}"%s"{{/isNumeric}}{{#hasMore}},{{/hasMore}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - %s{{#hasMore}},{{/hasMore}} - {{/isPrimitiveType}} - {{/isListContainer}} - {{/vars}} - }', - {{#vars}} + jsoncontent <- c( + {{#vars}} + if (!is.null(self$`{{baseName}}`)) { + sprintf( + '"{{baseName}}": {{#isListContainer}} {{#isPrimitiveType}} - paste(unlist(lapply(self$`{{{baseName}}}`, function(x) paste0('"', x, '"'))), collapse=","){{#hasMore}},{{/hasMore}} + {{#isNumeric}}[%d]{{/isNumeric}}{{^isNumeric}}[%s]{{/isNumeric}} {{/isPrimitiveType}} - {{^isPrimitiveType}} - paste(unlist(lapply(self$`{{{baseName}}}`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE))), collapse=","){{#hasMore}},{{/hasMore}} + {{^isPrimitiveType}}[%s] {{/isPrimitiveType}} {{/isListContainer}} {{^isListContainer}} {{#isPrimitiveType}} - self$`{{baseName}}`{{#hasMore}},{{/hasMore}} + {{#isNumeric}}%d{{/isNumeric}}{{^isNumeric}}"%s"{{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}}%s + {{/isPrimitiveType}} + {{/isListContainer}}', + {{#isListContainer}} + {{#isPrimitiveType}} + paste(unlist(lapply(self$`{{{baseName}}}`, function(x) paste0('"', x, '"'))), collapse=",") {{/isPrimitiveType}} {{^isPrimitiveType}} - jsonlite::toJSON(self$`{{baseName}}`$toJSON(), auto_unbox=TRUE){{#hasMore}},{{/hasMore}} + paste(unlist(lapply(self$`{{{baseName}}}`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA))), collapse=",") {{/isPrimitiveType}} {{/isListContainer}} + {{^isListContainer}} + {{#isPrimitiveType}} + self$`{{baseName}}` + {{/isPrimitiveType}} + {{^isPrimitiveType}} + jsonlite::toJSON(self$`{{baseName}}`$toJSON(), auto_unbox=TRUE, digits = NA) + {{/isPrimitiveType}} + {{/isListContainer}} + )}{{#hasMore}},{{/hasMore}} {{/vars}} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function({{classname}}Json) { {{classname}}Object <- jsonlite::fromJSON({{classname}}Json) {{#vars}} - {{#isListContainer}} - {{#isPrimitiveType}} - self$`{{baseName}}` <- lapply({{classname}}Object$`{{baseName}}`, function (x) x) - {{/isPrimitiveType}} - {{^isPrimitiveType}} - data.frame <- {{classname}}Object$`{{baseName}}` - self$`{{baseName}}` <- vector("list", length = nrow(data.frame)) - for (row in 1:nrow(data.frame)) { - {{baseName}}.node <- {{dataType}}$new() - {{baseName}}.node$fromJSON(jsonlite::toJSON(data.frame[row,,drop = TRUE], auto_unbox = TRUE)) - self$`{{baseName}}`[[row]] <- {{baseName}}.node - } - {{/isPrimitiveType}} - {{/isListContainer}} - {{^isListContainer}} + {{! AAPI - added condition for handling container type of parameters, map and array}} + {{#isContainer}} + self$`{{baseName}}` <- ApiClient$new()$deserializeObj({{classname}}Object$`{{baseName}}`, "{{dataType}}","package:{{packageName}}") + {{/isContainer}} + {{^isContainer}} {{#isPrimitiveType}} self$`{{baseName}}` <- {{classname}}Object$`{{baseName}}` {{/isPrimitiveType}} {{^isPrimitiveType}} - self$`{{baseName}}` <- {{dataType}}$new()$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE)) + self$`{{baseName}}` <- {{dataType}}$new()$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE, digits = NA)) {{/isPrimitiveType}} - {{/isListContainer}} + {{/isContainer}} {{/vars}} self } diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R index d4a6262475d..8d3d0fcd8b2 100644 --- a/samples/client/petstore/R/R/api_client.R +++ b/samples/client/petstore/R/R/api_client.R @@ -81,7 +81,7 @@ ApiClient <- R6::R6Class( headers <- httr::add_headers(c(headerParams, self$defaultHeaders)) if (method == "GET") { - httr::GET(url, queryParams, headers, ...) + httr::GET(url, query = queryParams, headers, ...) } else if (method == "POST") { httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) } else if (method == "PUT") { @@ -95,6 +95,48 @@ ApiClient <- R6::R6Class( } else { stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") } + }, + + deserialize = function(resp, returnType, pkgEnv) { + respObj <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + self$deserializeObj(respObj, returnType, pkgEnv) + }, + + deserializeObj = function(obj, returnType, pkgEnv) { + returnObj <- NULL + primitiveTypes <- c("character", "numeric", "integer", "logical", "complex") + + if (startsWith(returnType, "map(")) { + innerReturnType <- regmatches(returnType, regexec(pattern = "map\\((.*)\\)", returnType))[[1]][2] + returnObj <- lapply(names(obj), function(name) { + self$deserializeObj(obj[[name]], innerReturnType, pkgEnv) + }) + names(returnObj) <- names(obj) + } else if (startsWith(returnType, "array[")) { + innerReturnType <- regmatches(returnType, regexec(pattern = "array\\[(.*)\\]", returnType))[[1]][2] + if (c(innerReturnType) %in% primitiveTypes) { + returnObj <- vector("list", length = length(obj)) + if (length(obj) > 0) { + for (row in 1:length(obj)) { + returnObj[[row]] <- self$deserializeObj(obj[row], innerReturnType, pkgEnv) + } + } + } else { + returnObj <- vector("list", length = nrow(obj)) + if (nrow(obj) > 0) { + for (row in 1:nrow(obj)) { + returnObj[[row]] <- self$deserializeObj(obj[row, , drop = FALSE], innerReturnType, pkgEnv) + } + } + } + } else if (exists(returnType, pkgEnv) && !(c(returnType) %in% primitiveTypes)) { + returnType <- get(returnType, envir = as.environment(pkgEnv)) + returnObj <- returnType$new() + returnObj$fromJSON(jsonlite::toJSON(obj, digits = NA)) + } else { + returnObj <- obj + } + returnObj } ) ) diff --git a/samples/client/petstore/R/R/category.R b/samples/client/petstore/R/R/category.R index fea3501c6fa..de662eaed4c 100644 --- a/samples/client/petstore/R/R/category.R +++ b/samples/client/petstore/R/R/category.R @@ -54,16 +54,24 @@ Category <- R6::R6Class( } }, toJSONString = function() { - sprintf( - '{ - "id": - %d, - "name": - "%s" - }', - self$`id`, + jsoncontent <- c( + if (!is.null(self$`id`)) { + sprintf( + '"id": + %d + ', + self$`id` + )}, + if (!is.null(self$`name`)) { + sprintf( + '"name": + "%s" + ', self$`name` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(CategoryJson) { CategoryObject <- jsonlite::fromJSON(CategoryJson) diff --git a/samples/client/petstore/R/R/model_api_response.R b/samples/client/petstore/R/R/model_api_response.R index 425c6380457..5985ed033c0 100644 --- a/samples/client/petstore/R/R/model_api_response.R +++ b/samples/client/petstore/R/R/model_api_response.R @@ -67,19 +67,31 @@ ModelApiResponse <- R6::R6Class( } }, toJSONString = function() { - sprintf( - '{ - "code": - %d, - "type": - "%s", - "message": - "%s" - }', - self$`code`, - self$`type`, + jsoncontent <- c( + if (!is.null(self$`code`)) { + sprintf( + '"code": + %d + ', + self$`code` + )}, + if (!is.null(self$`type`)) { + sprintf( + '"type": + "%s" + ', + self$`type` + )}, + if (!is.null(self$`message`)) { + sprintf( + '"message": + "%s" + ', self$`message` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(ModelApiResponseJson) { ModelApiResponseObject <- jsonlite::fromJSON(ModelApiResponseJson) diff --git a/samples/client/petstore/R/R/order.R b/samples/client/petstore/R/R/order.R index 76f908c39a2..839db2951c4 100644 --- a/samples/client/petstore/R/R/order.R +++ b/samples/client/petstore/R/R/order.R @@ -105,28 +105,52 @@ Order <- R6::R6Class( } }, toJSONString = function() { - sprintf( - '{ - "id": - %d, - "petId": - %d, - "quantity": - %d, - "shipDate": - "%s", - "status": - "%s", - "complete": - "%s" - }', - self$`id`, - self$`petId`, - self$`quantity`, - self$`shipDate`, - self$`status`, + jsoncontent <- c( + if (!is.null(self$`id`)) { + sprintf( + '"id": + %d + ', + self$`id` + )}, + if (!is.null(self$`petId`)) { + sprintf( + '"petId": + %d + ', + self$`petId` + )}, + if (!is.null(self$`quantity`)) { + sprintf( + '"quantity": + %d + ', + self$`quantity` + )}, + if (!is.null(self$`shipDate`)) { + sprintf( + '"shipDate": + "%s" + ', + self$`shipDate` + )}, + if (!is.null(self$`status`)) { + sprintf( + '"status": + "%s" + ', + self$`status` + )}, + if (!is.null(self$`complete`)) { + sprintf( + '"complete": + "%s" + ', self$`complete` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(OrderJson) { OrderObject <- jsonlite::fromJSON(OrderJson) diff --git a/samples/client/petstore/R/R/pet.R b/samples/client/petstore/R/R/pet.R index 11d5811a0f5..69c67d243d6 100644 --- a/samples/client/petstore/R/R/pet.R +++ b/samples/client/petstore/R/R/pet.R @@ -93,63 +93,77 @@ Pet <- R6::R6Class( } if (!is.null(PetObject$`category`)) { categoryObject <- Category$new() - categoryObject$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE)) + categoryObject$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE, digits = NA)) self$`category` <- categoryObject } if (!is.null(PetObject$`name`)) { self$`name` <- PetObject$`name` } if (!is.null(PetObject$`photoUrls`)) { - self$`photoUrls` <- PetObject$`photoUrls` + self$`photoUrls` <- ApiClient$new()$deserializeObj(PetObject$`photoUrls`, "array[character]", "package:petstore") } if (!is.null(PetObject$`tags`)) { - self$`tags` <- sapply(PetObject$`tags`, function(x) { - tagsObject <- Tag$new() - tagsObject$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)) - tagsObject - }) + self$`tags` <- ApiClient$new()$deserializeObj(PetObject$`tags`, "array[Tag]", "package:petstore") } if (!is.null(PetObject$`status`)) { self$`status` <- PetObject$`status` } }, toJSONString = function() { - sprintf( - '{ - "id": - %d, - "category": - %s, - "name": - "%s", - "photoUrls": - [%s], - "tags": - [%s], - "status": - "%s" - }', - self$`id`, - jsonlite::toJSON(self$`category`$toJSON(), auto_unbox=TRUE), - self$`name`, - paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse=","), - paste(unlist(lapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE))), collapse=","), + jsoncontent <- c( + if (!is.null(self$`id`)) { + sprintf( + '"id": + %d + ', + self$`id` + )}, + if (!is.null(self$`category`)) { + sprintf( + '"category": + %s + ', + jsonlite::toJSON(self$`category`$toJSON(), auto_unbox=TRUE, digits = NA) + )}, + if (!is.null(self$`name`)) { + sprintf( + '"name": + "%s" + ', + self$`name` + )}, + if (!is.null(self$`photoUrls`)) { + sprintf( + '"photoUrls": + [%s] + ', + paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse=",") + )}, + if (!is.null(self$`tags`)) { + sprintf( + '"tags": + [%s] +', + paste(unlist(lapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA))), collapse=",") + )}, + if (!is.null(self$`status`)) { + sprintf( + '"status": + "%s" + ', self$`status` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(PetJson) { PetObject <- jsonlite::fromJSON(PetJson) self$`id` <- PetObject$`id` - self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE)) + self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE, digits = NA)) self$`name` <- PetObject$`name` - self$`photoUrls` <- lapply(PetObject$`photoUrls`, function (x) x) - data.frame <- PetObject$`tags` - self$`tags` <- vector("list", length = nrow(data.frame)) - for (row in 1:nrow(data.frame)) { - tags.node <- Tag$new() - tags.node$fromJSON(jsonlite::toJSON(data.frame[row,,drop = TRUE], auto_unbox = TRUE)) - self$`tags`[[row]] <- tags.node - } + self$`photoUrls` <- ApiClient$new()$deserializeObj(PetObject$`photoUrls`, "array[character]","package:petstore") + self$`tags` <- ApiClient$new()$deserializeObj(PetObject$`tags`, "array[Tag]","package:petstore") self$`status` <- PetObject$`status` self } diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index a098c5b747b..6855f64ffdd 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -57,6 +57,18 @@ PetApi <- R6::R6Class( } }, AddPet = function(body, ...){ + apiResponse <- self$AddPetWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + AddPetWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -83,15 +95,26 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, DeletePet = function(pet.id, api.key=NULL, ...){ + apiResponse <- self$DeletePetWithHttpInfo(pet.id, api.key, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + DeletePetWithHttpInfo = function(pet.id, api.key=NULL, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -118,15 +141,26 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, FindPetsByStatus = function(status, ...){ + apiResponse <- self$FindPetsByStatusWithHttpInfo(status, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + FindPetsByStatusWithHttpInfo = function(status, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -149,15 +183,27 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "array[Pet]", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, FindPetsByTags = function(tags, ...){ + apiResponse <- self$FindPetsByTagsWithHttpInfo(tags, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + FindPetsByTagsWithHttpInfo = function(tags, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -180,15 +226,27 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "array[Pet]", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, GetPetById = function(pet.id, ...){ + apiResponse <- self$GetPetByIdWithHttpInfo(pet.id, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + GetPetByIdWithHttpInfo = function(pet.id, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -215,15 +273,27 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "Pet", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, UpdatePet = function(body, ...){ + apiResponse <- self$UpdatePetWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + UpdatePetWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -250,15 +320,26 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, UpdatePetWithForm = function(pet.id, name=NULL, status=NULL, ...){ + apiResponse <- self$UpdatePetWithFormWithHttpInfo(pet.id, name, status, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + UpdatePetWithFormWithHttpInfo = function(pet.id, name=NULL, status=NULL, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -288,15 +369,26 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, UploadFile = function(pet.id, additional.metadata=NULL, file=NULL, ...){ + apiResponse <- self$UploadFileWithHttpInfo(pet.id, additional.metadata, file, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + UploadFileWithHttpInfo = function(pet.id, additional.metadata=NULL, file=NULL, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -326,13 +418,13 @@ PetApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - ModelApiResponse$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "ModelApiResponse", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - } ) ) diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 5113c5d86e6..6466a80e0f7 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -45,6 +45,18 @@ StoreApi <- R6::R6Class( } }, DeleteOrder = function(order.id, ...){ + apiResponse <- self$DeleteOrderWithHttpInfo(order.id, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + DeleteOrderWithHttpInfo = function(order.id, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -67,15 +79,26 @@ StoreApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, GetInventory = function(...){ + apiResponse <- self$GetInventoryWithHttpInfo(...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + GetInventoryWithHttpInfo = function(...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -94,15 +117,27 @@ StoreApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - integer$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "map(integer)", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, GetOrderById = function(order.id, ...){ + apiResponse <- self$GetOrderByIdWithHttpInfo(order.id, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + GetOrderByIdWithHttpInfo = function(order.id, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -125,15 +160,27 @@ StoreApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - Order$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "Order", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, PlaceOrder = function(body, ...){ + apiResponse <- self$PlaceOrderWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + PlaceOrderWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -158,13 +205,13 @@ StoreApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - Order$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "Order", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - } ) ) diff --git a/samples/client/petstore/R/R/tag.R b/samples/client/petstore/R/R/tag.R index b0ee474e18d..279c43d59d4 100644 --- a/samples/client/petstore/R/R/tag.R +++ b/samples/client/petstore/R/R/tag.R @@ -54,16 +54,24 @@ Tag <- R6::R6Class( } }, toJSONString = function() { - sprintf( - '{ - "id": - %d, - "name": - "%s" - }', - self$`id`, + jsoncontent <- c( + if (!is.null(self$`id`)) { + sprintf( + '"id": + %d + ', + self$`id` + )}, + if (!is.null(self$`name`)) { + sprintf( + '"name": + "%s" + ', self$`name` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(TagJson) { TagObject <- jsonlite::fromJSON(TagJson) diff --git a/samples/client/petstore/R/R/user.R b/samples/client/petstore/R/R/user.R index 2431ff8de4c..8377f5a68ef 100644 --- a/samples/client/petstore/R/R/user.R +++ b/samples/client/petstore/R/R/user.R @@ -132,34 +132,66 @@ User <- R6::R6Class( } }, toJSONString = function() { - sprintf( - '{ - "id": - %d, - "username": - "%s", - "firstName": - "%s", - "lastName": - "%s", - "email": - "%s", - "password": - "%s", - "phone": - "%s", - "userStatus": - %d - }', - self$`id`, - self$`username`, - self$`firstName`, - self$`lastName`, - self$`email`, - self$`password`, - self$`phone`, + jsoncontent <- c( + if (!is.null(self$`id`)) { + sprintf( + '"id": + %d + ', + self$`id` + )}, + if (!is.null(self$`username`)) { + sprintf( + '"username": + "%s" + ', + self$`username` + )}, + if (!is.null(self$`firstName`)) { + sprintf( + '"firstName": + "%s" + ', + self$`firstName` + )}, + if (!is.null(self$`lastName`)) { + sprintf( + '"lastName": + "%s" + ', + self$`lastName` + )}, + if (!is.null(self$`email`)) { + sprintf( + '"email": + "%s" + ', + self$`email` + )}, + if (!is.null(self$`password`)) { + sprintf( + '"password": + "%s" + ', + self$`password` + )}, + if (!is.null(self$`phone`)) { + sprintf( + '"phone": + "%s" + ', + self$`phone` + )}, + if (!is.null(self$`userStatus`)) { + sprintf( + '"userStatus": + %d + ', self$`userStatus` + )} ) + jsoncontent <- paste(jsoncontent, collapse = ",") + paste('{', jsoncontent, '}', sep = "") }, fromJSONString = function(UserJson) { UserObject <- jsonlite::fromJSON(UserJson) diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index 1d2eb03a14c..a3696c701a9 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -57,6 +57,18 @@ UserApi <- R6::R6Class( } }, CreateUser = function(body, ...){ + apiResponse <- self$CreateUserWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + CreateUserWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -81,15 +93,26 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, CreateUsersWithArrayInput = function(body, ...){ + apiResponse <- self$CreateUsersWithArrayInputWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + CreateUsersWithArrayInputWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -114,15 +137,26 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, CreateUsersWithListInput = function(body, ...){ + apiResponse <- self$CreateUsersWithListInputWithHttpInfo(body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + CreateUsersWithListInputWithHttpInfo = function(body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -147,15 +181,26 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, DeleteUser = function(username, ...){ + apiResponse <- self$DeleteUserWithHttpInfo(username, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + DeleteUserWithHttpInfo = function(username, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -178,15 +223,26 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, GetUserByName = function(username, ...){ + apiResponse <- self$GetUserByNameWithHttpInfo(username, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + GetUserByNameWithHttpInfo = function(username, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -209,15 +265,27 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - User$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "User", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, LoginUser = function(username, password, ...){ + apiResponse <- self$LoginUserWithHttpInfo(username, password, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + LoginUserWithHttpInfo = function(username, password, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -244,15 +312,27 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - character$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8")) + deserializedRespObj <- self$apiClient$deserialize(resp, "character", "package:petstore") + ApiResponse$new(deserializedRespObj, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, LogoutUser = function(...){ + apiResponse <- self$LogoutUserWithHttpInfo(...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + LogoutUserWithHttpInfo = function(...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -267,15 +347,26 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - }, UpdateUser = function(username, body, ...){ + apiResponse <- self$UpdateUserWithHttpInfo(username, body, ...) + resp <- apiResponse$response + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + apiResponse$content + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + apiResponse + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + apiResponse + } + }, + + UpdateUserWithHttpInfo = function(username, body, ...){ args <- list(...) queryParams <- list() headerParams <- c() @@ -308,13 +399,12 @@ UserApi <- R6::R6Class( ...) if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything + ApiResponse$new(NULL, resp) } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { ApiResponse$new("API client error", resp) } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { ApiResponse$new("API server error", resp) } - } ) ) diff --git a/samples/client/petstore/R/docs/Pet.md b/samples/client/petstore/R/docs/Pet.md index 296dfdeea43..f5a9c0dd611 100644 --- a/samples/client/petstore/R/docs/Pet.md +++ b/samples/client/petstore/R/docs/Pet.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes **id** | **integer** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **character** | | -**photoUrls** | **character** | | -**tags** | [**Tag**](Tag.md) | | [optional] +**photoUrls** | **array[character]** | | +**tags** | [**array[Tag]**](Tag.md) | | [optional] **status** | **character** | pet status in the store | [optional] diff --git a/samples/client/petstore/R/docs/PetApi.md b/samples/client/petstore/R/docs/PetApi.md index 186fd50d92c..fe69ffb556f 100644 --- a/samples/client/petstore/R/docs/PetApi.md +++ b/samples/client/petstore/R/docs/PetApi.md @@ -95,7 +95,7 @@ void (empty response body) # **FindPetsByStatus** -> Pet FindPetsByStatus(status) +> array[Pet] FindPetsByStatus(status) Finds Pets by status @@ -105,7 +105,7 @@ Multiple status values can be provided with comma separated strings ```R library(petstore) -var.status <- list("status_example") # character | Status values that need to be considered for filter +var.status <- list("status_example") # array[character] | Status values that need to be considered for filter #Finds Pets by status api.instance <- PetApi$new() @@ -119,11 +119,11 @@ dput(result) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**character**](character.md)| Status values that need to be considered for filter | + **status** | [**array[character]**](character.md)| Status values that need to be considered for filter | ### Return type -[**Pet**](Pet.md) +[**array[Pet]**](Pet.md) ### Authorization @@ -137,7 +137,7 @@ Name | Type | Description | Notes # **FindPetsByTags** -> Pet FindPetsByTags(tags) +> array[Pet] FindPetsByTags(tags) Finds Pets by tags @@ -147,7 +147,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```R library(petstore) -var.tags <- list("inner_example") # character | Tags to filter by +var.tags <- list("inner_example") # array[character] | Tags to filter by #Finds Pets by tags api.instance <- PetApi$new() @@ -161,11 +161,11 @@ dput(result) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**character**](character.md)| Tags to filter by | + **tags** | [**array[character]**](character.md)| Tags to filter by | ### Return type -[**Pet**](Pet.md) +[**array[Pet]**](Pet.md) ### Authorization diff --git a/samples/client/petstore/R/docs/StoreApi.md b/samples/client/petstore/R/docs/StoreApi.md index 8f91944aed1..81970724c12 100644 --- a/samples/client/petstore/R/docs/StoreApi.md +++ b/samples/client/petstore/R/docs/StoreApi.md @@ -50,7 +50,7 @@ No authorization required # **GetInventory** -> integer GetInventory() +> map(integer) GetInventory() Returns pet inventories by status @@ -74,7 +74,7 @@ This endpoint does not need any parameter. ### Return type -**integer** +**map(integer)** ### Authorization diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md index 6b0b6bbef47..c69c5987ed0 100644 --- a/samples/client/petstore/R/docs/UserApi.md +++ b/samples/client/petstore/R/docs/UserApi.md @@ -62,7 +62,7 @@ Creates list of users with given input array ```R library(petstore) -var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # User | List of user object +var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object #Creates list of users with given input array api.instance <- UserApi$new() @@ -73,7 +73,7 @@ api.instance$CreateUsersWithArrayInput(var.body) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| List of user object | + **body** | [**array[User]**](User.md)| List of user object | ### Return type @@ -99,7 +99,7 @@ Creates list of users with given input array ```R library(petstore) -var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # User | List of user object +var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object #Creates list of users with given input array api.instance <- UserApi$new() @@ -110,7 +110,7 @@ api.instance$CreateUsersWithListInput(var.body) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| List of user object | + **body** | [**array[User]**](User.md)| List of user object | ### Return type From 0e2eed68925b0a39e7023da44f91cda13d31cdc2 Mon Sep 17 00:00:00 2001 From: Min Kim <291271447@qq.com> Date: Fri, 21 Jun 2019 18:32:12 +0800 Subject: [PATCH 47/73] Perl: Basic bearer auth support (#3192) * bearer token support * [generator] running scripts --- .../main/resources/perl/ApiClient.mustache | 8 ++ .../src/main/resources/perl/api_doc.mustache | 9 +- samples/client/petstore/perl/README.md | 82 +++++++----- .../perl/docs/AdditionalPropertiesClass.md | 13 +- .../petstore/perl/docs/AnotherfakeApi.md | 8 +- samples/client/petstore/perl/docs/EnumTest.md | 3 + samples/client/petstore/perl/docs/FakeApi.md | 83 ++++++------ .../perl/docs/FakeClassnameTags123Api.md | 8 +- .../client/petstore/perl/docs/FormatTest.md | 2 + samples/client/petstore/perl/docs/PetApi.md | 16 +-- samples/client/petstore/perl/docs/StoreApi.md | 10 +- samples/client/petstore/perl/docs/UserApi.md | 40 +++--- .../lib/WWW/OpenAPIClient/AnotherFakeApi.pm | 16 +-- .../perl/lib/WWW/OpenAPIClient/ApiClient.pm | 8 +- .../perl/lib/WWW/OpenAPIClient/ApiFactory.pm | 2 +- .../lib/WWW/OpenAPIClient/Configuration.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/DefaultApi.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/FakeApi.pm | 122 ++++++++---------- .../OpenAPIClient/FakeClassnameTags123Api.pm | 16 +-- .../Object/AdditionalPropertiesAnyType.pm | 15 +-- .../Object/AdditionalPropertiesArray.pm | 15 +-- .../Object/AdditionalPropertiesBoolean.pm | 15 +-- .../Object/AdditionalPropertiesClass.pm | 101 ++------------- .../Object/AdditionalPropertiesInteger.pm | 15 +-- .../Object/AdditionalPropertiesNumber.pm | 15 +-- .../Object/AdditionalPropertiesObject.pm | 15 +-- .../Object/AdditionalPropertiesString.pm | 15 +-- .../lib/WWW/OpenAPIClient/Object/Animal.pm | 4 +- .../WWW/OpenAPIClient/Object/ApiResponse.pm | 4 +- .../Object/ArrayOfArrayOfNumberOnly.pm | 4 +- .../OpenAPIClient/Object/ArrayOfNumberOnly.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/ArrayTest.pm | 4 +- .../OpenAPIClient/Object/Capitalization.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Cat.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Category.pm | 4 +- .../WWW/OpenAPIClient/Object/ClassModel.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Client.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Dog.pm | 4 +- .../WWW/OpenAPIClient/Object/EnumArrays.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/EnumClass.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/EnumTest.pm | 38 +++++- .../perl/lib/WWW/OpenAPIClient/Object/File.pm | 4 +- .../Object/FileSchemaTestClass.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Foo.pm | 4 +- .../WWW/OpenAPIClient/Object/FormatTest.pm | 26 +++- .../OpenAPIClient/Object/HasOnlyReadOnly.pm | 4 +- .../OpenAPIClient/Object/HealthCheckResult.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject1.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject2.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject3.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject4.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject5.pm | 4 +- .../Object/InlineResponseDefault.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/List.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/MapTest.pm | 4 +- ...dPropertiesAndAdditionalPropertiesClass.pm | 4 +- .../OpenAPIClient/Object/Model200Response.pm | 4 +- .../WWW/OpenAPIClient/Object/ModelReturn.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Name.pm | 4 +- .../WWW/OpenAPIClient/Object/NullableClass.pm | 4 +- .../WWW/OpenAPIClient/Object/NumberOnly.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Order.pm | 4 +- .../OpenAPIClient/Object/OuterComposite.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/OuterEnum.pm | 4 +- .../Object/OuterEnumDefaultValue.pm | 4 +- .../OpenAPIClient/Object/OuterEnumInteger.pm | 4 +- .../Object/OuterEnumIntegerDefaultValue.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Pet.pm | 4 +- .../WWW/OpenAPIClient/Object/ReadOnlyFirst.pm | 4 +- .../OpenAPIClient/Object/SpecialModelName.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Tag.pm | 4 +- .../OpenAPIClient/Object/TypeHolderDefault.pm | 15 +-- .../OpenAPIClient/Object/TypeHolderExample.pm | 15 +-- .../perl/lib/WWW/OpenAPIClient/Object/User.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/XmlItem.pm | 15 +-- .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 30 ++--- .../perl/lib/WWW/OpenAPIClient/Role.pm | 2 +- .../lib/WWW/OpenAPIClient/Role/AutoDoc.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/StoreApi.pm | 18 +-- .../perl/lib/WWW/OpenAPIClient/UserApi.pm | 66 +++++----- 81 files changed, 489 insertions(+), 570 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache index a65c20dac53..8175c47d623 100644 --- a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache @@ -340,9 +340,17 @@ sub update_params_for_auth { {{/isKeyInQuery}} {{/isApiKey}} {{#isBasic}} + {{^isBasicBearer}} if ($self->{config}{username} || $self->{config}{password}) { $header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password}); } + {{/isBasicBearer}} + {{#isBasicBearer}} + // this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token) + if ($self->{config}{access_token}) { + $headers['Authorization'] = 'Bearer ' . $self->{config}{access_token}; + } + {{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} if ($self->{config}{access_token}) { diff --git a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache index 99d5ad5198c..bcbc7b41345 100644 --- a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache @@ -29,8 +29,15 @@ use {{moduleName}}::{{classname}}; my $api_instance = {{moduleName}}::{{classname}}->new( {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} # Configure HTTP basic authorization: {{{name}}} + {{^isBasicBearer}} username => 'YOUR_USERNAME', - password => 'YOUR_PASSWORD',{{/isBasic}}{{#isApiKey}} + password => 'YOUR_PASSWORD', + {{/isBasicBearer}} + {{#isBasicBearer}} + # Configure bearer access token for authorization: {{{name}}} + access_token => 'YOUR_BEARER_TOKEN', + {{/isBasicBearer}} + {{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'}, # uncomment below to setup prefix (e.g. Bearer) for API key, if needed diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 292678b2f38..ceba27d0b85 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -222,6 +222,7 @@ Each of these calls returns a hashref with various useful pieces of information. To load the API packages: ```perl use WWW::OpenAPIClient::AnotherFakeApi; +use WWW::OpenAPIClient::DefaultApi; use WWW::OpenAPIClient::FakeApi; use WWW::OpenAPIClient::FakeClassnameTags123Api; use WWW::OpenAPIClient::PetApi; @@ -232,14 +233,7 @@ use WWW::OpenAPIClient::UserApi; To load the models: ```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; -use WWW::OpenAPIClient::Object::AdditionalPropertiesArray; -use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; -use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; -use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; -use WWW::OpenAPIClient::Object::AdditionalPropertiesObject; -use WWW::OpenAPIClient::Object::AdditionalPropertiesString; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -256,26 +250,36 @@ use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; use WWW::OpenAPIClient::Object::File; use WWW::OpenAPIClient::Object::FileSchemaTestClass; +use WWW::OpenAPIClient::Object::Foo; use WWW::OpenAPIClient::Object::FormatTest; use WWW::OpenAPIClient::Object::HasOnlyReadOnly; +use WWW::OpenAPIClient::Object::HealthCheckResult; +use WWW::OpenAPIClient::Object::InlineObject; +use WWW::OpenAPIClient::Object::InlineObject1; +use WWW::OpenAPIClient::Object::InlineObject2; +use WWW::OpenAPIClient::Object::InlineObject3; +use WWW::OpenAPIClient::Object::InlineObject4; +use WWW::OpenAPIClient::Object::InlineObject5; +use WWW::OpenAPIClient::Object::InlineResponseDefault; use WWW::OpenAPIClient::Object::List; use WWW::OpenAPIClient::Object::MapTest; use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass; use WWW::OpenAPIClient::Object::Model200Response; use WWW::OpenAPIClient::Object::ModelReturn; use WWW::OpenAPIClient::Object::Name; +use WWW::OpenAPIClient::Object::NullableClass; use WWW::OpenAPIClient::Object::NumberOnly; use WWW::OpenAPIClient::Object::Order; use WWW::OpenAPIClient::Object::OuterComposite; use WWW::OpenAPIClient::Object::OuterEnum; +use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; +use WWW::OpenAPIClient::Object::OuterEnumInteger; +use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; -use WWW::OpenAPIClient::Object::TypeHolderDefault; -use WWW::OpenAPIClient::Object::TypeHolderExample; use WWW::OpenAPIClient::Object::User; -use WWW::OpenAPIClient::Object::XmlItem; ```` @@ -288,6 +292,7 @@ use strict; use warnings; # load the API package use WWW::OpenAPIClient::AnotherFakeApi; +use WWW::OpenAPIClient::DefaultApi; use WWW::OpenAPIClient::FakeApi; use WWW::OpenAPIClient::FakeClassnameTags123Api; use WWW::OpenAPIClient::PetApi; @@ -295,14 +300,7 @@ use WWW::OpenAPIClient::StoreApi; use WWW::OpenAPIClient::UserApi; # load the models -use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; -use WWW::OpenAPIClient::Object::AdditionalPropertiesArray; -use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; -use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; -use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; -use WWW::OpenAPIClient::Object::AdditionalPropertiesObject; -use WWW::OpenAPIClient::Object::AdditionalPropertiesString; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -319,26 +317,36 @@ use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; use WWW::OpenAPIClient::Object::File; use WWW::OpenAPIClient::Object::FileSchemaTestClass; +use WWW::OpenAPIClient::Object::Foo; use WWW::OpenAPIClient::Object::FormatTest; use WWW::OpenAPIClient::Object::HasOnlyReadOnly; +use WWW::OpenAPIClient::Object::HealthCheckResult; +use WWW::OpenAPIClient::Object::InlineObject; +use WWW::OpenAPIClient::Object::InlineObject1; +use WWW::OpenAPIClient::Object::InlineObject2; +use WWW::OpenAPIClient::Object::InlineObject3; +use WWW::OpenAPIClient::Object::InlineObject4; +use WWW::OpenAPIClient::Object::InlineObject5; +use WWW::OpenAPIClient::Object::InlineResponseDefault; use WWW::OpenAPIClient::Object::List; use WWW::OpenAPIClient::Object::MapTest; use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass; use WWW::OpenAPIClient::Object::Model200Response; use WWW::OpenAPIClient::Object::ModelReturn; use WWW::OpenAPIClient::Object::Name; +use WWW::OpenAPIClient::Object::NullableClass; use WWW::OpenAPIClient::Object::NumberOnly; use WWW::OpenAPIClient::Object::Order; use WWW::OpenAPIClient::Object::OuterComposite; use WWW::OpenAPIClient::Object::OuterEnum; +use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; +use WWW::OpenAPIClient::Object::OuterEnumInteger; +use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; -use WWW::OpenAPIClient::Object::TypeHolderDefault; -use WWW::OpenAPIClient::Object::TypeHolderExample; use WWW::OpenAPIClient::Object::User; -use WWW::OpenAPIClient::Object::XmlItem; # for displaying the API response data use Data::Dumper; @@ -347,10 +355,10 @@ use WWW::OpenAPIClient::; my $api_instance = WWW::OpenAPIClient::->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->call_123_test_special_tags(body => $body); + my $result = $api_instance->call_123_test_special_tags(client => $client); print Dumper($result); }; if ($@) { @@ -366,7 +374,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo | +*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint *FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | @@ -404,14 +413,7 @@ Class | Method | HTTP request | Description # DOCUMENTATION FOR MODELS - - [WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [WWW::OpenAPIClient::Object::AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [WWW::OpenAPIClient::Object::Animal](docs/Animal.md) - [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md) - [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -428,26 +430,36 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md) - [WWW::OpenAPIClient::Object::File](docs/File.md) - [WWW::OpenAPIClient::Object::FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [WWW::OpenAPIClient::Object::Foo](docs/Foo.md) - [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md) - [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [WWW::OpenAPIClient::Object::HealthCheckResult](docs/HealthCheckResult.md) + - [WWW::OpenAPIClient::Object::InlineObject](docs/InlineObject.md) + - [WWW::OpenAPIClient::Object::InlineObject1](docs/InlineObject1.md) + - [WWW::OpenAPIClient::Object::InlineObject2](docs/InlineObject2.md) + - [WWW::OpenAPIClient::Object::InlineObject3](docs/InlineObject3.md) + - [WWW::OpenAPIClient::Object::InlineObject4](docs/InlineObject4.md) + - [WWW::OpenAPIClient::Object::InlineObject5](docs/InlineObject5.md) + - [WWW::OpenAPIClient::Object::InlineResponseDefault](docs/InlineResponseDefault.md) - [WWW::OpenAPIClient::Object::List](docs/List.md) - [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md) - [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md) - [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md) - [WWW::OpenAPIClient::Object::Name](docs/Name.md) + - [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md) - [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md) - [WWW::OpenAPIClient::Object::Order](docs/Order.md) - [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md) - [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md) + - [WWW::OpenAPIClient::Object::OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md) + - [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [WWW::OpenAPIClient::Object::Pet](docs/Pet.md) - [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md) - [WWW::OpenAPIClient::Object::Tag](docs/Tag.md) - - [WWW::OpenAPIClient::Object::TypeHolderDefault](docs/TypeHolderDefault.md) - - [WWW::OpenAPIClient::Object::TypeHolderExample](docs/TypeHolderExample.md) - [WWW::OpenAPIClient::Object::User](docs/User.md) - - [WWW::OpenAPIClient::Object::XmlItem](docs/XmlItem.md) # DOCUMENTATION FOR AUTHORIZATION @@ -464,6 +476,10 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key_query - **Location**: URL query string +## bearer_test + +- **Type**: HTTP basic authentication + ## http_basic_test - **Type**: HTTP basic authentication diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md index 47f95da8f0c..ce21d69c235 100644 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md @@ -8,17 +8,8 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**map_string** | **HASH[string,string]** | | [optional] -**map_number** | **HASH[string,double]** | | [optional] -**map_integer** | **HASH[string,int]** | | [optional] -**map_boolean** | **HASH[string,boolean]** | | [optional] -**map_array_integer** | **HASH[string,ARRAY[int]]** | | [optional] -**map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional] -**map_map_string** | **HASH[string,HASH[string,string]]** | | [optional] -**map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional] -**anytype_1** | [**object**](.md) | | [optional] -**anytype_2** | [**object**](.md) | | [optional] -**anytype_3** | [**object**](.md) | | [optional] +**map_property** | **HASH[string,string]** | | [optional] +**map_of_map_property** | **HASH[string,HASH[string,string]]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/AnotherfakeApi.md b/samples/client/petstore/perl/docs/AnotherfakeApi.md index 87c9e4015b7..a0b0fd6f8ea 100644 --- a/samples/client/petstore/perl/docs/AnotherfakeApi.md +++ b/samples/client/petstore/perl/docs/AnotherfakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call_123_test_special_tags** -> Client call_123_test_special_tags(body => $body) +> Client call_123_test_special_tags(client => $client) To test special tags @@ -26,10 +26,10 @@ use WWW::OpenAPIClient::AnotherFakeApi; my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->call_123_test_special_tags(body => $body); + my $result = $api_instance->call_123_test_special_tags(client => $client); print Dumper($result); }; if ($@) { @@ -41,7 +41,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/perl/docs/EnumTest.md b/samples/client/petstore/perl/docs/EnumTest.md index aa889b2be86..60ed7418d2a 100644 --- a/samples/client/petstore/perl/docs/EnumTest.md +++ b/samples/client/petstore/perl/docs/EnumTest.md @@ -13,6 +13,9 @@ Name | Type | Description | Notes **enum_integer** | **int** | | [optional] **enum_number** | **double** | | [optional] **outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 947df811624..e4c380346f5 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem +[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint [**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean | [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | @@ -24,12 +24,10 @@ Method | HTTP request | Description [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data -# **create_xml_item** -> create_xml_item(xml_item => $xml_item) +# **fake_health_get** +> HealthCheckResult fake_health_get() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example ```perl @@ -38,25 +36,22 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $xml_item = WWW::OpenAPIClient::Object::XmlItem->new(); # XmlItem | XmlItem Body eval { - $api_instance->create_xml_item(xml_item => $xml_item); + my $result = $api_instance->fake_health_get(); + print Dumper($result); }; if ($@) { - warn "Exception when calling FakeApi->create_xml_item: $@\n"; + warn "Exception when calling FakeApi->fake_health_get: $@\n"; } ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body | +This endpoint does not need any parameter. ### Return type -void (empty response body) +[**HealthCheckResult**](HealthCheckResult.md) ### Authorization @@ -64,8 +59,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - - **Accept**: Not defined + - **Content-Type**: Not defined + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -110,13 +105,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_outer_composite_serialize** -> OuterComposite fake_outer_composite_serialize(body => $body) +> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite) @@ -129,10 +124,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body +my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body eval { - my $result = $api_instance->fake_outer_composite_serialize(body => $body); + my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite); print Dumper($result); }; if ($@) { @@ -144,7 +139,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -156,7 +151,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -202,7 +197,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -248,13 +243,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_body_with_file_schema** -> test_body_with_file_schema(body => $body) +> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class) @@ -267,10 +262,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | +my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | eval { - $api_instance->test_body_with_file_schema(body => $body); + $api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n"; @@ -281,7 +276,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -299,7 +294,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_body_with_query_params** -> test_body_with_query_params(query => $query, body => $body) +> test_body_with_query_params(query => $query, user => $user) @@ -311,10 +306,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); my $query = "query_example"; # string | -my $body = WWW::OpenAPIClient::Object::User->new(); # User | +my $user = WWW::OpenAPIClient::Object::User->new(); # User | eval { - $api_instance->test_body_with_query_params(query => $query, body => $body); + $api_instance->test_body_with_query_params(query => $query, user => $user); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_query_params: $@\n"; @@ -326,7 +321,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **query** | **string**| | - **body** | [**User**](User.md)| | + **user** | [**User**](User.md)| | ### Return type @@ -344,7 +339,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_client_model** -> Client test_client_model(body => $body) +> Client test_client_model(client => $client) To test \"client\" model @@ -357,10 +352,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_client_model(body => $body); + my $result = $api_instance->test_client_model(client => $client); print Dumper($result); }; if ($@) { @@ -372,7 +367,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type @@ -405,6 +400,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( # Configure HTTP basic authorization: http_basic_test username => 'YOUR_USERNAME', password => 'YOUR_PASSWORD', + ); my $number = 3.4; # double | None @@ -535,6 +531,11 @@ Fake endpoint to test group parameters (optional) use Data::Dumper; use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( + + # Configure HTTP basic authorization: bearer_test + # Configure bearer access token for authorization: bearer_test + access_token => 'YOUR_BEARER_TOKEN', + ); my $required_string_group = 56; # int | Required String in group parameters @@ -569,7 +570,7 @@ void (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -579,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_inline_additional_properties** -> test_inline_additional_properties(param => $param) +> test_inline_additional_properties(request_body => $request_body) test inline additionalProperties @@ -590,10 +591,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body +my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body eval { - $api_instance->test_inline_additional_properties(param => $param); + $api_instance->test_inline_additional_properties(request_body => $request_body); }; if ($@) { warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n"; @@ -604,7 +605,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **param** | [**HASH[string,string]**](string.md)| request body | + **request_body** | [**HASH[string,string]**](string.md)| request body | ### Return type diff --git a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md index 70e303f7bf0..67c2122cb6f 100644 --- a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **test_classname** -> Client test_classname(body => $body) +> Client test_classname(client => $client) To test class name in snake case @@ -31,10 +31,10 @@ my $api_instance = WWW::OpenAPIClient::FakeClassnameTags123Api->new( #api_key_prefix => {'api_key_query' => 'Bearer'}, ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_classname(body => $body); + my $result = $api_instance->test_classname(client => $client); print Dumper($result); }; if ($@) { @@ -46,7 +46,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md index 3a1bf2c21f3..7cfabebb281 100644 --- a/samples/client/petstore/perl/docs/FormatTest.md +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -21,6 +21,8 @@ Name | Type | Description | Notes **date_time** | **DateTime** | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | +**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**pattern_with_digits_and_delimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 899e2f63e07..5218d9282f1 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -21,7 +21,7 @@ Method | HTTP request | Description # **add_pet** -> add_pet(body => $body) +> add_pet(pet => $pet) Add a new pet to the store @@ -35,10 +35,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->add_pet(body => $body); + $api_instance->add_pet(pet => $pet); }; if ($@) { warn "Exception when calling PetApi->add_pet: $@\n"; @@ -49,7 +49,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -264,7 +264,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_pet** -> update_pet(body => $body) +> update_pet(pet => $pet) Update an existing pet @@ -278,10 +278,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->update_pet(body => $body); + $api_instance->update_pet(pet => $pet); }; if ($@) { warn "Exception when calling PetApi->update_pet: $@\n"; @@ -292,7 +292,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index fe591e701a8..e467823c53a 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -154,7 +154,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_order** -> Order place_order(body => $body) +> Order place_order(order => $order) Place an order for a pet @@ -165,10 +165,10 @@ use WWW::OpenAPIClient::StoreApi; my $api_instance = WWW::OpenAPIClient::StoreApi->new( ); -my $body = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet +my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet eval { - my $result = $api_instance->place_order(body => $body); + my $result = $api_instance->place_order(order => $order); print Dumper($result); }; if ($@) { @@ -180,7 +180,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -192,7 +192,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index caa7684785b..ebe449515cb 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **create_user** -> create_user(body => $body) +> create_user(user => $user) Create user @@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object +my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object eval { - $api_instance->create_user(body => $body); + $api_instance->create_user(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_user: $@\n"; @@ -47,7 +47,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -59,13 +59,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_users_with_array_input** -> create_users_with_array_input(body => $body) +> create_users_with_array_input(user => $user) Creates list of users with given input array @@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_array_input(body => $body); + $api_instance->create_users_with_array_input(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_users_with_array_input: $@\n"; @@ -90,7 +90,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | ### Return type @@ -102,13 +102,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_users_with_list_input** -> create_users_with_list_input(body => $body) +> create_users_with_list_input(user => $user) Creates list of users with given input array @@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_list_input(body => $body); + $api_instance->create_users_with_list_input(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_users_with_list_input: $@\n"; @@ -133,7 +133,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | ### Return type @@ -145,7 +145,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -325,7 +325,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_user** -> update_user(username => $username, body => $body) +> update_user(username => $username, user => $user) Updated user @@ -339,10 +339,10 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( ); my $username = "username_example"; # string | name that need to be deleted -my $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object +my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object eval { - $api_instance->update_user(username => $username, body => $body); + $api_instance->update_user(username => $username, user => $user); }; if ($@) { warn "Exception when calling UserApi->update_user: $@\n"; @@ -354,7 +354,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -366,7 +366,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm index ed6f6470c59..cd1df44004d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # To test special tags # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { data_type => 'Client', description => 'client model', required => '1', @@ -73,9 +73,9 @@ sub new { sub call_123_test_special_tags { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling call_123_test_special_tags"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' when calling call_123_test_special_tags"); } # parse inputs @@ -95,8 +95,8 @@ sub call_123_test_special_tags { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm index 1220484ae4a..e7fc63fd102 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -348,6 +348,12 @@ sub update_params_for_auth { $query_params->{'api_key_query'} = $api_key; } } + elsif ($auth eq 'bearer_test') { + // this endpoint requires Bearer (JWT) authentication (access token) + if ($self->{config}{access_token}) { + $headers['Authorization'] = 'Bearer ' . $self->{config}{access_token}; + } + } elsif ($auth eq 'http_basic_test') { if ($self->{config}{username} || $self->{config}{password}) { $header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm index 2d3ed6587b7..8a9952a6766 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm index 207807f7983..9bf21bd97ef 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm index abece6801b8..9ff4e14475d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index 1c727f64c76..29dcd10fe83 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -49,64 +49,52 @@ sub new { # -# create_xml_item +# fake_health_get # -# creates an XmlItem +# Health check endpoint # -# @param XmlItem $xml_item XmlItem Body (required) { my $params = { - 'xml_item' => { - data_type => 'XmlItem', - description => 'XmlItem Body', - required => '1', - }, }; - __PACKAGE__->method_documentation->{ 'create_xml_item' } = { - summary => 'creates an XmlItem', + __PACKAGE__->method_documentation->{ 'fake_health_get' } = { + summary => 'Health check endpoint', params => $params, - returns => undef, + returns => 'HealthCheckResult', }; } -# @return void +# @return HealthCheckResult # -sub create_xml_item { +sub fake_health_get { my ($self, %args) = @_; - # verify the required parameter 'xml_item' is set - unless (exists $args{'xml_item'}) { - croak("Missing the required parameter 'xml_item' when calling create_xml_item"); - } - # parse inputs - my $_resource_path = '/fake/create_xml_item'; + my $_resource_path = '/fake/health'; - my $_method = 'POST'; + my $_method = 'GET'; my $query_params = {}; my $header_params = {}; my $form_params = {}; # 'Accept' and 'Content-Type' header - my $_header_accept = $self->{api_client}->select_header_accept(); + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; - # body params - if ( exists $args{'xml_item'}) { - $_body_data = $args{'xml_item'}; - } - # authentication setting, if any my $auth_settings = [qw()]; # make the API Call - $self->{api_client}->call_api($_resource_path, $_method, + my $response = $self->{api_client}->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings); - return; + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response); + return $_response_object; } # @@ -147,7 +135,7 @@ sub fake_outer_boolean_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -174,10 +162,10 @@ sub fake_outer_boolean_serialize { # # # -# @param OuterComposite $body Input composite as post body (optional) +# @param OuterComposite $outer_composite Input composite as post body (optional) { my $params = { - 'body' => { + 'outer_composite' => { data_type => 'OuterComposite', description => 'Input composite as post body', required => '0', @@ -207,12 +195,12 @@ sub fake_outer_composite_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'outer_composite'}) { + $_body_data = $args{'outer_composite'}; } # authentication setting, if any @@ -267,7 +255,7 @@ sub fake_outer_number_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -327,7 +315,7 @@ sub fake_outer_string_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -354,10 +342,10 @@ sub fake_outer_string_serialize { # # # -# @param FileSchemaTestClass $body (required) +# @param FileSchemaTestClass $file_schema_test_class (required) { my $params = { - 'body' => { + 'file_schema_test_class' => { data_type => 'FileSchemaTestClass', description => '', required => '1', @@ -374,9 +362,9 @@ sub fake_outer_string_serialize { sub test_body_with_file_schema { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_body_with_file_schema"); + # verify the required parameter 'file_schema_test_class' is set + unless (exists $args{'file_schema_test_class'}) { + croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema"); } # parse inputs @@ -396,8 +384,8 @@ sub test_body_with_file_schema { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'file_schema_test_class'}) { + $_body_data = $args{'file_schema_test_class'}; } # authentication setting, if any @@ -416,7 +404,7 @@ sub test_body_with_file_schema { # # # @param string $query (required) -# @param User $body (required) +# @param User $user (required) { my $params = { 'query' => { @@ -424,7 +412,7 @@ sub test_body_with_file_schema { description => '', required => '1', }, - 'body' => { + 'user' => { data_type => 'User', description => '', required => '1', @@ -446,9 +434,9 @@ sub test_body_with_query_params { croak("Missing the required parameter 'query' when calling test_body_with_query_params"); } - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_body_with_query_params"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling test_body_with_query_params"); } # parse inputs @@ -473,8 +461,8 @@ sub test_body_with_query_params { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -492,10 +480,10 @@ sub test_body_with_query_params { # # To test \"client\" model # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { data_type => 'Client', description => 'client model', required => '1', @@ -512,9 +500,9 @@ sub test_body_with_query_params { sub test_client_model { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_client_model"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' when calling test_client_model"); } # parse inputs @@ -534,8 +522,8 @@ sub test_client_model { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any @@ -1022,7 +1010,7 @@ sub test_group_parameters { my $_body_data; # authentication setting, if any - my $auth_settings = [qw()]; + my $auth_settings = [qw(bearer_test )]; # make the API Call $self->{api_client}->call_api($_resource_path, $_method, @@ -1036,10 +1024,10 @@ sub test_group_parameters { # # test inline additionalProperties # -# @param HASH[string,string] $param request body (required) +# @param HASH[string,string] $request_body request body (required) { my $params = { - 'param' => { + 'request_body' => { data_type => 'HASH[string,string]', description => 'request body', required => '1', @@ -1056,9 +1044,9 @@ sub test_group_parameters { sub test_inline_additional_properties { my ($self, %args) = @_; - # verify the required parameter 'param' is set - unless (exists $args{'param'}) { - croak("Missing the required parameter 'param' when calling test_inline_additional_properties"); + # verify the required parameter 'request_body' is set + unless (exists $args{'request_body'}) { + croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties"); } # parse inputs @@ -1078,8 +1066,8 @@ sub test_inline_additional_properties { my $_body_data; # body params - if ( exists $args{'param'}) { - $_body_data = $args{'param'}; + if ( exists $args{'request_body'}) { + $_body_data = $args{'request_body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm index c55bface164..c521d2c5758 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # To test class name in snake case # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { data_type => 'Client', description => 'client model', required => '1', @@ -73,9 +73,9 @@ sub new { sub test_classname { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_classname"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' when calling test_classname"); } # parse inputs @@ -95,8 +95,8 @@ sub test_classname { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm index 5b5e6777edb..8e30b03ea8f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm index ee56b7242d8..efc94b94778 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm index 0f80ce04ee2..b7268ad68a6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index cf35cb03ba4..3bbbceeb84b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -161,79 +161,16 @@ __PACKAGE__->class_documentation({description => '', } ); __PACKAGE__->method_documentation({ - 'map_string' => { + 'map_property' => { datatype => 'HASH[string,string]', - base_name => 'map_string', + base_name => 'map_property', description => '', format => '', read_only => '', }, - 'map_number' => { - datatype => 'HASH[string,double]', - base_name => 'map_number', - description => '', - format => '', - read_only => '', - }, - 'map_integer' => { - datatype => 'HASH[string,int]', - base_name => 'map_integer', - description => '', - format => '', - read_only => '', - }, - 'map_boolean' => { - datatype => 'HASH[string,boolean]', - base_name => 'map_boolean', - description => '', - format => '', - read_only => '', - }, - 'map_array_integer' => { - datatype => 'HASH[string,ARRAY[int]]', - base_name => 'map_array_integer', - description => '', - format => '', - read_only => '', - }, - 'map_array_anytype' => { - datatype => 'HASH[string,ARRAY[object]]', - base_name => 'map_array_anytype', - description => '', - format => '', - read_only => '', - }, - 'map_map_string' => { + 'map_of_map_property' => { datatype => 'HASH[string,HASH[string,string]]', - base_name => 'map_map_string', - description => '', - format => '', - read_only => '', - }, - 'map_map_anytype' => { - datatype => 'HASH[string,HASH[string,object]]', - base_name => 'map_map_anytype', - description => '', - format => '', - read_only => '', - }, - 'anytype_1' => { - datatype => 'object', - base_name => 'anytype_1', - description => '', - format => '', - read_only => '', - }, - 'anytype_2' => { - datatype => 'object', - base_name => 'anytype_2', - description => '', - format => '', - read_only => '', - }, - 'anytype_3' => { - datatype => 'object', - base_name => 'anytype_3', + base_name => 'map_of_map_property', description => '', format => '', read_only => '', @@ -241,31 +178,13 @@ __PACKAGE__->method_documentation({ }); __PACKAGE__->openapi_types( { - 'map_string' => 'HASH[string,string]', - 'map_number' => 'HASH[string,double]', - 'map_integer' => 'HASH[string,int]', - 'map_boolean' => 'HASH[string,boolean]', - 'map_array_integer' => 'HASH[string,ARRAY[int]]', - 'map_array_anytype' => 'HASH[string,ARRAY[object]]', - 'map_map_string' => 'HASH[string,HASH[string,string]]', - 'map_map_anytype' => 'HASH[string,HASH[string,object]]', - 'anytype_1' => 'object', - 'anytype_2' => 'object', - 'anytype_3' => 'object' + 'map_property' => 'HASH[string,string]', + 'map_of_map_property' => 'HASH[string,HASH[string,string]]' } ); __PACKAGE__->attribute_map( { - 'map_string' => 'map_string', - 'map_number' => 'map_number', - 'map_integer' => 'map_integer', - 'map_boolean' => 'map_boolean', - 'map_array_integer' => 'map_array_integer', - 'map_array_anytype' => 'map_array_anytype', - 'map_map_string' => 'map_map_string', - 'map_map_anytype' => 'map_map_anytype', - 'anytype_1' => 'anytype_1', - 'anytype_2' => 'anytype_2', - 'anytype_3' => 'anytype_3' + 'map_property' => 'map_property', + 'map_of_map_property' => 'map_of_map_property' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm index 6ac377a0757..da3887e899b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm index ee32e481ff5..b742632d41e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm index 9bcf3aeb154..bf10d33d38c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm index bb15356f698..594f8489c8e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm index d9bc7ed50de..15d93a05325 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm index 8a1cda357f0..673b1954e3b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm index 0c540b94a84..89f25673a03 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm index e4723275997..20d4ce4299f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm index cc342e699df..3ea06c42ee7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm index 7f05a735204..59165095981 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm index 9eba77c90c7..66aaed54284 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm index e6eda282cf2..f83ccda5a96 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm index 124ecaaf8e8..6d4995336ce 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm index 9870f0b2a2a..f4989a15608 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm index 396bec58f58..e9a735f0e20 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm index 7abbe2666e9..edbfc4b5432 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm index 31b0ba2a22e..d6b23f1dbfd 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm index 79d5102de6a..a563f72d70e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -31,6 +31,9 @@ use Date::Parse; use DateTime; use WWW::OpenAPIClient::Object::OuterEnum; +use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; +use WWW::OpenAPIClient::Object::OuterEnumInteger; +use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use base ("Class::Accessor", "Class::Data::Inheritable"); @@ -47,7 +50,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -197,6 +200,27 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, + 'outer_enum_integer' => { + datatype => 'OuterEnumInteger', + base_name => 'outerEnumInteger', + description => '', + format => '', + read_only => '', + }, + 'outer_enum_default_value' => { + datatype => 'OuterEnumDefaultValue', + base_name => 'outerEnumDefaultValue', + description => '', + format => '', + read_only => '', + }, + 'outer_enum_integer_default_value' => { + datatype => 'OuterEnumIntegerDefaultValue', + base_name => 'outerEnumIntegerDefaultValue', + description => '', + format => '', + read_only => '', + }, }); __PACKAGE__->openapi_types( { @@ -204,7 +228,10 @@ __PACKAGE__->openapi_types( { 'enum_string_required' => 'string', 'enum_integer' => 'int', 'enum_number' => 'double', - 'outer_enum' => 'OuterEnum' + 'outer_enum' => 'OuterEnum', + 'outer_enum_integer' => 'OuterEnumInteger', + 'outer_enum_default_value' => 'OuterEnumDefaultValue', + 'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue' } ); __PACKAGE__->attribute_map( { @@ -212,7 +239,10 @@ __PACKAGE__->attribute_map( { 'enum_string_required' => 'enum_string_required', 'enum_integer' => 'enum_integer', 'enum_number' => 'enum_number', - 'outer_enum' => 'outerEnum' + 'outer_enum' => 'outerEnum', + 'outer_enum_integer' => 'outerEnumInteger', + 'outer_enum_default_value' => 'outerEnumDefaultValue', + 'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm index 6c3690620da..44d4650e543 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm index 46643834502..e31bac19a61 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm index 8e76ee79d2c..378a588f945 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index 5622c742cba..b3c1defbd7e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -252,6 +252,20 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, + 'pattern_with_digits' => { + datatype => 'string', + base_name => 'pattern_with_digits', + description => 'A string that is a 10 digit number. Can have leading zeros.', + format => '', + read_only => '', + }, + 'pattern_with_digits_and_delimiter' => { + datatype => 'string', + base_name => 'pattern_with_digits_and_delimiter', + description => 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.', + format => '', + read_only => '', + }, }); __PACKAGE__->openapi_types( { @@ -267,7 +281,9 @@ __PACKAGE__->openapi_types( { 'date' => 'DateTime', 'date_time' => 'DateTime', 'uuid' => 'string', - 'password' => 'string' + 'password' => 'string', + 'pattern_with_digits' => 'string', + 'pattern_with_digits_and_delimiter' => 'string' } ); __PACKAGE__->attribute_map( { @@ -283,7 +299,9 @@ __PACKAGE__->attribute_map( { 'date' => 'date', 'date_time' => 'dateTime', 'uuid' => 'uuid', - 'password' => 'password' + 'password' => 'password', + 'pattern_with_digits' => 'pattern_with_digits', + 'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm index 5a359791d26..cde0076373c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm index 31ee152b7b0..f8a88db2922 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm index 47e9d20f2ff..1b45e5c05c4 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm index 387af5b5588..e725223d63a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm index 22b97d9da70..3342b60b860 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm index 13dc5e45575..c9c74e9ead6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm index 733bcd1b0ec..8e73c5f3037 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm index f4a4fa7e18c..40a1319c861 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm index 079d246db55..7c9c51f0a96 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm index 4ad74944ca9..08b426283c6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm index 9964563a6fe..4c3c66b987f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm index 251aabe1d61..d413341cf5b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm index e088706fe0c..fd006c5ad6b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm index 530581cc0c6..4972e0a9dba 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm index 9c00ad14894..29a78caf527 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm index 27836004746..9e538e95c7b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm index 96b42362910..ab9e9d3dd40 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm index 00ed0155385..645ba74faae 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm index 0aef6dbfe90..aa5a9526aaa 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm index f20810137e7..44d1e6ca8ad 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm index 53b1d5a1620..5942b8ff798 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm index ebc6f6d0c1b..5309a43dfa2 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm index 49ff7d83eea..d12618951d3 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm index dbb878f86b6..86b73132280 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -48,7 +48,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm index 96d5e1d5d9c..f04defe0d97 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm index 48d438db454..bb884cfa0de 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm index d973f5e5877..41399693422 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm index 355cf839493..147a8d9abf3 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm index 8cacd4e433c..f3e28b05051 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm index 44f7ff0f75f..9b86889ea42 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm index ad7e2c2695c..d6e700b3623 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 070ab1bde33..f55d7b63834 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # Add a new pet to the store # -# @param Pet $body Pet object that needs to be added to the store (required) +# @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { - 'body' => { + 'pet' => { data_type => 'Pet', description => 'Pet object that needs to be added to the store', required => '1', @@ -73,9 +73,9 @@ sub new { sub add_pet { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling add_pet"); + # verify the required parameter 'pet' is set + unless (exists $args{'pet'}) { + croak("Missing the required parameter 'pet' when calling add_pet"); } # parse inputs @@ -95,8 +95,8 @@ sub add_pet { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'pet'}) { + $_body_data = $args{'pet'}; } # authentication setting, if any @@ -385,10 +385,10 @@ sub get_pet_by_id { # # Update an existing pet # -# @param Pet $body Pet object that needs to be added to the store (required) +# @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { - 'body' => { + 'pet' => { data_type => 'Pet', description => 'Pet object that needs to be added to the store', required => '1', @@ -405,9 +405,9 @@ sub get_pet_by_id { sub update_pet { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling update_pet"); + # verify the required parameter 'pet' is set + unless (exists $args{'pet'}) { + croak("Missing the required parameter 'pet' when calling update_pet"); } # parse inputs @@ -427,8 +427,8 @@ sub update_pet { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'pet'}) { + $_body_data = $args{'pet'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm index 22da68892cb..dea1fd81a0c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm index bc18a96fb71..db553b53a1f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm index 2d730e28e55..3b87d3d8f73 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -232,10 +232,10 @@ sub get_order_by_id { # # Place an order for a pet # -# @param Order $body order placed for purchasing the pet (required) +# @param Order $order order placed for purchasing the pet (required) { my $params = { - 'body' => { + 'order' => { data_type => 'Order', description => 'order placed for purchasing the pet', required => '1', @@ -252,9 +252,9 @@ sub get_order_by_id { sub place_order { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling place_order"); + # verify the required parameter 'order' is set + unless (exists $args{'order'}) { + croak("Missing the required parameter 'order' when calling place_order"); } # parse inputs @@ -270,12 +270,12 @@ sub place_order { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'order'}) { + $_body_data = $args{'order'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm index e02106644ca..15bb4b97a3c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # Create user # -# @param User $body Created user object (required) +# @param User $user Created user object (required) { my $params = { - 'body' => { + 'user' => { data_type => 'User', description => 'Created user object', required => '1', @@ -73,9 +73,9 @@ sub new { sub create_user { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_user"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_user"); } # parse inputs @@ -91,12 +91,12 @@ sub create_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -114,10 +114,10 @@ sub create_user { # # Creates list of users with given input array # -# @param ARRAY[User] $body List of user object (required) +# @param ARRAY[User] $user List of user object (required) { my $params = { - 'body' => { + 'user' => { data_type => 'ARRAY[User]', description => 'List of user object', required => '1', @@ -134,9 +134,9 @@ sub create_user { sub create_users_with_array_input { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_users_with_array_input"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_users_with_array_input"); } # parse inputs @@ -152,12 +152,12 @@ sub create_users_with_array_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -175,10 +175,10 @@ sub create_users_with_array_input { # # Creates list of users with given input array # -# @param ARRAY[User] $body List of user object (required) +# @param ARRAY[User] $user List of user object (required) { my $params = { - 'body' => { + 'user' => { data_type => 'ARRAY[User]', description => 'List of user object', required => '1', @@ -195,9 +195,9 @@ sub create_users_with_array_input { sub create_users_with_list_input { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_users_with_list_input"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_users_with_list_input"); } # parse inputs @@ -213,12 +213,12 @@ sub create_users_with_list_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -493,7 +493,7 @@ sub logout_user { # Updated user # # @param string $username name that need to be deleted (required) -# @param User $body Updated user object (required) +# @param User $user Updated user object (required) { my $params = { 'username' => { @@ -501,7 +501,7 @@ sub logout_user { description => 'name that need to be deleted', required => '1', }, - 'body' => { + 'user' => { data_type => 'User', description => 'Updated user object', required => '1', @@ -523,9 +523,9 @@ sub update_user { croak("Missing the required parameter 'username' when calling update_user"); } - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling update_user"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling update_user"); } # parse inputs @@ -541,7 +541,7 @@ sub update_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); # path params if ( exists $args{'username'}) { @@ -552,8 +552,8 @@ sub update_user { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any From b9451e91afedd7cf664ba6bd5fdf9bac5ec635d5 Mon Sep 17 00:00:00 2001 From: Min Kim <291271447@qq.com> Date: Fri, 21 Jun 2019 21:01:23 +0800 Subject: [PATCH 48/73] generate travis configuration (#3193) --- .../codegen/languages/PerlClientCodegen.java | 1 + .../src/main/resources/perl/travis.mustache | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 modules/openapi-generator/src/main/resources/perl/travis.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 673ab32669d..7036c71507e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -167,6 +167,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); + supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml")); } @Override diff --git a/modules/openapi-generator/src/main/resources/perl/travis.mustache b/modules/openapi-generator/src/main/resources/perl/travis.mustache new file mode 100644 index 00000000000..cdfebb90fbe --- /dev/null +++ b/modules/openapi-generator/src/main/resources/perl/travis.mustache @@ -0,0 +1,9 @@ +# https://docs.travis-ci.com/user/languages/perl/ +# + +language: perl + +perl: + - "5.28" + +sudo: false From 2a5af92cdf12dda4d96680d5b67fc436da3ea1d6 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Fri, 21 Jun 2019 18:39:13 +0530 Subject: [PATCH 49/73] [csharp-netcore]: Adding http response details in api_docs and making example snippet compilable (#3128) * feat(csharp-documentation): Improving documentation and example * feat(csharp-documentation): Updating pet project * feat(csharp-documentation): Minor updates * feat(csharp-documentation): Updating pet project * feat(csharp): Updating pet project * feat(csharp-netcore): Updating pet project --- .../resources/csharp-netcore/README.mustache | 13 +- .../resources/csharp-netcore/api_doc.mustache | 26 ++- .../csharp-netcore/OpenAPIClient/README.md | 11 +- .../OpenAPIClient/docs/AnotherFakeApi.md | 16 +- .../OpenAPIClient/docs/FakeApi.md | 210 +++++++++++++----- .../docs/FakeClassnameTags123Api.md | 16 +- .../OpenAPIClient/docs/PetApi.md | 165 ++++++++++---- .../OpenAPIClient/docs/StoreApi.md | 72 ++++-- .../OpenAPIClient/docs/UserApi.md | 133 ++++++++--- .../OpenAPIClientCore/README.md | 11 +- .../OpenAPIClientCore/docs/AnotherFakeApi.md | 16 +- .../OpenAPIClientCore/docs/FakeApi.md | 210 +++++++++++++----- .../docs/FakeClassnameTags123Api.md | 16 +- .../OpenAPIClientCore/docs/PetApi.md | 165 ++++++++++---- .../OpenAPIClientCore/docs/StoreApi.md | 72 ++++-- .../OpenAPIClientCore/docs/UserApi.md | 133 ++++++++--- 16 files changed, 961 insertions(+), 324 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache index ffe56a5a0b7..56f1b070717 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -80,7 +80,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p ## Getting Started ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; @@ -90,9 +90,10 @@ namespace Example { public class {{operationId}}Example { - public void main() + public static void Main() { {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + Configuration.Default.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} @@ -113,7 +114,7 @@ namespace Example {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(); + var apiInstance = new {{classname}}(Configuration.Default); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} @@ -128,12 +129,14 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache index 60bde9985e6..2eb7c9eb348 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache @@ -12,7 +12,7 @@ Method | HTTP request | Description {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{{summary}}}{{#notes}} @@ -20,7 +20,7 @@ Method | HTTP request | Description ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; @@ -30,8 +30,9 @@ namespace Example { public class {{operationId}}Example { - public void main() + public static void Main() { + Configuration.Default.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} @@ -52,7 +53,7 @@ namespace Example {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(); + var apiInstance = new {{classname}}(Configuration.Default); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} @@ -67,12 +68,14 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -88,7 +91,7 @@ Name | Type | Description | Notes ### Return type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} ### Authorization @@ -99,6 +102,15 @@ Name | Type | Description | Notes - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) {{/operation}} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index 8e320736696..c2049be3127 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -48,7 +48,7 @@ using Org.OpenAPITools.Model; ## Getting Started ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -58,10 +58,11 @@ namespace Example { public class Example { - public void main() + public static void Main() { - var apiInstance = new AnotherFakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -70,9 +71,11 @@ namespace Example ModelClient result = apiInstance.Call123TestSpecialTags(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md index 612293b48bb..bf404a2f491 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md @@ -17,7 +17,7 @@ To test special tags and operation ID starting with number ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -27,9 +27,10 @@ namespace Example { public class Call123TestSpecialTagsExample { - public void main() + public static void Main() { - var apiInstance = new AnotherFakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -38,9 +39,11 @@ namespace Example ModelClient result = apiInstance.Call123TestSpecialTags(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -66,5 +69,10 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 8a11d6461f2..0fd0f4dad71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -29,7 +29,7 @@ this route creates an XmlItem ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -39,9 +39,10 @@ namespace Example { public class CreateXmlItemExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var xmlItem = new XmlItem(); // XmlItem | XmlItem Body try @@ -49,9 +50,11 @@ namespace Example // creates an XmlItem apiInstance.CreateXmlItem(xmlItem); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -77,6 +80,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -89,7 +97,7 @@ Test serialization of outer boolean types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -99,9 +107,10 @@ namespace Example { public class FakeOuterBooleanSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = true; // bool? | Input boolean as post body (optional) try @@ -109,9 +118,11 @@ namespace Example bool result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -137,6 +148,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -149,7 +165,7 @@ Test serialization of object with outer number type ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -159,9 +175,10 @@ namespace Example { public class FakeOuterCompositeSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try @@ -169,9 +186,11 @@ namespace Example OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -197,6 +216,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -209,7 +233,7 @@ Test serialization of outer number types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -219,9 +243,10 @@ namespace Example { public class FakeOuterNumberSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = 8.14; // decimal? | Input number as post body (optional) try @@ -229,9 +254,11 @@ namespace Example decimal result = apiInstance.FakeOuterNumberSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -257,6 +284,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -269,7 +301,7 @@ Test serialization of outer string types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -279,9 +311,10 @@ namespace Example { public class FakeOuterStringSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = body_example; // string | Input string as post body (optional) try @@ -289,9 +322,11 @@ namespace Example string result = apiInstance.FakeOuterStringSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -317,6 +352,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -339,18 +379,21 @@ namespace Example { public class TestBodyWithFileSchemaExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new FileSchemaTestClass(); // FileSchemaTestClass | try { apiInstance.TestBodyWithFileSchema(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -376,6 +419,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -386,7 +434,7 @@ No authorization required ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -396,9 +444,10 @@ namespace Example { public class TestBodyWithQueryParamsExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var query = query_example; // string | var body = new User(); // User | @@ -406,9 +455,11 @@ namespace Example { apiInstance.TestBodyWithQueryParams(query, body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -435,6 +486,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -447,7 +503,7 @@ To test \"client\" model ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -457,9 +513,10 @@ namespace Example { public class TestClientModelExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -468,9 +525,11 @@ namespace Example ModelClient result = apiInstance.TestClientModel(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -496,6 +555,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -518,13 +582,14 @@ namespace Example { public class TestEndpointParametersExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure HTTP basic authorization: http_basic_test Configuration.Default.Username = "YOUR_USERNAME"; Configuration.Default.Password = "YOUR_PASSWORD"; - var apiInstance = new FakeApi(); + var apiInstance = new FakeApi(Configuration.Default); var number = 8.14; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None @@ -545,9 +610,11 @@ namespace Example // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -586,6 +653,12 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -598,7 +671,7 @@ To test enum parameters ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -608,9 +681,10 @@ namespace Example { public class TestEnumParametersExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) @@ -625,9 +699,11 @@ namespace Example // To test enum parameters apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -660,6 +736,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional) ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -682,9 +764,10 @@ namespace Example { public class TestGroupParametersExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters @@ -697,9 +780,11 @@ namespace Example // Fake endpoint to test group parameters (optional) apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -730,6 +815,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -740,7 +830,7 @@ test inline additionalProperties ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -750,9 +840,10 @@ namespace Example { public class TestInlineAdditionalPropertiesExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var param = new Dictionary(); // Dictionary | request body try @@ -760,9 +851,11 @@ namespace Example // test inline additionalProperties apiInstance.TestInlineAdditionalProperties(param); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -788,6 +881,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -798,7 +896,7 @@ test json serialization of form data ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -808,9 +906,10 @@ namespace Example { public class TestJsonFormDataExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var param = param_example; // string | field1 var param2 = param2_example; // string | field2 @@ -819,9 +918,11 @@ namespace Example // test json serialization of form data apiInstance.TestJsonFormData(param, param2); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -848,5 +949,10 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md index abea3cb9977..3a241e3c631 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md @@ -17,7 +17,7 @@ To test class name in snake case ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -27,14 +27,15 @@ namespace Example { public class TestClassnameExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key_query Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - var apiInstance = new FakeClassnameTags123Api(); + var apiInstance = new FakeClassnameTags123Api(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -43,9 +44,11 @@ namespace Example ModelClient result = apiInstance.TestClassname(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -71,5 +74,10 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index a7b361f05ab..f8d05ec9396 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -23,7 +23,7 @@ Add a new pet to the store ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -33,12 +33,13 @@ namespace Example { public class AddPetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -46,9 +47,11 @@ namespace Example // Add a new pet to the store apiInstance.AddPet(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -74,6 +77,12 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -84,7 +93,7 @@ Deletes a pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -94,12 +103,13 @@ namespace Example { public class DeletePetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | Pet id to delete var apiKey = apiKey_example; // string | (optional) @@ -108,9 +118,11 @@ namespace Example // Deletes a pet apiInstance.DeletePet(petId, apiKey); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -137,11 +149,17 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FindPetsByStatus** -> List FindPetsByStatus (List status) +> List<Pet> FindPetsByStatus (List status) Finds Pets by status @@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -159,23 +177,26 @@ namespace Example { public class FindPetsByStatusExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var status = status_example; // List | Status values that need to be considered for filter try { // Finds Pets by status - List<Pet> result = apiInstance.FindPetsByStatus(status); + List result = apiInstance.FindPetsByStatus(status); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -190,7 +211,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -201,11 +222,17 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FindPetsByTags** -> List FindPetsByTags (List tags) +> List<Pet> FindPetsByTags (List tags) Finds Pets by tags @@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -223,23 +250,26 @@ namespace Example { public class FindPetsByTagsExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var tags = new List(); // List | Tags to filter by try { // Finds Pets by tags - List<Pet> result = apiInstance.FindPetsByTags(tags); + List result = apiInstance.FindPetsByTags(tags); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -254,7 +284,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -265,6 +295,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -277,7 +313,7 @@ Returns a single pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -287,14 +323,15 @@ namespace Example { public class GetPetByIdExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to return try @@ -303,9 +340,11 @@ namespace Example Pet result = apiInstance.GetPetById(petId); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -331,6 +370,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -341,7 +387,7 @@ Update an existing pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -351,12 +397,13 @@ namespace Example { public class UpdatePetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -364,9 +411,11 @@ namespace Example // Update an existing pet apiInstance.UpdatePet(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -392,6 +441,14 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -402,7 +459,7 @@ Updates a pet in the store with form data ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -412,12 +469,13 @@ namespace Example { public class UpdatePetWithFormExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet that needs to be updated var name = name_example; // string | Updated name of the pet (optional) var status = status_example; // string | Updated status of the pet (optional) @@ -427,9 +485,11 @@ namespace Example // Updates a pet in the store with form data apiInstance.UpdatePetWithForm(petId, name, status); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -457,6 +517,11 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -467,7 +532,7 @@ uploads an image ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -477,12 +542,13 @@ namespace Example { public class UploadFileExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) @@ -493,9 +559,11 @@ namespace Example ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -523,6 +591,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -533,7 +606,7 @@ uploads an image (required) ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -543,12 +616,13 @@ namespace Example { public class UploadFileWithRequiredFileExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to update var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) @@ -559,9 +633,11 @@ namespace Example ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -589,5 +665,10 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md index 947a0304ce8..c5143852603 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md @@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -30,9 +30,10 @@ namespace Example { public class DeleteOrderExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var orderId = orderId_example; // string | ID of the order that needs to be deleted try @@ -40,9 +41,11 @@ namespace Example // Delete purchase order by ID apiInstance.DeleteOrder(orderId); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -68,11 +71,17 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetInventory** -> Dictionary GetInventory () +> Dictionary<string, int> GetInventory () Returns pet inventories by status @@ -80,7 +89,7 @@ Returns a map of status codes to quantities ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -90,24 +99,27 @@ namespace Example { public class GetInventoryExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new StoreApi(); + var apiInstance = new StoreApi(Configuration.Default); try { // Returns pet inventories by status - Dictionary<string, int> result = apiInstance.GetInventory(); + Dictionary result = apiInstance.GetInventory(); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -130,6 +142,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -152,9 +169,10 @@ namespace Example { public class GetOrderByIdExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var orderId = 789; // long | ID of pet that needs to be fetched try @@ -163,9 +181,11 @@ namespace Example Order result = apiInstance.GetOrderById(orderId); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -191,6 +211,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -201,7 +228,7 @@ Place an order for a pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -211,9 +238,10 @@ namespace Example { public class PlaceOrderExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var body = new Order(); // Order | order placed for purchasing the pet try @@ -222,9 +250,11 @@ namespace Example Order result = apiInstance.PlaceOrder(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -250,5 +280,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md index aedbf750cfc..4588b440131 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md @@ -24,7 +24,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -34,9 +34,10 @@ namespace Example { public class CreateUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new User(); // User | Created user object try @@ -44,9 +45,11 @@ namespace Example // Create user apiInstance.CreateUser(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -72,6 +75,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -82,7 +90,7 @@ Creates list of users with given input array ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -92,9 +100,10 @@ namespace Example { public class CreateUsersWithArrayInputExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new List(); // List | List of user object try @@ -102,9 +111,11 @@ namespace Example // Creates list of users with given input array apiInstance.CreateUsersWithArrayInput(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -130,6 +141,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -140,7 +156,7 @@ Creates list of users with given input array ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -150,9 +166,10 @@ namespace Example { public class CreateUsersWithListInputExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new List(); // List | List of user object try @@ -160,9 +177,11 @@ namespace Example // Creates list of users with given input array apiInstance.CreateUsersWithListInput(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -188,6 +207,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -200,7 +224,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -210,9 +234,10 @@ namespace Example { public class DeleteUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The name that needs to be deleted try @@ -220,9 +245,11 @@ namespace Example // Delete user apiInstance.DeleteUser(username); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -248,6 +275,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -258,7 +291,7 @@ Get user by user name ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -268,9 +301,10 @@ namespace Example { public class GetUserByNameExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. try @@ -279,9 +313,11 @@ namespace Example User result = apiInstance.GetUserByName(username); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -307,6 +343,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -317,7 +360,7 @@ Logs user into the system ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -327,9 +370,10 @@ namespace Example { public class LoginUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -339,9 +383,11 @@ namespace Example string result = apiInstance.LoginUser(username, password); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -368,6 +414,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -378,7 +430,7 @@ Logs out current logged in user session ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -388,18 +440,21 @@ namespace Example { public class LogoutUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); try { // Logs out current logged in user session apiInstance.LogoutUser(); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -422,6 +477,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -434,7 +494,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -444,9 +504,10 @@ namespace Example { public class UpdateUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object @@ -455,9 +516,11 @@ namespace Example // Updated user apiInstance.UpdateUser(username, body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -484,5 +547,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index bd485a13cd1..8ed98381bee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -60,7 +60,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p ## Getting Started ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -70,10 +70,11 @@ namespace Example { public class Example { - public void main() + public static void Main() { - var apiInstance = new AnotherFakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -82,9 +83,11 @@ namespace Example ModelClient result = apiInstance.Call123TestSpecialTags(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md index 612293b48bb..bf404a2f491 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md @@ -17,7 +17,7 @@ To test special tags and operation ID starting with number ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -27,9 +27,10 @@ namespace Example { public class Call123TestSpecialTagsExample { - public void main() + public static void Main() { - var apiInstance = new AnotherFakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -38,9 +39,11 @@ namespace Example ModelClient result = apiInstance.Call123TestSpecialTags(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -66,5 +69,10 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 8a11d6461f2..0fd0f4dad71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -29,7 +29,7 @@ this route creates an XmlItem ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -39,9 +39,10 @@ namespace Example { public class CreateXmlItemExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var xmlItem = new XmlItem(); // XmlItem | XmlItem Body try @@ -49,9 +50,11 @@ namespace Example // creates an XmlItem apiInstance.CreateXmlItem(xmlItem); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -77,6 +80,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -89,7 +97,7 @@ Test serialization of outer boolean types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -99,9 +107,10 @@ namespace Example { public class FakeOuterBooleanSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = true; // bool? | Input boolean as post body (optional) try @@ -109,9 +118,11 @@ namespace Example bool result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -137,6 +148,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -149,7 +165,7 @@ Test serialization of object with outer number type ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -159,9 +175,10 @@ namespace Example { public class FakeOuterCompositeSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try @@ -169,9 +186,11 @@ namespace Example OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -197,6 +216,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -209,7 +233,7 @@ Test serialization of outer number types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -219,9 +243,10 @@ namespace Example { public class FakeOuterNumberSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = 8.14; // decimal? | Input number as post body (optional) try @@ -229,9 +254,11 @@ namespace Example decimal result = apiInstance.FakeOuterNumberSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -257,6 +284,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -269,7 +301,7 @@ Test serialization of outer string types ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -279,9 +311,10 @@ namespace Example { public class FakeOuterStringSerializeExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = body_example; // string | Input string as post body (optional) try @@ -289,9 +322,11 @@ namespace Example string result = apiInstance.FakeOuterStringSerialize(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -317,6 +352,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -339,18 +379,21 @@ namespace Example { public class TestBodyWithFileSchemaExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new FileSchemaTestClass(); // FileSchemaTestClass | try { apiInstance.TestBodyWithFileSchema(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -376,6 +419,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -386,7 +434,7 @@ No authorization required ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -396,9 +444,10 @@ namespace Example { public class TestBodyWithQueryParamsExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var query = query_example; // string | var body = new User(); // User | @@ -406,9 +455,11 @@ namespace Example { apiInstance.TestBodyWithQueryParams(query, body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -435,6 +486,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -447,7 +503,7 @@ To test \"client\" model ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -457,9 +513,10 @@ namespace Example { public class TestClientModelExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -468,9 +525,11 @@ namespace Example ModelClient result = apiInstance.TestClientModel(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -496,6 +555,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -518,13 +582,14 @@ namespace Example { public class TestEndpointParametersExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure HTTP basic authorization: http_basic_test Configuration.Default.Username = "YOUR_USERNAME"; Configuration.Default.Password = "YOUR_PASSWORD"; - var apiInstance = new FakeApi(); + var apiInstance = new FakeApi(Configuration.Default); var number = 8.14; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None @@ -545,9 +610,11 @@ namespace Example // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -586,6 +653,12 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -598,7 +671,7 @@ To test enum parameters ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -608,9 +681,10 @@ namespace Example { public class TestEnumParametersExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) @@ -625,9 +699,11 @@ namespace Example // To test enum parameters apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -660,6 +736,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional) ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -682,9 +764,10 @@ namespace Example { public class TestGroupParametersExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters @@ -697,9 +780,11 @@ namespace Example // Fake endpoint to test group parameters (optional) apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -730,6 +815,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -740,7 +830,7 @@ test inline additionalProperties ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -750,9 +840,10 @@ namespace Example { public class TestInlineAdditionalPropertiesExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var param = new Dictionary(); // Dictionary | request body try @@ -760,9 +851,11 @@ namespace Example // test inline additionalProperties apiInstance.TestInlineAdditionalProperties(param); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -788,6 +881,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -798,7 +896,7 @@ test json serialization of form data ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -808,9 +906,10 @@ namespace Example { public class TestJsonFormDataExample { - public void main() + public static void Main() { - var apiInstance = new FakeApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); var param = param_example; // string | field1 var param2 = param2_example; // string | field2 @@ -819,9 +918,11 @@ namespace Example // test json serialization of form data apiInstance.TestJsonFormData(param, param2); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -848,5 +949,10 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md index abea3cb9977..3a241e3c631 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md @@ -17,7 +17,7 @@ To test class name in snake case ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -27,14 +27,15 @@ namespace Example { public class TestClassnameExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key_query Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - var apiInstance = new FakeClassnameTags123Api(); + var apiInstance = new FakeClassnameTags123Api(Configuration.Default); var body = new ModelClient(); // ModelClient | client model try @@ -43,9 +44,11 @@ namespace Example ModelClient result = apiInstance.TestClassname(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -71,5 +74,10 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index a7b361f05ab..f8d05ec9396 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -23,7 +23,7 @@ Add a new pet to the store ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -33,12 +33,13 @@ namespace Example { public class AddPetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -46,9 +47,11 @@ namespace Example // Add a new pet to the store apiInstance.AddPet(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -74,6 +77,12 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -84,7 +93,7 @@ Deletes a pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -94,12 +103,13 @@ namespace Example { public class DeletePetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | Pet id to delete var apiKey = apiKey_example; // string | (optional) @@ -108,9 +118,11 @@ namespace Example // Deletes a pet apiInstance.DeletePet(petId, apiKey); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -137,11 +149,17 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FindPetsByStatus** -> List FindPetsByStatus (List status) +> List<Pet> FindPetsByStatus (List status) Finds Pets by status @@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -159,23 +177,26 @@ namespace Example { public class FindPetsByStatusExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var status = status_example; // List | Status values that need to be considered for filter try { // Finds Pets by status - List<Pet> result = apiInstance.FindPetsByStatus(status); + List result = apiInstance.FindPetsByStatus(status); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -190,7 +211,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -201,11 +222,17 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FindPetsByTags** -> List FindPetsByTags (List tags) +> List<Pet> FindPetsByTags (List tags) Finds Pets by tags @@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -223,23 +250,26 @@ namespace Example { public class FindPetsByTagsExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var tags = new List(); // List | Tags to filter by try { // Finds Pets by tags - List<Pet> result = apiInstance.FindPetsByTags(tags); + List result = apiInstance.FindPetsByTags(tags); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -254,7 +284,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -265,6 +295,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -277,7 +313,7 @@ Returns a single pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -287,14 +323,15 @@ namespace Example { public class GetPetByIdExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to return try @@ -303,9 +340,11 @@ namespace Example Pet result = apiInstance.GetPetById(petId); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -331,6 +370,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -341,7 +387,7 @@ Update an existing pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -351,12 +397,13 @@ namespace Example { public class UpdatePetExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -364,9 +411,11 @@ namespace Example // Update an existing pet apiInstance.UpdatePet(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -392,6 +441,14 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -402,7 +459,7 @@ Updates a pet in the store with form data ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -412,12 +469,13 @@ namespace Example { public class UpdatePetWithFormExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet that needs to be updated var name = name_example; // string | Updated name of the pet (optional) var status = status_example; // string | Updated status of the pet (optional) @@ -427,9 +485,11 @@ namespace Example // Updates a pet in the store with form data apiInstance.UpdatePetWithForm(petId, name, status); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -457,6 +517,11 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -467,7 +532,7 @@ uploads an image ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -477,12 +542,13 @@ namespace Example { public class UploadFileExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) @@ -493,9 +559,11 @@ namespace Example ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -523,6 +591,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -533,7 +606,7 @@ uploads an image (required) ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -543,12 +616,13 @@ namespace Example { public class UploadFileWithRequiredFileExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(); + var apiInstance = new PetApi(Configuration.Default); var petId = 789; // long | ID of pet to update var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) @@ -559,9 +633,11 @@ namespace Example ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -589,5 +665,10 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md index 947a0304ce8..c5143852603 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md @@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -30,9 +30,10 @@ namespace Example { public class DeleteOrderExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var orderId = orderId_example; // string | ID of the order that needs to be deleted try @@ -40,9 +41,11 @@ namespace Example // Delete purchase order by ID apiInstance.DeleteOrder(orderId); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -68,11 +71,17 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetInventory** -> Dictionary GetInventory () +> Dictionary<string, int> GetInventory () Returns pet inventories by status @@ -80,7 +89,7 @@ Returns a map of status codes to quantities ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -90,24 +99,27 @@ namespace Example { public class GetInventoryExample { - public void main() + public static void Main() { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new StoreApi(); + var apiInstance = new StoreApi(Configuration.Default); try { // Returns pet inventories by status - Dictionary<string, int> result = apiInstance.GetInventory(); + Dictionary result = apiInstance.GetInventory(); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -130,6 +142,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -152,9 +169,10 @@ namespace Example { public class GetOrderByIdExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var orderId = 789; // long | ID of pet that needs to be fetched try @@ -163,9 +181,11 @@ namespace Example Order result = apiInstance.GetOrderById(orderId); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -191,6 +211,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -201,7 +228,7 @@ Place an order for a pet ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -211,9 +238,10 @@ namespace Example { public class PlaceOrderExample { - public void main() + public static void Main() { - var apiInstance = new StoreApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(Configuration.Default); var body = new Order(); // Order | order placed for purchasing the pet try @@ -222,9 +250,11 @@ namespace Example Order result = apiInstance.PlaceOrder(body); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -250,5 +280,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md index aedbf750cfc..4588b440131 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md @@ -24,7 +24,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -34,9 +34,10 @@ namespace Example { public class CreateUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new User(); // User | Created user object try @@ -44,9 +45,11 @@ namespace Example // Create user apiInstance.CreateUser(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -72,6 +75,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -82,7 +90,7 @@ Creates list of users with given input array ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -92,9 +100,10 @@ namespace Example { public class CreateUsersWithArrayInputExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new List(); // List | List of user object try @@ -102,9 +111,11 @@ namespace Example // Creates list of users with given input array apiInstance.CreateUsersWithArrayInput(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -130,6 +141,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -140,7 +156,7 @@ Creates list of users with given input array ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -150,9 +166,10 @@ namespace Example { public class CreateUsersWithListInputExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var body = new List(); // List | List of user object try @@ -160,9 +177,11 @@ namespace Example // Creates list of users with given input array apiInstance.CreateUsersWithListInput(body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -188,6 +207,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -200,7 +224,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -210,9 +234,10 @@ namespace Example { public class DeleteUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The name that needs to be deleted try @@ -220,9 +245,11 @@ namespace Example // Delete user apiInstance.DeleteUser(username); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -248,6 +275,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -258,7 +291,7 @@ Get user by user name ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -268,9 +301,10 @@ namespace Example { public class GetUserByNameExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. try @@ -279,9 +313,11 @@ namespace Example User result = apiInstance.GetUserByName(username); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -307,6 +343,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -317,7 +360,7 @@ Logs user into the system ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -327,9 +370,10 @@ namespace Example { public class LoginUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -339,9 +383,11 @@ namespace Example string result = apiInstance.LoginUser(username, password); Debug.WriteLine(result); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -368,6 +414,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -378,7 +430,7 @@ Logs out current logged in user session ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -388,18 +440,21 @@ namespace Example { public class LogoutUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); try { // Logs out current logged in user session apiInstance.LogoutUser(); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -422,6 +477,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -434,7 +494,7 @@ This can only be done by the logged in user. ### Example ```csharp -using System; +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -444,9 +504,10 @@ namespace Example { public class UpdateUserExample { - public void main() + public static void Main() { - var apiInstance = new UserApi(); + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(Configuration.Default); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object @@ -455,9 +516,11 @@ namespace Example // Updated user apiInstance.UpdateUser(username, body); } - catch (Exception e) + catch (ApiException e) { Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); } } } @@ -484,5 +547,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) From b6bb13b93c8812e8c6228fe9c864054b41336b28 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 21 Jun 2019 21:52:35 +0800 Subject: [PATCH 50/73] Add "yue9944882" to Perl technical committee (#3194) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cae8ada578c..d1e35c4862a 100644 --- a/README.md +++ b/README.md @@ -776,7 +776,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Lua | @daurnimator (2017/08) | | NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) | | ObjC | | -| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) | +| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) | | PowerShell | | | Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) | From 1540ae7951f39c4f53b6244a9cc48c6cf3596671 Mon Sep 17 00:00:00 2001 From: MBcom <27956078+MBcom@users.noreply.github.com> Date: Fri, 21 Jun 2019 15:54:08 +0200 Subject: [PATCH 51/73] added api key authentication to aspnetcore 2.1 (#3089) updated samples --- .../languages/AspNetCoreServerCodegen.java | 2 + .../Authentication/ApiAuthentication.mustache | 60 +++++++++++++++++++ .../resources/aspnetcore/2.1/Startup.mustache | 18 ++++++ .../aspnetcore/2.1/controller.mustache | 3 +- .../Authentication/ApiAuthentication.cs | 47 +++++++++++++++ .../Org.OpenAPITools/Controllers/PetApi.cs | 1 + .../Org.OpenAPITools/Controllers/StoreApi.cs | 1 + .../src/Org.OpenAPITools/Startup.cs | 9 +++ 8 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache create mode 100644 samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index a2eaa806b21..8ffa5e4a6d9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -309,6 +309,8 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("Filters" + File.separator + "GeneratePathParamsValidationFilter.mustache", packageFolder + File.separator + "Filters", "GeneratePathParamsValidationFilter.cs")); } + + supportingFiles.add(new SupportingFile("Authentication" + File.separator + "ApiAuthentication.mustache",packageFolder + File.separator + "Authentication", "ApiAuthentication.cs")); } public void setPackageGuid(String packageGuid) { diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache new file mode 100644 index 00000000000..8f266775e13 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache @@ -0,0 +1,60 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.Filters; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace {{packageName}}.Authentication +{ + public class ApiKeyRequirement : IAuthorizationRequirement + { + public IReadOnlyList ApiKeys { get; set; } + + public string PolicyName { get; set; } + + public ApiKeyRequirement(IEnumerable apiKeys, string policyName) + { + ApiKeys = apiKeys?.ToList() ?? new List(); + PolicyName = policyName; + } + } + + public class ApiKeyRequirementHandler : AuthorizationHandler + { + + protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { + SucceedRequirementIfApiKeyPresentAndValid(context, requirement); + return Task.CompletedTask; + } + + private void SucceedRequirementIfApiKeyPresentAndValid(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { +{{#authMethods}}{{#isApiKey}} +{{#-first}} + if (context.Resource is AuthorizationFilterContext authorizationFilterContext) + { + var apiKey = ""; +{{/-first}} +{{#isKeyInHeader}} + apiKey = authorizationFilterContext.HttpContext.Request.Headers["{{keyParamName}}"].FirstOrDefault(); +{{/isKeyInHeader}} +{{#isKeyInQuery}} + apiKey = authorizationFilterContext.HttpContext.Request.Query["{{keyParamName}}"].FirstOrDefault(); +{{/isKeyInQuery}} +{{#isKeyInCookie}} + apiKey = authorizationFilterContext.HttpContext.Request.Cookies["{{keyParamName}}"] ?? null; +{{/isKeyInCookie}} + if (requirement.PolicyName == "{{name}}" && apiKey != null && requirement.ApiKeys.Any(requiredApiKey => apiKey == requiredApiKey)) + { + context.Succeed(requirement); + } +{{#-last}} + } +{{/-last}} +{{/isApiKey}}{{/authMethods}} + } + } +} + diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache index 3352c113c4a..5883d72bcae 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache @@ -12,6 +12,8 @@ using Newtonsoft.Json.Serialization;{{#useSwashbuckle}} using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; using {{packageName}}.Filters;{{/useSwashbuckle}} +using {{packageName}}.Authentication; +using Microsoft.AspNetCore.Authorization; namespace {{packageName}} { @@ -40,6 +42,22 @@ namespace {{packageName}} /// public void ConfigureServices(IServiceCollection services) { +{{#authMethods}} +{{#isApiKey}} +{{#-first}} + services.AddTransient(); + services.AddAuthorization(authConfig => + { +{{/-first}} + authConfig.AddPolicy("{{name}}", + policyBuilder => policyBuilder + .AddRequirements(new ApiKeyRequirement(new[] { "my-secret-key" },"{{name}}"))); +{{#-last}} + }); +{{/-last}} +{{/isApiKey}} +{{/authMethods}} + // Add framework services. services .AddMvc() diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache index 75121e64532..0c136c8a8b8 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache @@ -33,7 +33,8 @@ namespace {{apiPackage}} /// {{description}}{{/allParams}}{{#responses}} /// {{message}}{{/responses}} [{{httpMethod}}] - [Route("{{{basePathWithoutHost}}}{{{path}}}")]{{#hasAuthMethods}}{{#authMethods}}{{#isBasicBearer}} + [Route("{{{basePathWithoutHost}}}{{{path}}}")]{{#hasAuthMethods}}{{#authMethods}}{{#isApiKey}} + [Authorize(Policy = "{{name}}")]{{/isApiKey}}{{#isBasicBearer}} [Authorize{{#hasScopes}}(Roles = "{{#scopes}}{{scope}}{{#hasMore}},{{/hasMore}}{{/scopes}}"){{/hasScopes}}]{{/isBasicBearer}}{{/authMethods}}{{/hasAuthMethods}} [ValidateModelState]{{#useSwashbuckle}} [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs new file mode 100644 index 00000000000..bde72d78080 --- /dev/null +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs @@ -0,0 +1,47 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.Filters; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.Authentication +{ + public class ApiKeyRequirement : IAuthorizationRequirement + { + public IReadOnlyList ApiKeys { get; set; } + + public string PolicyName { get; set; } + + public ApiKeyRequirement(IEnumerable apiKeys, string policyName) + { + ApiKeys = apiKeys?.ToList() ?? new List(); + PolicyName = policyName; + } + } + + public class ApiKeyRequirementHandler : AuthorizationHandler + { + + protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { + SucceedRequirementIfApiKeyPresentAndValid(context, requirement); + return Task.CompletedTask; + } + + private void SucceedRequirementIfApiKeyPresentAndValid(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { + + if (context.Resource is AuthorizationFilterContext authorizationFilterContext) + { + var apiKey = ""; + apiKey = authorizationFilterContext.HttpContext.Request.Headers["api_key"].FirstOrDefault(); + if (requirement.PolicyName == "api_key" && apiKey != null && requirement.ApiKeys.Any(requiredApiKey => apiKey == requiredApiKey)) + { + context.Succeed(requirement); + } + + } + } +} + diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 2a2599284de..0df59c9002d 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -136,6 +136,7 @@ namespace Org.OpenAPITools.Controllers /// Pet not found [HttpGet] [Route("/v2/pet/{petId}")] + [Authorize(Policy = "api_key")] [ValidateModelState] [SwaggerOperation("GetPetById")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 93acea2d083..a94c4a7c243 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -57,6 +57,7 @@ namespace Org.OpenAPITools.Controllers /// successful operation [HttpGet] [Route("/v2/store/inventory")] + [Authorize(Policy = "api_key")] [ValidateModelState] [SwaggerOperation("GetInventory")] [SwaggerResponse(statusCode: 200, type: typeof(Dictionary), description: "successful operation")] diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Startup.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Startup.cs index ece2c98eca5..dc255939dc9 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Startup.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Startup.cs @@ -21,6 +21,8 @@ using Newtonsoft.Json.Serialization; using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; using Org.OpenAPITools.Filters; +using Org.OpenAPITools.Authentication; +using Microsoft.AspNetCore.Authorization; namespace Org.OpenAPITools { @@ -49,6 +51,13 @@ namespace Org.OpenAPITools /// public void ConfigureServices(IServiceCollection services) { + services.AddTransient(); + services.AddAuthorization(authConfig => + { + authConfig.AddPolicy("api_key", + policyBuilder => policyBuilder + .AddRequirements(new ApiKeyRequirement(new[] { "my-secret-key" },"api_key"))); + // Add framework services. services .AddMvc() From e3fe12eacf2a72c6870ccd876692b686d46e718f Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Fri, 21 Jun 2019 16:13:19 +0200 Subject: [PATCH 52/73] Merge java8 doc for spring (#3122) fix #3117 --- docs/generators/spring.md | 3 +-- .../codegen/languages/AbstractJavaCodegen.java | 2 +- .../codegen/languages/SpringCodegen.java | 10 ++++++++-- .../codegen/java/spring/SpringCodegenTest.java | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 93bff4469ad..eed7875d227 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -35,7 +35,7 @@ sidebar_label: spring |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date (if you really have a good reason not to use threetenbp
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
**threetenbp**
Backport of JSR310 (preferred for jdk < 1.8)
|threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|false| +|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
**false**
Various third party libraries as needed
|false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| @@ -48,7 +48,6 @@ sidebar_label: spring |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false| -|java8|use java8 default interface| |true| |async|use async Callable controllers| |false| |reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| |responseWrapper|wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type)| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 0ef33cf0480..882fccb4a21 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -175,7 +175,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code dateLibrary.setEnum(dateOptions); cliOptions.add(dateLibrary); - CliOption java8Mode = new CliOption(JAVA8_MODE, "Option. Use Java8 classes instead of third party equivalents").defaultValue(String.valueOf(this.java8Mode)); + CliOption java8Mode = CliOption.newBoolean(JAVA8_MODE, "Option. Use Java8 classes instead of third party equivalents", this.java8Mode); Map java8ModeOptions = new HashMap<>(); java8ModeOptions.put("true", "Use Java 8 classes such as Base64"); java8ModeOptions.put("false", "Various third party libraries as needed"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index fdaa2bce4e5..4e2c694fd8b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -21,7 +21,6 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; -import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; @@ -117,7 +116,7 @@ public class SpringCodegen extends AbstractJavaCodegen cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.", interfaceOnly)); cliOptions.add(CliOption.newBoolean(DELEGATE_PATTERN, "Whether to generate the server files using the delegate pattern", delegatePattern)); cliOptions.add(CliOption.newBoolean(SINGLE_CONTENT_TYPES, "Whether to select only one produces/consumes content-type by operation.", singleContentTypes)); - cliOptions.add(CliOption.newBoolean(JAVA_8, "use java8 default interface", java8)); + updateJava8CliOptions(); cliOptions.add(CliOption.newBoolean(ASYNC, "use async Callable controllers", async)); cliOptions.add(CliOption.newBoolean(REACTIVE, "wrap responses in Mono/Flux Reactor types (spring-boot only)", reactive)); cliOptions.add(new CliOption(RESPONSE_WRAPPER, "wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type)")); @@ -142,6 +141,13 @@ public class SpringCodegen extends AbstractJavaCodegen } + private void updateJava8CliOptions() { + CliOption option = cliOptions.stream().filter(o -> JAVA_8.equals(o.getOpt())).findFirst() + .orElseThrow(() -> new RuntimeException("Missing java8 option")); + Map java8ModeOptions = option.getEnum(); + java8ModeOptions.put("true", "Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used"); + } + @Override public CodegenType getTag() { return CodegenType.SERVER; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 9a95e857d8a..f9dec31da46 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; +import org.openapitools.codegen.CliOption; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.ClientOpts; import org.openapitools.codegen.CodegenConstants; @@ -35,11 +36,12 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; +import static java.util.stream.Collectors.groupingBy; +import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; -import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; - public class SpringCodegenTest { @Test @@ -168,4 +170,13 @@ public class SpringCodegenTest { for (String line : lines) assertFalse(file.contains(line)); } + + @Test + public void clientOptsUnicity() { + SpringCodegen codegen = new SpringCodegen(); + codegen.cliOptions() + .stream() + .collect(groupingBy(CliOption::getOpt)) + .forEach((k,v) -> assertEquals(v.size(), 1, k + " is described multiple times")); + } } From f6c738ed9e92a8b10488bc67216f0c57f6b9d4a3 Mon Sep 17 00:00:00 2001 From: Martyn Garcia Date: Fri, 21 Jun 2019 10:33:16 -0600 Subject: [PATCH 53/73] Add #send to ruby reserved word list (#3146) --- .../org/openapitools/codegen/languages/RubyClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index a1f12a54f04..e7af53297f3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -91,7 +91,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { // local variable names used in API methods (endpoints) for (String word : Arrays.asList( "local_var_path", "query_params", "header_params", "_header_accept", "_header_accept_result", - "_header_content_type", "form_params", "post_body", "auth_names")) { + "_header_content_type", "form_params", "post_body", "auth_names", "send")) { reservedWords.add(word.toLowerCase(Locale.ROOT)); } From a038fcc9c89cd1f91e2bf577a9918cfaa949f00a Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 24 Jun 2019 09:03:57 +0530 Subject: [PATCH 54/73] [java][jesery2]: "InjectionManagerFactory not found" issue (#3153) * feat(java-jersey2): Fixing InjectionManagerFactory issue * feat(java-jersey2): Update pet project --- .../src/main/resources/Java/libraries/jersey2/pom.mustache | 7 +++++++ samples/client/petstore/java/jersey2-java8/pom.xml | 5 +++++ samples/client/petstore/java/jersey2/pom.xml | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 0d60744b9e0..d8b553a434a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -235,6 +235,13 @@ jersey-client ${jersey-version} + {{^supportJava6}} + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + + {{/supportJava6}} org.glassfish.jersey.media jersey-media-multipart diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index 4b7a25668c2..204ead7705d 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -216,6 +216,11 @@ jersey-client ${jersey-version} + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + org.glassfish.jersey.media jersey-media-multipart diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index aa2e548a6c0..60ace064510 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -216,6 +216,11 @@ jersey-client ${jersey-version} + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey-version} + org.glassfish.jersey.media jersey-media-multipart From 2773b32c367cf1b611b0e4a8e0beabadb4e69807 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 24 Jun 2019 09:05:52 +0530 Subject: [PATCH 55/73] [csharp] Adding http response details on api_docs and making example snippet compilable (#3129) * feat(csharp): Adding http response details * feat(csharp): Updating pet project * feat(csharp): Updating pet project * feat(csharp): Updating pet project * feat(csharp): Updating pet project * feat(csharp): Updating pet project --- .../src/main/resources/csharp/README.mustache | 1 + .../main/resources/csharp/api_doc.mustache | 16 +++- .../petstore/csharp/OpenAPIClient/README.md | 1 + .../OpenAPIClient/docs/AnotherFakeApi.md | 6 ++ .../csharp/OpenAPIClient/docs/FakeApi.md | 80 +++++++++++++++++++ .../docs/FakeClassnameTags123Api.md | 6 ++ .../csharp/OpenAPIClient/docs/PetApi.md | 75 +++++++++++++++-- .../csharp/OpenAPIClient/docs/StoreApi.md | 32 +++++++- .../csharp/OpenAPIClient/docs/UserApi.md | 53 ++++++++++++ 9 files changed, 259 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/README.mustache b/modules/openapi-generator/src/main/resources/csharp/README.mustache index be09f9d138a..fbf5001b1d2 100644 --- a/modules/openapi-generator/src/main/resources/csharp/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/README.mustache @@ -102,6 +102,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p ## Getting Started ```csharp +using System.Collections.Generic; using System.Diagnostics; using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache index 7971a78fb1c..df59f42415c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache @@ -14,7 +14,7 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{{summary}}}{{#notes}} @@ -23,6 +23,7 @@ Method | HTTP request | Description ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using {{packageName}}.{{apiPackage}}; using {{packageName}}.Client; @@ -70,7 +71,7 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } catch (ApiException e) @@ -94,7 +95,7 @@ Name | Type | Description | Notes ### Return type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} ### Authorization @@ -105,6 +106,15 @@ Name | Type | Description | Notes - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index 7a849134a1d..dcdb39631c5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -64,6 +64,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p ## Getting Started ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md index 14ac2c12f24..5af41a1862c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md @@ -19,6 +19,7 @@ To test special tags and operation ID starting with number ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -71,6 +72,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 2f97f3017da..8a53b02b5e1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -31,6 +31,7 @@ this route creates an XmlItem ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -82,6 +83,11 @@ No authorization required - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -99,6 +105,7 @@ Test serialization of outer boolean types ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -150,6 +157,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -167,6 +179,7 @@ Test serialization of object with outer number type ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -218,6 +231,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -235,6 +253,7 @@ Test serialization of outer number types ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -286,6 +305,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -303,6 +327,7 @@ Test serialization of outer string types ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -354,6 +379,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: */* +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -371,6 +401,7 @@ For this test, the body for this request much reference a schema named `File`. ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -421,6 +452,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -436,6 +472,7 @@ No authorization required ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -488,6 +525,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -505,6 +547,7 @@ To test \"client\" model ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -557,6 +600,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -574,6 +622,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -655,6 +704,12 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -672,6 +727,7 @@ To test enum parameters ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -737,6 +793,12 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -754,6 +816,7 @@ Fake endpoint to test group parameters (optional) ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -815,6 +878,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -830,6 +898,7 @@ test inline additionalProperties ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -881,6 +950,11 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -896,6 +970,7 @@ test json serialization of form data ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -949,6 +1024,11 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md index acc5f0799f2..deb97a27697 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md @@ -19,6 +19,7 @@ To test class name in snake case ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -76,6 +77,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 3b09a069422..c45dd7854a7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -25,6 +25,7 @@ Add a new pet to the store ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -79,6 +80,12 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -94,6 +101,7 @@ Deletes a pet ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -150,6 +158,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid pet value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -158,7 +172,7 @@ void (empty response body) ## FindPetsByStatus -> List FindPetsByStatus (List status) +> List<Pet> FindPetsByStatus (List status) Finds Pets by status @@ -167,6 +181,7 @@ Multiple status values can be provided with comma separated strings ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -188,7 +203,7 @@ namespace Example try { // Finds Pets by status - List<Pet> result = apiInstance.FindPetsByStatus(status); + List result = apiInstance.FindPetsByStatus(status); Debug.WriteLine(result); } catch (ApiException e) @@ -211,7 +226,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -222,6 +237,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -230,7 +251,7 @@ Name | Type | Description | Notes ## FindPetsByTags -> List FindPetsByTags (List tags) +> List<Pet> FindPetsByTags (List tags) Finds Pets by tags @@ -239,6 +260,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -260,7 +282,7 @@ namespace Example try { // Finds Pets by tags - List<Pet> result = apiInstance.FindPetsByTags(tags); + List result = apiInstance.FindPetsByTags(tags); Debug.WriteLine(result); } catch (ApiException e) @@ -283,7 +305,7 @@ Name | Type | Description | Notes ### Return type -[**List**](Pet.md) +[**List<Pet>**](Pet.md) ### Authorization @@ -294,6 +316,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -311,6 +339,7 @@ Returns a single pet ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -368,6 +397,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -383,6 +419,7 @@ Update an existing pet ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -437,6 +474,14 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -452,6 +497,7 @@ Updates a pet in the store with form data ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -510,6 +556,11 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -525,6 +576,7 @@ uploads an image ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -584,6 +636,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -599,6 +656,7 @@ uploads an image (required) ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -658,6 +716,11 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md index 379c4ef3943..b4dc72258a0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md @@ -22,6 +22,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -73,6 +74,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -81,7 +88,7 @@ No authorization required ## GetInventory -> Dictionary GetInventory () +> Dictionary<string, int?> GetInventory () Returns pet inventories by status @@ -90,6 +97,7 @@ Returns a map of status codes to quantities ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -112,7 +120,7 @@ namespace Example try { // Returns pet inventories by status - Dictionary<string, int?> result = apiInstance.GetInventory(); + Dictionary result = apiInstance.GetInventory(); Debug.WriteLine(result); } catch (ApiException e) @@ -143,6 +151,11 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -160,6 +173,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -212,6 +226,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -227,6 +248,7 @@ Place an order for a pet ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -279,6 +301,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md index 729be604bdb..1385d840413 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md @@ -26,6 +26,7 @@ This can only be done by the logged in user. ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -77,6 +78,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -92,6 +98,7 @@ Creates list of users with given input array ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -143,6 +150,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -158,6 +170,7 @@ Creates list of users with given input array ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -209,6 +222,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -226,6 +244,7 @@ This can only be done by the logged in user. ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -277,6 +296,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -292,6 +317,7 @@ Get user by user name ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -344,6 +370,13 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -359,6 +392,7 @@ Logs user into the system ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -413,6 +447,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -428,6 +468,7 @@ Logs out current logged in user session ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -475,6 +516,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -492,6 +538,7 @@ This can only be done by the logged in user. ### Example ```csharp +using System.Collections.Generic; using System.Diagnostics; using Org.OpenAPITools.Api; using Org.OpenAPITools.Client; @@ -545,6 +592,12 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) From 038afd66506aa4d4b42a5f19e7843aaa3d1cc5f6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 24 Jun 2019 14:00:18 +0800 Subject: [PATCH 56/73] Add a link to the speaker deck at Kubernetes Contributor Summit (#3205) Add a link to the speaker deck at Kubernetes Contributor Summit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1e35c4862a..c821f77813d 100644 --- a/README.md +++ b/README.md @@ -591,7 +591,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-05-01 - [Design and generate a REST API from Swagger / OpenAPI in Java, Python, C# and more](https://simply-how.com/design-and-generate-api-code-from-openapi) by [Simply How](https://simply-how.com/) - 2019-05-17 - [Generate Spring Boot REST API using Swagger/OpenAPI](https://www.47northlabs.com/knowledge-base/generate-spring-boot-rest-api-using-swagger-openapi/) by [Antonie Zafirov](https://www.47northlabs.com/author/antonie-zafirov/) - 2019-05-22 - [REST APIs代码生成指南(OpenAPI Generator)](https://gum.co/openapi_generator_ebook_gb) by [William Cheng](https://twitter.com/wing328), [Xin Meng](https://github.com/xmeng1) -- 2019-05/24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328) +- 2019-05-24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328) +- 2019-06-24 - [Kubernetes Clients and OpenAPI Generator](https://speakerdeck.com/wing328/kubernetes-clients-and-openapi-generator) by [William Cheng] at [Kubernetes Contributor Summits Shanghai 2019] ## [6 - About Us](#table-of-contents) From 1d8c9dcc0b2ffac9ad299cfbfd1461c39f8501ca Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Mon, 24 Jun 2019 08:23:22 +0200 Subject: [PATCH 57/73] Ktor Fix KtorExperimentalAPI import (#3108) * Ktor Fix KtorExperimentalAPI import Fix #2967 * Samples --- .../resources/kotlin-server/libraries/ktor/AppMain.kt.mustache | 2 +- .../ktor/src/main/kotlin/org/openapitools/server/AppMain.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache index 9c1b3084712..03ef4296bfe 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache @@ -21,10 +21,10 @@ import io.ktor.locations.Locations import io.ktor.metrics.Metrics import io.ktor.routing.Routing import java.util.concurrent.TimeUnit +import io.ktor.util.KtorExperimentalAPI {{#hasAuthMethods}} import io.ktor.auth.Authentication import io.ktor.auth.oauth -import io.ktor.util.KtorExperimentalAPI import org.openapitools.server.infrastructure.ApiKeyCredential import org.openapitools.server.infrastructure.ApiPrincipal import org.openapitools.server.infrastructure.apiKeyAuth diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt index 1ebd2ba22c3..2b0cd5cdb5f 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt @@ -21,9 +21,9 @@ import io.ktor.locations.Locations import io.ktor.metrics.Metrics import io.ktor.routing.Routing import java.util.concurrent.TimeUnit +import io.ktor.util.KtorExperimentalAPI import io.ktor.auth.Authentication import io.ktor.auth.oauth -import io.ktor.util.KtorExperimentalAPI import org.openapitools.server.infrastructure.ApiKeyCredential import org.openapitools.server.infrastructure.ApiPrincipal import org.openapitools.server.infrastructure.apiKeyAuth From a882e4b3a55d525dbc08f941c3e5b5b7d84519ad Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Mon, 24 Jun 2019 08:26:31 +0200 Subject: [PATCH 58/73] Add Flow import to kotlin spring reactive (#3107) * Add Flow import to kotlin spring reactive * Add runBlockingTest to api tests * Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date * add reactive check for runBlockingTest * Samples --- bin/utils/ensure-up-to-date | 1 + .../resources/kotlin-spring/api_test.mustache | 6 +- .../spring-boot/buildGradleKts.mustache | 3 + .../.openapi-generator/VERSION | 2 +- .../build.gradle.kts | 2 + .../kotlin-springboot-reactive/pom.xml | 6 + .../kotlin/org/openapitools/api/PetApi.kt | 36 ++--- .../org/openapitools/api/PetApiService.kt | 12 +- .../org/openapitools/api/PetApiServiceImpl.kt | 12 +- .../kotlin/org/openapitools/api/StoreApi.kt | 18 +-- .../org/openapitools/api/StoreApiService.kt | 6 +- .../openapitools/api/StoreApiServiceImpl.kt | 6 +- .../kotlin/org/openapitools/api/UserApi.kt | 32 ++-- .../org/openapitools/api/UserApiService.kt | 8 +- .../openapitools/api/UserApiServiceImpl.kt | 8 +- .../kotlin/org/openapitools/model/Category.kt | 4 +- .../openapitools/model/ModelApiResponse.kt | 6 +- .../kotlin/org/openapitools/model/Order.kt | 10 +- .../main/kotlin/org/openapitools/model/Pet.kt | 10 +- .../main/kotlin/org/openapitools/model/Tag.kt | 4 +- .../kotlin/org/openapitools/model/User.kt | 16 +- .../kotlin/org/openapitools/api/PetApiTest.kt | 150 ++++++++++++++++++ .../org/openapitools/api/StoreApiTest.kt | 79 +++++++++ .../org/openapitools/api/UserApiTest.kt | 145 +++++++++++++++++ 24 files changed, 486 insertions(+), 96 deletions(-) create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/PetApiTest.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt create mode 100644 samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/UserApiTest.kt diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 8cf31ae0c51..52256708c55 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -25,6 +25,7 @@ declare -a scripts=( "./bin/kotlin-client-threetenbp.sh" "./bin/kotlin-server-petstore.sh" "./bin/kotlin-springboot-petstore-server.sh" +"./bin/kotlin-springboot-petstore-server-reactive.sh" "./bin/mysql-schema-petstore.sh" "./bin/python-petstore-all.sh" "./bin/openapi3/python-petstore.sh" diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api_test.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api_test.mustache index f94e84c24de..fc21b3353cc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api_test.mustache @@ -4,6 +4,10 @@ package {{package}} {{/imports}} import org.junit.jupiter.api.Test +{{#reactive}} +import kotlinx.coroutines.flow.Flow; +import kotlinx.coroutines.test.runBlockingTest +{{/reactive}} import org.springframework.http.ResponseEntity class {{classname}}Test { @@ -21,7 +25,7 @@ class {{classname}}Test { * if the Api call fails */ @Test - fun {{operationId}}Test() { + fun {{operationId}}Test() {{#reactive}}= runBlockingTest {{/reactive}}{ {{#allParams}} val {{paramName}}:{{{dataType}}}? = null {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache index 7c5a1991b49..dac8996120d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/buildGradleKts.mustache @@ -54,6 +54,9 @@ dependencies { testCompile("org.springframework.boot:spring-boot-starter-test") { exclude(module = "junit") } +{{#reactive}} + testCompile("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion") +{{/reactive}} } repositories { diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 06b5019af3f..d96260ba335 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts index f62d3f33c8d..f4561be14be 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts +++ b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts @@ -43,9 +43,11 @@ dependencies { compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") compile("com.fasterxml.jackson.module:jackson-module-kotlin") + testCompile("org.jetbrains.kotlin:kotlin-test-junit5") testCompile("org.springframework.boot:spring-boot-starter-test") { exclude(module = "junit") } + testCompile("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion") } repositories { diff --git a/samples/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/server/petstore/kotlin-springboot-reactive/pom.xml index 1932017d4bf..c8683e54bc2 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/pom.xml +++ b/samples/server/petstore/kotlin-springboot-reactive/pom.xml @@ -117,6 +117,12 @@ javax.validation validation-api
+ + org.jetbrains.kotlin + kotlin-test-junit5 + 1.3.31 + test + diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt index 380c94d5acb..c8273a4ac4a 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -57,7 +57,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.POST]) suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { - return ResponseEntity(service.addPet(body), HttpStatus.OK) + return ResponseEntity(service.addPet(body), HttpStatus.valueOf(405)) } @ApiOperation( @@ -70,10 +70,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { @RequestMapping( value = ["/pet/{petId}"], method = [RequestMethod.DELETE]) - suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? + suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400)) } @ApiOperation( @@ -89,9 +89,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByStatus"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List + fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { - return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) } @ApiOperation( @@ -107,9 +107,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/findByTags"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { - return ResponseEntity(service.findPetsByTags(tags), HttpStatus.OK) + return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) } @ApiOperation( @@ -124,9 +124,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long + suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) } @ApiOperation( @@ -142,7 +142,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { method = [RequestMethod.PUT]) suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { - return ResponseEntity(service.updatePet(body), HttpStatus.OK) + return ResponseEntity(service.updatePet(body), HttpStatus.valueOf(400)) } @ApiOperation( @@ -156,11 +156,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"], method = [RequestMethod.POST]) - suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? -,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? + suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @ApiOperation( @@ -176,10 +176,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"], method = [RequestMethod.POST]) - suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? + suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { - return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt index 613d30d3b1f..572dfddca6a 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -7,17 +7,17 @@ interface PetApiService { suspend fun addPet(body: Pet): Unit - suspend fun deletePet(petId: Long, apiKey: String?): Unit + suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit - fun findPetsByStatus(status: List): Flow + fun findPetsByStatus(status: kotlin.collections.List): Flow - fun findPetsByTags(tags: List): Flow + fun findPetsByTags(tags: kotlin.collections.List): Flow - suspend fun getPetById(petId: Long): Pet + suspend fun getPetById(petId: kotlin.Long): Pet suspend fun updatePet(body: Pet): Unit - suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit - suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse + suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 56dee71b00c..1013dd81f92 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -11,19 +11,19 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override suspend fun deletePet(petId: Long, apiKey: String?): Unit { + override suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit { TODO("Implement me") } - override fun findPetsByStatus(status: List): Flow { + override fun findPetsByStatus(status: kotlin.collections.List): Flow { TODO("Implement me") } - override fun findPetsByTags(tags: List): Flow { + override fun findPetsByTags(tags: kotlin.collections.List): Flow { TODO("Implement me") } - override suspend fun getPetById(petId: Long): Pet { + override suspend fun getPetById(petId: kotlin.Long): Pet { TODO("Implement me") } @@ -31,11 +31,11 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + override suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit { TODO("Implement me") } - override suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + override suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse { TODO("Implement me") } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt index 50840e05720..c02953e92ad 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -52,26 +52,26 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @RequestMapping( value = ["/store/order/{orderId}"], method = [RequestMethod.DELETE]) - suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String + suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) } @ApiOperation( value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", - response = Int::class, + response = kotlin.Int::class, responseContainer = "Map", authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) @RequestMapping( value = ["/store/inventory"], produces = ["application/json"], method = [RequestMethod.GET]) - suspend fun getInventory(): ResponseEntity> { - return ResponseEntity(service.getInventory(), HttpStatus.OK) + suspend fun getInventory(): ResponseEntity> { + return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @ApiOperation( @@ -85,9 +85,9 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic value = ["/store/order/{orderId}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long + suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) } @ApiOperation( @@ -103,6 +103,6 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic method = [RequestMethod.POST]) suspend fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody body: Order ): ResponseEntity { - return ResponseEntity(service.placeOrder(body), HttpStatus.OK) + return ResponseEntity(service.placeOrder(body), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 8c9ab08812f..fbc5b1729e4 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -4,11 +4,11 @@ import org.openapitools.model.Order import kotlinx.coroutines.flow.Flow; interface StoreApiService { - suspend fun deleteOrder(orderId: String): Unit + suspend fun deleteOrder(orderId: kotlin.String): Unit - suspend fun getInventory(): Map + suspend fun getInventory(): Map - suspend fun getOrderById(orderId: Long): Order + suspend fun getOrderById(orderId: kotlin.Long): Order suspend fun placeOrder(body: Order): Order } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt index 58657034b10..4220a2900c4 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -6,15 +6,15 @@ import org.springframework.stereotype.Service @Service class StoreApiServiceImpl : StoreApiService { - override suspend fun deleteOrder(orderId: String): Unit { + override suspend fun deleteOrder(orderId: kotlin.String): Unit { TODO("Implement me") } - override suspend fun getInventory(): Map { + override suspend fun getInventory(): Map { TODO("Implement me") } - override suspend fun getOrderById(orderId: Long): Order { + override suspend fun getOrderById(orderId: kotlin.Long): Order { TODO("Implement me") } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt index 841b48df912..1cb3dc04a5e 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -54,7 +54,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) suspend fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { - return ResponseEntity(service.createUser(body), HttpStatus.OK) + return ResponseEntity(service.createUser(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -68,7 +68,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) suspend fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: Flow ): ResponseEntity { - return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.OK) + return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -82,7 +82,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) method = [RequestMethod.POST]) suspend fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: Flow ): ResponseEntity { - return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.OK) + return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.valueOf(200)) } @ApiOperation( @@ -94,9 +94,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.DELETE]) - suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String + suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) } @ApiOperation( @@ -110,26 +110,26 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/{username}"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String + suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) } @ApiOperation( value = "Logs user into the system", nickname = "loginUser", notes = "", - response = String::class) + response = kotlin.String::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) @RequestMapping( value = ["/user/login"], produces = ["application/xml", "application/json"], method = [RequestMethod.GET]) - suspend fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String -): ResponseEntity { - return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + suspend fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String +): ResponseEntity { + return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200)) } @ApiOperation( @@ -142,7 +142,7 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) value = ["/user/logout"], method = [RequestMethod.GET]) suspend fun logoutUser(): ResponseEntity { - return ResponseEntity(service.logoutUser(), HttpStatus.OK) + return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @ApiOperation( @@ -154,9 +154,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) @RequestMapping( value = ["/user/{username}"], method = [RequestMethod.PUT]) - suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String + suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { - return ResponseEntity(service.updateUser(username, body), HttpStatus.OK) + return ResponseEntity(service.updateUser(username, body), HttpStatus.valueOf(400)) } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt index 219580e9f06..ceb24849483 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -10,13 +10,13 @@ interface UserApiService { suspend fun createUsersWithListInput(body: Flow): Unit - suspend fun deleteUser(username: String): Unit + suspend fun deleteUser(username: kotlin.String): Unit - suspend fun getUserByName(username: String): User + suspend fun getUserByName(username: kotlin.String): User - suspend fun loginUser(username: String, password: String): String + suspend fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String suspend fun logoutUser(): Unit - suspend fun updateUser(username: String, body: User): Unit + suspend fun updateUser(username: kotlin.String, body: User): Unit } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt index d26e1a675ee..3316a4c4138 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -18,15 +18,15 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override suspend fun deleteUser(username: String): Unit { + override suspend fun deleteUser(username: kotlin.String): Unit { TODO("Implement me") } - override suspend fun getUserByName(username: String): User { + override suspend fun getUserByName(username: kotlin.String): User { TODO("Implement me") } - override suspend fun loginUser(username: String, password: String): String { + override suspend fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String { TODO("Implement me") } @@ -34,7 +34,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override suspend fun updateUser(username: String, body: User): Unit { + override suspend fun updateUser(username: kotlin.String, body: User): Unit { TODO("Implement me") } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index 1a1dbf7223c..f477eb4e7a8 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Category ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 2f844a9c356..0e86b28e937 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -20,13 +20,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: Int? = null, + @JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: String? = null, + @JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: String? = null + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index e20d850491f..08726893f7d 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty data class Order ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: Long? = null, + @JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: Int? = null, + @JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @@ -39,14 +39,14 @@ data class Order ( @JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: Boolean? = null + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** * Order Status * Values: placed,approved,delivered */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("placed") placed("placed"), diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 9e054ac22f7..4a2e9d26cb9 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -27,20 +27,20 @@ data class Pet ( @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: String, + @JsonProperty("name") val name: kotlin.String, @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: List, + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("category") val category: Category? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: List? = null, + @JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") val status: Pet.Status? = null @@ -50,7 +50,7 @@ data class Pet ( * pet status in the store * Values: available,pending,sold */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("available") available("available"), diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index 40ef1b9a86b..df04dcd035d 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 95fe12aa467..619b2e7c2c3 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -25,28 +25,28 @@ import io.swagger.annotations.ApiModelProperty data class User ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: String? = null, + @JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: String? = null, + @JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: String? = null, + @JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: String? = null, + @JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: String? = null, + @JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: String? = null, + @JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: Int? = null + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/PetApiTest.kt b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/PetApiTest.kt new file mode 100644 index 00000000000..f43c6ecf7ca --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/PetApiTest.kt @@ -0,0 +1,150 @@ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import org.junit.jupiter.api.Test + +import kotlinx.coroutines.flow.Flow; +import kotlinx.coroutines.test.runBlockingTest +import org.springframework.http.ResponseEntity + +class PetApiTest { + + private val service: PetApiService = PetApiServiceImpl() + private val api: PetApiController = PetApiController(service) + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun addPetTest() = runBlockingTest { + val body:Pet? = null + val response: ResponseEntity = api.addPet(body!!) + + // TODO: test validations + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun deletePetTest() = runBlockingTest { + val petId:kotlin.Long? = null + val apiKey:kotlin.String? = null + val response: ResponseEntity = api.deletePet(petId!!, apiKey!!) + + // TODO: test validations + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun findPetsByStatusTest() = runBlockingTest { + val status:kotlin.collections.List? = null + val response: ResponseEntity> = api.findPetsByStatus(status!!) + + // TODO: test validations + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun findPetsByTagsTest() = runBlockingTest { + val tags:kotlin.collections.List? = null + val response: ResponseEntity> = api.findPetsByTags(tags!!) + + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun getPetByIdTest() = runBlockingTest { + val petId:kotlin.Long? = null + val response: ResponseEntity = api.getPetById(petId!!) + + // TODO: test validations + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun updatePetTest() = runBlockingTest { + val body:Pet? = null + val response: ResponseEntity = api.updatePet(body!!) + + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun updatePetWithFormTest() = runBlockingTest { + val petId:kotlin.Long? = null + val name:kotlin.String? = null + val status:kotlin.String? = null + val response: ResponseEntity = api.updatePetWithForm(petId!!, name!!, status!!) + + // TODO: test validations + } + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun uploadFileTest() = runBlockingTest { + val petId:kotlin.Long? = null + val additionalMetadata:kotlin.String? = null + val file:org.springframework.core.io.Resource? = null + val response: ResponseEntity = api.uploadFile(petId!!, additionalMetadata!!, file!!) + + // TODO: test validations + } + +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt new file mode 100644 index 00000000000..31c0a2e0713 --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt @@ -0,0 +1,79 @@ +package org.openapitools.api + +import org.openapitools.model.Order +import org.junit.jupiter.api.Test + +import kotlinx.coroutines.flow.Flow; +import kotlinx.coroutines.test.runBlockingTest +import org.springframework.http.ResponseEntity + +class StoreApiTest { + + private val service: StoreApiService = StoreApiServiceImpl() + private val api: StoreApiController = StoreApiController(service) + + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun deleteOrderTest() = runBlockingTest { + val orderId:kotlin.String? = null + val response: ResponseEntity = api.deleteOrder(orderId!!) + + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun getInventoryTest() = runBlockingTest { + val response: ResponseEntity> = api.getInventory() + + // TODO: test validations + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun getOrderByIdTest() = runBlockingTest { + val orderId:kotlin.Long? = null + val response: ResponseEntity = api.getOrderById(orderId!!) + + // TODO: test validations + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun placeOrderTest() = runBlockingTest { + val body:Order? = null + val response: ResponseEntity = api.placeOrder(body!!) + + // TODO: test validations + } + +} diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/UserApiTest.kt b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/UserApiTest.kt new file mode 100644 index 00000000000..3d467deb14f --- /dev/null +++ b/samples/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/UserApiTest.kt @@ -0,0 +1,145 @@ +package org.openapitools.api + +import org.openapitools.model.User +import org.junit.jupiter.api.Test + +import kotlinx.coroutines.flow.Flow; +import kotlinx.coroutines.test.runBlockingTest +import org.springframework.http.ResponseEntity + +class UserApiTest { + + private val service: UserApiService = UserApiServiceImpl() + private val api: UserApiController = UserApiController(service) + + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun createUserTest() = runBlockingTest { + val body:User? = null + val response: ResponseEntity = api.createUser(body!!) + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun createUsersWithArrayInputTest() = runBlockingTest { + val body:kotlin.collections.List? = null + val response: ResponseEntity = api.createUsersWithArrayInput(body!!) + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun createUsersWithListInputTest() = runBlockingTest { + val body:kotlin.collections.List? = null + val response: ResponseEntity = api.createUsersWithListInput(body!!) + + // TODO: test validations + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun deleteUserTest() = runBlockingTest { + val username:kotlin.String? = null + val response: ResponseEntity = api.deleteUser(username!!) + + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun getUserByNameTest() = runBlockingTest { + val username:kotlin.String? = null + val response: ResponseEntity = api.getUserByName(username!!) + + // TODO: test validations + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun loginUserTest() = runBlockingTest { + val username:kotlin.String? = null + val password:kotlin.String? = null + val response: ResponseEntity = api.loginUser(username!!, password!!) + + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun logoutUserTest() = runBlockingTest { + val response: ResponseEntity = api.logoutUser() + + // TODO: test validations + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + fun updateUserTest() = runBlockingTest { + val username:kotlin.String? = null + val body:User? = null + val response: ResponseEntity = api.updateUser(username!!, body!!) + + // TODO: test validations + } + +} From 38008e669ead6180071783d9740b48c5b7dc6a79 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 24 Jun 2019 14:42:01 +0800 Subject: [PATCH 59/73] Minor fix to presentation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c821f77813d..5c4cfac55d6 100644 --- a/README.md +++ b/README.md @@ -592,7 +592,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-05-17 - [Generate Spring Boot REST API using Swagger/OpenAPI](https://www.47northlabs.com/knowledge-base/generate-spring-boot-rest-api-using-swagger-openapi/) by [Antonie Zafirov](https://www.47northlabs.com/author/antonie-zafirov/) - 2019-05-22 - [REST APIs代码生成指南(OpenAPI Generator)](https://gum.co/openapi_generator_ebook_gb) by [William Cheng](https://twitter.com/wing328), [Xin Meng](https://github.com/xmeng1) - 2019-05-24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328) -- 2019-06-24 - [Kubernetes Clients and OpenAPI Generator](https://speakerdeck.com/wing328/kubernetes-clients-and-openapi-generator) by [William Cheng] at [Kubernetes Contributor Summits Shanghai 2019] +- 2019-06-24 - [Kubernetes Clients and OpenAPI Generator](https://speakerdeck.com/wing328/kubernetes-clients-and-openapi-generator) by [William Cheng](https://twitter.com/wing328) at [Kubernetes Contributor Summits Shanghai 2019](https://www.lfasiallc.com/events/contributors-summit-china-2019/) ## [6 - About Us](#table-of-contents) From 55ae485fd008dc2fa0c33cbc624df047749218e8 Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 24 Jun 2019 21:01:36 +0800 Subject: [PATCH 60/73] update kotlin samples --- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index d96260ba335..479c313e87b 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file From 06cfdbbdc6ba6b62cac3bdf95cd620232eccbecd Mon Sep 17 00:00:00 2001 From: Mathieu Debove Date: Mon, 24 Jun 2019 15:42:49 +0200 Subject: [PATCH 61/73] Add missing javax dependencies for Java > 8 (#3188) * Add missing javax dependencies for Java > 8 * update spring petstore samples --- .../JavaSpring/libraries/spring-boot/pom.mustache | 5 +++++ .../JavaSpring/libraries/spring-mvc/pom.mustache | 10 ++++++++++ samples/client/petstore/spring-stubs/pom.xml | 5 +++++ samples/server/petstore/spring-mvc-j8-async/pom.xml | 10 ++++++++++ .../petstore/spring-mvc-j8-localdatetime/pom.xml | 10 ++++++++++ samples/server/petstore/spring-mvc/pom.xml | 10 ++++++++++ .../server/petstore/springboot-beanvalidation/pom.xml | 5 +++++ samples/server/petstore/springboot-delegate-j8/pom.xml | 5 +++++ samples/server/petstore/springboot-delegate/pom.xml | 5 +++++ .../server/petstore/springboot-implicitHeaders/pom.xml | 5 +++++ samples/server/petstore/springboot-useoptional/pom.xml | 5 +++++ samples/server/petstore/springboot-virtualan/pom.xml | 5 +++++ samples/server/petstore/springboot/pom.xml | 5 +++++ 13 files changed, 85 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 637a710a51d..5c396de030c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -94,6 +94,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + {{/useSpringfox}} {{^useSpringfox}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index aafc216dba0..dc9c843bc2b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -137,6 +137,16 @@ spring-web ${spring-version} + + javax.annotation + javax.annotation-api + 1.3.2 + + + javax.xml.bind + jaxb-api + 2.2.11 + {{#useSpringfox}} diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml index a86dc3be43f..18b3dc2308d 100644 --- a/samples/client/petstore/spring-stubs/pom.xml +++ b/samples/client/petstore/spring-stubs/pom.xml @@ -35,6 +35,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml index 7c74b1f294a..6b564dea71c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml @@ -95,6 +95,16 @@ spring-web ${spring-version} + + javax.annotation + javax.annotation-api + 1.3.2 + + + javax.xml.bind + jaxb-api + 2.2.11 + io.springfox diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml index 92fd248964d..9b3b1f7bdcf 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml @@ -95,6 +95,16 @@ spring-web ${spring-version} + + javax.annotation + javax.annotation-api + 1.3.2 + + + javax.xml.bind + jaxb-api + 2.2.11 + io.springfox diff --git a/samples/server/petstore/spring-mvc/pom.xml b/samples/server/petstore/spring-mvc/pom.xml index adcf1f57683..d5e6f655d79 100644 --- a/samples/server/petstore/spring-mvc/pom.xml +++ b/samples/server/petstore/spring-mvc/pom.xml @@ -95,6 +95,16 @@ spring-web ${spring-version} + + javax.annotation + javax.annotation-api + 1.3.2 + + + javax.xml.bind + jaxb-api + 2.2.11 + io.springfox diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml index 053b3d33f09..6536e609c6c 100644 --- a/samples/server/petstore/springboot-beanvalidation/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.github.joschi.jackson jackson-datatype-threetenbp diff --git a/samples/server/petstore/springboot-delegate-j8/pom.xml b/samples/server/petstore/springboot-delegate-j8/pom.xml index 4c26499044e..b3b8c885f0d 100644 --- a/samples/server/petstore/springboot-delegate-j8/pom.xml +++ b/samples/server/petstore/springboot-delegate-j8/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 diff --git a/samples/server/petstore/springboot-delegate/pom.xml b/samples/server/petstore/springboot-delegate/pom.xml index cefb505c3c6..83b61b77934 100644 --- a/samples/server/petstore/springboot-delegate/pom.xml +++ b/samples/server/petstore/springboot-delegate/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.github.joschi.jackson jackson-datatype-threetenbp diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index 987710c5de5..320db0c02a0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml index fb5ac072dcb..76bec66a453 100644 --- a/samples/server/petstore/springboot-useoptional/pom.xml +++ b/samples/server/petstore/springboot-useoptional/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 diff --git a/samples/server/petstore/springboot-virtualan/pom.xml b/samples/server/petstore/springboot-virtualan/pom.xml index 220257f505d..809f9c1f9aa 100644 --- a/samples/server/petstore/springboot-virtualan/pom.xml +++ b/samples/server/petstore/springboot-virtualan/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml index 5ff1f68b561..d4227500a1d 100644 --- a/samples/server/petstore/springboot/pom.xml +++ b/samples/server/petstore/springboot/pom.xml @@ -48,6 +48,11 @@ springfox-swagger-ui ${springfox-version} + + javax.xml.bind + jaxb-api + 2.2.11 + com.fasterxml.jackson.datatype jackson-datatype-jsr310 From 4ac33d80f09e749160db074ffb4f0c094d3d0500 Mon Sep 17 00:00:00 2001 From: Michal Foksa Date: Mon, 24 Jun 2019 16:58:38 +0200 Subject: [PATCH 62/73] [openapi-yaml] Config option outputFile was ignored by the generator. (#3199) --- .../languages/OpenAPIYamlGenerator.java | 11 +- .../org/openapitools/codegen/TestUtils.java | 15 +++ .../codegen/java/JavaClientCodegenTest.java | 119 ++++++++++-------- .../codegen/yaml/YamlGeneratorTest.java | 88 +++++++++++++ 4 files changed, 174 insertions(+), 59 deletions(-) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/yaml/YamlGeneratorTest.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java index cf0de2dcb69..e0d2a98294f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java @@ -28,7 +28,7 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi private static final Logger LOGGER = LoggerFactory.getLogger(OpenAPIYamlGenerator.class); - protected String outputFile = "openapi.yaml"; + protected String outputFile = "openapi/openapi.yaml"; public OpenAPIYamlGenerator() { super(); @@ -36,9 +36,6 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi outputFolder = "generated-code/openapi-yaml"; cliOptions.add(new CliOption(OUTPUT_NAME, "output filename")); supportingFiles.add(new SupportingFile("README.md", "", "README.md")); - supportingFiles.add(new SupportingFile("openapi.mustache", - "openapi", - "openapi.yaml")); } @Override @@ -56,13 +53,14 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi return "Creates a static openapi.yaml file (OpenAPI spec v3)."; } - @Override public void processOpts() { super.processOpts(); if (additionalProperties.containsKey(OUTPUT_NAME)) { - this.outputFile = additionalProperties.get(OUTPUT_NAME).toString(); + outputFile = additionalProperties.get(OUTPUT_NAME).toString(); } + LOGGER.info("Output file [outputFile={}]", outputFile); + supportingFiles.add(new SupportingFile("openapi.mustache", outputFile)); } @Override @@ -71,7 +69,6 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi return super.postProcessSupportingFileData(objs); } - @Override public String escapeQuotationMark(String input) { // just return the original string diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 6536497b2a1..65614c7e51a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -1,5 +1,7 @@ package org.openapitools.codegen; +import static org.testng.Assert.assertTrue; + import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; @@ -8,12 +10,15 @@ import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; + import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile; import org.testng.Assert; import java.io.File; import java.util.Collections; +import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; public class TestUtils { @@ -55,4 +60,14 @@ public class TestUtils { Assert.assertTrue(optional.isPresent()); return optional.get(); } + + public static void ensureContainsFile(Map generatedFiles, File root, String filename) { + File file = new File(root, filename); + String absoluteFilename = file.getAbsolutePath().replace("\\", "/"); + if (!generatedFiles.containsKey(absoluteFilename)) { + Assert.fail("Could not find '" + absoluteFilename + "' file in list:\n" + + generatedFiles.keySet().stream().sorted().collect(Collectors.joining(",\n"))); + } + assertTrue(generatedFiles.containsKey(absoluteFilename), "File '" + absoluteFilename + "' was not fould in the list of generated files"); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 1a3634effc4..0f5573450e8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -17,15 +17,37 @@ package org.openapitools.codegen.java; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + import com.google.common.collect.ImmutableMap; + import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.Content; +import io.swagger.v3.oas.models.media.IntegerSchema; +import io.swagger.v3.oas.models.media.MediaType; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.parser.util.SchemaTypeUtil; -import org.openapitools.codegen.*; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.ClientOpts; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenResponse; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.MockDefaultGenerator; import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.languages.JavaClientCodegen; import org.testng.Assert; @@ -33,12 +55,15 @@ import org.testng.annotations.Test; import java.io.File; import java.nio.file.Files; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - public class JavaClientCodegenTest { @Test @@ -257,42 +282,42 @@ public class JavaClientCodegenTest { Map generatedFiles = generator.getFiles(); Assert.assertEquals(generatedFiles.size(), 34); - ensureContainsFile(generatedFiles, output, ".gitignore"); - ensureContainsFile(generatedFiles, output, ".openapi-generator-ignore"); - ensureContainsFile(generatedFiles, output, ".openapi-generator/VERSION"); - ensureContainsFile(generatedFiles, output, ".travis.yml"); - ensureContainsFile(generatedFiles, output, "build.gradle"); - ensureContainsFile(generatedFiles, output, "build.sbt"); - ensureContainsFile(generatedFiles, output, "docs/DefaultApi.md"); - ensureContainsFile(generatedFiles, output, "git_push.sh"); - ensureContainsFile(generatedFiles, output, "gradle.properties"); - ensureContainsFile(generatedFiles, output, "gradle/wrapper/gradle-wrapper.jar"); - ensureContainsFile(generatedFiles, output, "gradle/wrapper/gradle-wrapper.properties"); - ensureContainsFile(generatedFiles, output, "gradlew.bat"); - ensureContainsFile(generatedFiles, output, "gradlew"); - ensureContainsFile(generatedFiles, output, "pom.xml"); - ensureContainsFile(generatedFiles, output, "README.md"); - ensureContainsFile(generatedFiles, output, "settings.gradle"); - ensureContainsFile(generatedFiles, output, "src/main/AndroidManifest.xml"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/api/DefaultApi.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiCallback.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiClient.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiException.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiResponse.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); - //ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/OAuth.java"); - //ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/OAuthFlow.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/Configuration.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/GzipRequestInterceptor.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/JSON.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/Pair.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ProgressRequestBody.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ProgressResponseBody.java"); - ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/StringUtil.java"); - ensureContainsFile(generatedFiles, output, "src/test/java/xyz/abcdef/api/DefaultApiTest.java"); + TestUtils.ensureContainsFile(generatedFiles, output, ".gitignore"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator-ignore"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator/VERSION"); + TestUtils.ensureContainsFile(generatedFiles, output, ".travis.yml"); + TestUtils.ensureContainsFile(generatedFiles, output, "build.gradle"); + TestUtils.ensureContainsFile(generatedFiles, output, "build.sbt"); + TestUtils.ensureContainsFile(generatedFiles, output, "docs/DefaultApi.md"); + TestUtils.ensureContainsFile(generatedFiles, output, "git_push.sh"); + TestUtils.ensureContainsFile(generatedFiles, output, "gradle.properties"); + TestUtils.ensureContainsFile(generatedFiles, output, "gradle/wrapper/gradle-wrapper.jar"); + TestUtils.ensureContainsFile(generatedFiles, output, "gradle/wrapper/gradle-wrapper.properties"); + TestUtils.ensureContainsFile(generatedFiles, output, "gradlew.bat"); + TestUtils.ensureContainsFile(generatedFiles, output, "gradlew"); + TestUtils.ensureContainsFile(generatedFiles, output, "pom.xml"); + TestUtils.ensureContainsFile(generatedFiles, output, "README.md"); + TestUtils.ensureContainsFile(generatedFiles, output, "settings.gradle"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/AndroidManifest.xml"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/api/DefaultApi.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiCallback.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiClient.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiException.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ApiResponse.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); + //TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/OAuth.java"); + //TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/auth/OAuthFlow.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/Configuration.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/GzipRequestInterceptor.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/JSON.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/Pair.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ProgressRequestBody.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/ProgressResponseBody.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/main/java/xyz/abcdef/StringUtil.java"); + TestUtils.ensureContainsFile(generatedFiles, output, "src/test/java/xyz/abcdef/api/DefaultApiTest.java"); String defaultApiFilename = new File(output, "src/main/java/xyz/abcdef/api/DefaultApi.java").getAbsolutePath().replace("\\", "/"); String defaultApiConent = generatedFiles.get(defaultApiFilename); @@ -384,16 +409,6 @@ public class JavaClientCodegenTest { Assert.assertEquals(cm.getClassname(), "OtherObj"); } - private void ensureContainsFile(Map generatedFiles, File root, String filename) { - File file = new File(root, filename); - String absoluteFilename = file.getAbsolutePath().replace("\\", "/"); - if (!generatedFiles.containsKey(absoluteFilename)) { - Assert.fail("Could not find '" + absoluteFilename + "' file in list:\n" + - generatedFiles.keySet().stream().sorted().collect(Collectors.joining(",\n"))); - } - assertTrue(generatedFiles.containsKey(absoluteFilename), "File '" + absoluteFilename + "' was not fould in the list of generated files"); - } - private CodegenProperty codegenPropertyWithArrayOfIntegerValues() { CodegenProperty array = new CodegenProperty(); final CodegenProperty items = new CodegenProperty(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/yaml/YamlGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/yaml/YamlGeneratorTest.java new file mode 100644 index 00000000000..05926b9a40a --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/yaml/YamlGeneratorTest.java @@ -0,0 +1,88 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.yaml; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.MockDefaultGenerator; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.languages.OpenAPIYamlGenerator; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.File; +import java.nio.file.Files; +import java.util.HashMap; +import java.util.Map; + +public class YamlGeneratorTest { + + @Test + public void testGeneratePing() throws Exception { + Map properties = new HashMap<>(); + + File output = Files.createTempDirectory("test").toFile(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("openapi-yaml") + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/ping.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + MockDefaultGenerator generator = new MockDefaultGenerator(); + generator.opts(clientOptInput).generate(); + + Map generatedFiles = generator.getFiles(); + Assert.assertEquals(generatedFiles.size(), 4); + TestUtils.ensureContainsFile(generatedFiles, output, "openapi/openapi.yaml"); + TestUtils.ensureContainsFile(generatedFiles, output, "README.md"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator-ignore"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator/VERSION"); + + output.deleteOnExit(); + } + + + @Test + public void testGeneratePingOtherOutputFile() throws Exception { + Map properties = new HashMap<>(); + properties.put(OpenAPIYamlGenerator.OUTPUT_NAME, "ping.yaml"); + + File output = Files.createTempDirectory("test").toFile(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("openapi-yaml") + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/ping.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + MockDefaultGenerator generator = new MockDefaultGenerator(); + generator.opts(clientOptInput).generate(); + + Map generatedFiles = generator.getFiles(); + Assert.assertEquals(generatedFiles.size(), 4); + TestUtils.ensureContainsFile(generatedFiles, output, "ping.yaml"); + TestUtils.ensureContainsFile(generatedFiles, output, "README.md"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator-ignore"); + TestUtils.ensureContainsFile(generatedFiles, output, ".openapi-generator/VERSION"); + + output.deleteOnExit(); + } +} From 034064be4cba2de290877640cc097d88dba3b4eb Mon Sep 17 00:00:00 2001 From: Chris Couzens Date: Mon, 24 Jun 2019 16:30:00 +0100 Subject: [PATCH 63/73] Ruby-client: Don't encode slashes if strict-spec false (#3204) URL-special characters such as /,?,% should be encoded when inside path parameters. I changed the Ruby-client to do so. https://github.com/OpenAPITools/openapi-generator/pull/3039 Unfortunately, some projects relied on slashes not being expanded within path paramters: https://github.com/OpenAPITools/openapi-generator/issues/3119 With this commit, these projects can now pass `--strict-spec false` to not have / converted to %2F. strict spec not specified: / -> %2F --strict-spec true: / -> %2F --strict-spec false: / -> / --- .../main/java/org/openapitools/codegen/DefaultGenerator.java | 1 + .../src/main/resources/ruby-client/api.mustache | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 7a76a472269..56a4a25a2b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -562,6 +562,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { operation.put("classVarName", config.toApiVarName(tag)); operation.put("importPath", config.toApiImport(tag)); operation.put("classFilename", config.toApiFilename(tag)); + operation.put("strictSpecBehavior", config.isStrictSpecBehavior()); if (allModels == null || allModels.isEmpty()) { operation.put("hasModel", false); diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index 1c5a053a9b9..bebf2fcae86 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -123,7 +123,7 @@ module {{moduleName}} {{/hasValidation}} {{/allParams}} # resource path - local_var_path = '{{{path}}}'{{#pathParams}}.sub('{' + '{{baseName}}' + '}', CGI.escape({{paramName}}.to_s)){{/pathParams}} + local_var_path = '{{{path}}}'{{#pathParams}}.sub('{' + '{{baseName}}' + '}', CGI.escape({{paramName}}.to_s){{^strictSpecBehavior}}.gsub('%2F', '/'){{/strictSpecBehavior}}){{/pathParams}} # query parameters query_params = opts[:query_params] || {} From 6b428d65f6b85c532351b987bfc070707852f6e6 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Mon, 24 Jun 2019 18:22:10 -0400 Subject: [PATCH 64/73] Release versioning helper script(s) (#3110) * Release versioning script with marker tags. Introduces bump.sh which supports moving from version to version but only within delimiting marker tags in the target file. This script currently doesn't do validations or anything fancy. * Allow bumping version according to type (major,minor,build,revision) * bump.sh will display error if file contents are unchanged --- README.md | 15 +- bin/utils/release/bump.sh | 221 ++++++++++++++++++ bin/utils/release/release_version_update.sh | 96 ++++++++ .../release/release_version_update_docs.sh | 115 +++++++++ bin/utils/release/testing.txt | 17 ++ bin/utils/release/testing2.txt | 17 ++ bin/utils/release_version_update.sh | 62 ----- modules/openapi-generator-cli/pom.xml | 2 + modules/openapi-generator-core/pom.xml | 2 + .../README.adoc | 5 + .../gradle.properties | 2 + .../openapi-generator-gradle-plugin/pom.xml | 2 + .../samples/local-spec/gradle.properties | 2 + .../openapi-generator-maven-plugin/README.md | 2 + .../examples/java-client.xml | 2 + .../examples/multi-module/java-client/pom.xml | 2 + .../examples/non-java-invalid-spec.xml | 2 + .../examples/non-java.xml | 2 + .../openapi-generator-maven-plugin/pom.xml | 2 + modules/openapi-generator-online/pom.xml | 2 + modules/openapi-generator/pom.xml | 2 + pom.xml | 2 + 22 files changed, 508 insertions(+), 68 deletions(-) create mode 100755 bin/utils/release/bump.sh create mode 100755 bin/utils/release/release_version_update.sh create mode 100755 bin/utils/release/release_version_update_docs.sh create mode 100644 bin/utils/release/testing.txt create mode 100644 bin/utils/release/testing2.txt delete mode 100755 bin/utils/release_version_update.sh diff --git a/README.md b/README.md index 5c4cfac55d6..8ea13ee6e4e 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) -4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 31.07.2019 | Minor release (breaking changes with fallbacks) +4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks) 4.0.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.3-SNAPSHOT/)| 04.07.2019 | Patch release (minor bug fixes, etc) -[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc) +[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -153,7 +153,7 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. * [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc) ### [1.3 - Download JAR](#table-of-contents) - + If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar` @@ -175,7 +175,7 @@ For Mac users, please make sure Java 8 is installed (Tips: run `java -version` t export JAVA_HOME=`/usr/libexec/java_home -v 1.8` export PATH=${JAVA_HOME}/bin:$PATH ``` - + ### Launcher Script One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator-cli.sh) which resolves this issue. @@ -368,7 +368,8 @@ npm install @openapitools/openapi-generator-cli -g openapi-generator version ``` -Or install a particualar OpenAPI Generator version (e.g. v4.0.2): + +Or install a particular OpenAPI Generator version (e.g. v4.0.2): ```sh npm install @openapitools/openapi-generator-cli@cli-4.0.2 -g @@ -379,7 +380,7 @@ Or install it as dev-dependency: ```sh npm install @openapitools/openapi-generator-cli -D ``` - + ## [2 - Getting Started](#table-of-contents) To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following @@ -394,7 +395,9 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat ``` (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`) + You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar) + To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` diff --git a/bin/utils/release/bump.sh b/bin/utils/release/bump.sh new file mode 100755 index 00000000000..1afeffde16b --- /dev/null +++ b/bin/utils/release/bump.sh @@ -0,0 +1,221 @@ +#!/usr/bin/env bash +# +# This script bumps from one version to another +# +# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +declare -r version_regex="([0-9]+).([0-9]+).([0-9]+)-?(SNAPSHOT){0,1}" +declare start="" +declare end="" +declare from="${version_regex}" +declare to="" +declare debug=${debug:-false} +declare -a from_parts=() +declare -a to_parts=() +declare -ar inc=(major minor build snapshot) + +USAGE=" +USAGE: $0 OPTIONS input_file + + This script will bump a version number (or other value) between marker tags. + +OPTIONS: + -f The 'from' version + -t The 'to' version + -s The start tag regex + default: $start + -e The end tag regex + default: $end + -i Increase by one of: ${inc[@]} + -h Print this message + +EXAMPLES: + +Update to next snapshot version: + $0 -f 3.0.0 -t 3.0.1-SNAPSHOT pom.xml +Update build version only (useful for docs) + $0 -f 3.0.0 -t 3.0.1 pom.xml +Update from any version to any other version + $0 -f 1.2.3 -t 9.9.9-SNAPSHOT pom.xml +Customize the start/end tags + $0 -f 1.0.0 1.0.1-SNAPSHOT -s \"\" -e \"\" pom.xml +" + + +## print an error message and exit +err() { + >&2 echo -e "$1" + exit 1 +} + +## debug log messages. Run with debug=true ./bump.sh +d() { + if [[ true = "${debug}" ]]; then + echo "$1" + fi +} + +## outputs usage and exits +usage() +{ + err "${USAGE}" + exit 1 +} + +## usage: version input extracted_array +## - Checks that 'input' is a valid version +## - Extracts the version parts into 'extracted_array' +version() +{ + if [[ "$#" -ne 2 ]]; then + err "Call function version with two parameters: version string arr" + fi + local v=$1 + if [[ "${v}" =~ $version_regex ]]; then + local major=${BASH_REMATCH[1]} + local minor=${BASH_REMATCH[2]} + local build=${BASH_REMATCH[3]} + local snapshot=false + if [[ "SNAPSHOT" = "${BASH_REMATCH[4]}" ]]; then + snapshot=true + fi + + d "major=$major minor=$minor build=$build snapshot=$snapshot" + + eval "$2=(${major} ${minor} ${build} ${snapshot})" + else + err "Invalid version: $v" + fi +} + +while getopts "hf:t:s:e:i:" OPTION +do + case ${OPTION} in + f) + from=${OPTARG} + ;; + t) + to=${OPTARG} + ;; + s) + start=${OPTARG} + ;; + e) + end=${OPTARG} + ;; + i) + increase=${OPTARG} + if [[ ! "${inc[@]}" =~ ${increase} ]];then + err "Only support increasing by one of: ${inc[@]}" + fi + ;; + h) + usage + ;; + esac +done + +shift $((OPTIND-1)) +file=( "$@" ) + +if [[ ${#file[@]} -eq 0 ]];then + echo "No file specified" >&2 + usage +fi + +if [[ -z "${from}" ]]; then + echo "No 'from' version specified." >&2 + usage +fi + +# TODO: compare steps in from_parts and to_parts. +version "${from}" from_parts + +if [[ -z "${to}" ]]; then + if [[ -z "${increase}" ]]; then + err "No 'to' version specified." + else + case ${increase} in + major) + to="$(( ${from_parts[0]} + 1 )).0.0" + version "$to" to_parts + ;; + minor) + to="${from_parts[0]}.$(( ${from_parts[1]} + 1 )).0" + version "$to" to_parts + ;; + build) + to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))" + version "$to" to_parts + ;; + snapshot) + if [[ true = ${from_parts[3]} ]]; then + err "Can't move from SNAPSHOT to SNAPSHOT (from=${from})." + else + to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))-SNAPSHOT" + version "$to" to_parts + fi + ;; + esac + fi +else + version "${to}" to_parts +fi + +if [[ ${from_parts[3]} = true && ${to_parts[3]} = true ]]; then + err "Moving from SNAPSHOT to SNAPSHOT is not supported." +fi + +cat < sedscript.sed +/${start}/,/${end}/{ + s/${from}/${to}/g +} +EOF + +d "Moving from=${from} to=${to}" + +trap 'rm -f sedscript.sed' EXIT + +sed_cross() { + # Cross-platform sed invocation. OSX has no option to show a version number in sed. + local target=$1 + sed --version >/dev/null 2>&1 && sed -e -i '' -f sedscript.sed "$target" || sed -i '' -E -f sedscript.sed "$target" +} + +update_file() { + local filename=$1 + local error_message="ERROR: Failed to update $filename to target version ${to}" + local original_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest") + local final_hash="" + if ! sed_cross ${filename}; then + # occurs if, for example, the file doesn't exist. + echo "ERROR: Failed to update $filename to target version ${to}" >&2 + fi + + local final_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest") + + if [[ "${original_hash}" = "${final_hash}" ]]; then + # occurs if, for example, the file doesn't have expected marker tags for replacement + echo "ERROR: $filename was not modified." >&2 + else + echo "Updated $filename successfully!" + fi +} + +for filename in "${file[@]}"; do + update_file ${filename} +done + diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh new file mode 100755 index 00000000000..abc227a2027 --- /dev/null +++ b/bin/utils/release/release_version_update.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +# +# This script is used to update files to the "latest" version. +# +# usage: ./bin/utils/release_version_update.sh +# example: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1 +# +# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd) +declare root=$(cd "$cwd" && cd ../../../ && pwd) + +USAGE=" +USAGE: $0 target + + This script will convert the current version in target files to the specified 'target' + where target is one of: + + major + minor + build + snapshot + +EXAMPLES: + +Update to new snapshot (1.0.0 -> 1.0.1-SNAPSHOT): + $0 snapshot +Update build version (1.0.0 -> 1.0.1) + $0 build +Update minor version (1.2.3 -> 1.3.0) + $0 minor +Update major version (1.2.3 -> 2.0.0) + $0 major +" + +version=$(ruby -r rexml/document -e 'include REXML; + p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"') + +if [[ -n "$1" ]]; then + case $1 in + --help|-h) + echo -e "$USAGE" >&2 + exit 1 + ;; + major|minor|build|snapshot) + inc="$1" + ;; + *) + echo "Invalid target.Must be one of: major minor build or snapshot" >&2 + exit 1 + ;; + esac +else + inc="snapshot" +fi + +echo "Release preparation: Moving from $version to next $inc version." + +# These files should wrap target version replacement blocks with and +# We can include xml and md files here. +declare -a xml_files=( + "${root}/modules/openapi-generator-cli/pom.xml" + "${root}/modules/openapi-generator-gradle-plugin/pom.xml" + "${root}/modules/openapi-generator-core/pom.xml" + "${root}/modules/openapi-generator-maven-plugin/pom.xml" + "${root}/modules/openapi-generator-online/pom.xml" + "${root}/modules/openapi-generator/pom.xml" + "${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml" + "${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml" + "${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml" + "${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml" + "${root}/samples/meta-codegen/lib/pom.xml" + "${root}/pom.xml" +) + +# These files should wrap target version replacement blocks with # RELEASE_VERSION and # /RELEASE_VERSION +declare -a properties_files=( + "${root}/modules/openapi-generator-gradle-plugin/gradle.properties" + "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties" +) + +${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]} +${cwd}/bump.sh -f ${version} -t ${inc} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${properties_files[@]} diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh new file mode 100755 index 00000000000..287b9a3e7df --- /dev/null +++ b/bin/utils/release/release_version_update_docs.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env bash +# +# This script is used to update reference files to the "next" version. +# +# usage: ./bin/utils/release_version_update.sh +# example: ./bin/utils/release_version_update.sh 3.0.1 3.0.2 +# +# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd) +declare root=$(cd "$cwd" && cd ../../../ && pwd) + +USAGE=" +USAGE: $0 version target + + This script will convert the specified version in DOC target files to the 'target' + where target is one of: + + major + minor + build + + or an explicitly defined version number. + +NOTE: + + Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts. + If intending to update to/from snapshots, please add target files to release_version_update.sh instead. + +EXAMPLES: + +Update build version (1.0.0 -> 1.0.1) + $0 1.0.0 build +Update minor version (1.2.3 -> 1.3.0) + $0 1.2.3 minor +Update major version (1.2.3 -> 2.0.0) + $0 1.2.3 major +" + +declare version=$(ruby -r rexml/document -e 'include REXML; + p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"') + +declare target="${2:-build}" +declare inc="" +declare next_version="" +declare ags="" + +if [[ -z "$1" ]]; then + echo "Missing argument." >&2 + echo -e "$USAGE" >&2 + exit 1 +fi + +# Get version number we're changing +case $1 in + --help|-h) + echo -e "$USAGE" >&2 + exit 1 + ;; + *) + version="$1" + ;; +esac + +# Get the target… +case ${target} in + major|minor|build) + inc="$target" + ;; + snapshot) + echo -e "Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts. + If intending to update to/from snapshots, please add target files to release_version_update.sh instead. + " >&2 + exit 1 + ;; + *) + next_version="$target" + ;; +esac + +ags="-f ${version}" + +if [[ -n "${next_version}" ]];then + echo "Release preparation: Moving from $version to ${next_version}." + ags="$ags -t ${next_version}" +else + echo "Release preparation: Moving from $version to next $inc version." + ags="$ags -i ${inc}" +fi + +declare -a xml_files=( + "${root}/modules/openapi-generator-maven-plugin/README.md" + "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" + "${root}/README.md" +) + +declare -a commented_files=( + "${root}/modules/openapi-generator-gradle-plugin/README.adoc" +) + +${cwd}/bump.sh ${ags} ${xml_files[@]} +${cwd}/bump.sh ${ags} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${commented_files[@]} diff --git a/bin/utils/release/testing.txt b/bin/utils/release/testing.txt new file mode 100644 index 00000000000..300bdac6f68 --- /dev/null +++ b/bin/utils/release/testing.txt @@ -0,0 +1,17 @@ +This is a test simple: +3.0.1 + +Testing with other data: + +Version 1.2.3 + + +Testing with -SNAPSHOT data: + +Version 2.3.4-SNAPSHOT + + +Testing with a value not to be replaced: + +Version 3.2.2 + diff --git a/bin/utils/release/testing2.txt b/bin/utils/release/testing2.txt new file mode 100644 index 00000000000..300bdac6f68 --- /dev/null +++ b/bin/utils/release/testing2.txt @@ -0,0 +1,17 @@ +This is a test simple: +3.0.1 + +Testing with other data: + +Version 1.2.3 + + +Testing with -SNAPSHOT data: + +Version 2.3.4-SNAPSHOT + + +Testing with a value not to be replaced: + +Version 3.2.2 + diff --git a/bin/utils/release_version_update.sh b/bin/utils/release_version_update.sh deleted file mode 100755 index c485fc589c9..00000000000 --- a/bin/utils/release_version_update.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# -# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1 -# -# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [[ "$1" != "" ]]; then - FROM="$1" -else - echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1" - exit 1; -fi - -if [[ "$2" != "" ]]; then - TO="$2" -else - echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1" - exit 1; -fi - -echo "Release preparation: replacing $FROM with $TO in different files" - -# This script assumes the files defined here have a version surrounded by angle brackets within an xml node. -# For example, >4.0.0< becomes >4.0.1-SNAPSHOT<. -# Verify the sed command below against a file before adding here. -declare -a files=("modules/openapi-generator-cli/pom.xml" - "modules/openapi-generator-gradle-plugin/pom.xml" - "modules/openapi-generator-core/pom.xml" - "modules/openapi-generator-maven-plugin/pom.xml" - "modules/openapi-generator-online/pom.xml" - "modules/openapi-generator/pom.xml" - "samples/meta-codegen/lib/pom.xml" - "pom.xml") - -sedi () { - # Cross-platform version of sed -i that works both on Mac and Linux - sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@" -} - -for filename in "${files[@]}"; do - # e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash - #echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename" - if sedi "s/>$FROM$TO org.openapitools openapi-generator-project + 4.0.3-SNAPSHOT + ../.. 4.0.0 diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index a8c2deeb134..a91ac2830f6 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -5,7 +5,9 @@ openapi-generator-project org.openapitools + 4.0.3-SNAPSHOT + ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 78bccf0eddc..a6680177ec0 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -40,6 +40,8 @@ compileJava.dependsOn tasks.openApiGenerate == Plugin Setup +//# RELEASE_VERSION + [source,group] ---- plugins { @@ -65,6 +67,7 @@ buildscript { apply plugin: 'org.openapi.generator' ---- +//# /RELEASE_VERSION == Configuration @@ -597,6 +600,7 @@ Android Studio may experience a Windows-specific Guava dependency conflict with As a workaround, you may force exclude conflicting Guava dependencies. +//# RELEASE_VERSION ```gradle buildscript { repositories { @@ -618,5 +622,6 @@ configurations { // … apply plugin: 'org.openapi.generator' ``` +//# /RELEASE_VERSION See https://github.com/OpenAPITools/openapi-generator/issues/1818[OpenAPITools/openapi-generator#1818] for more details. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 5fc12b69996..467af36547f 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,4 +1,6 @@ +# RELEASE_VERSION openApiGeneratorVersion=4.0.3-SNAPSHOT +# /RELEASE_VERSION # BEGIN placeholders # these are just placeholders to allow contributors to build directly diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index d50d25be751..2be575667bb 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -3,7 +3,9 @@ org.openapitools openapi-generator-project + 4.0.3-SNAPSHOT + ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index ff5fd0c2e04..c70502e281f 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1,3 @@ +# RELEASE_VERSION openApiGeneratorVersion=4.0.3-SNAPSHOT +# /RELEASE_VERSION diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 6aeeef9d741..681b44f7f4c 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -11,7 +11,9 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin + 4.0.3-SNAPSHOT + diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 7be98ce9451..3b8655aeabd 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -12,7 +12,9 @@ org.openapitools openapi-generator-maven-plugin + 4.0.3-SNAPSHOT + diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 7ce9ae62f48..d87a9cb43f8 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -18,7 +18,9 @@ org.openapitools openapi-generator-maven-plugin + 4.0.3-SNAPSHOT + ${project.groupId} diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index bac384aa7d4..b1d3bfb3794 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -12,7 +12,9 @@ org.openapitools openapi-generator-maven-plugin + 4.0.3-SNAPSHOT + diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 74fab82198f..d733b0ee6e6 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -12,7 +12,9 @@ org.openapitools openapi-generator-maven-plugin + 4.0.3-SNAPSHOT + diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 65c682b2c75..c2c9eb6506d 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -4,7 +4,9 @@ org.openapitools openapi-generator-project + 4.0.3-SNAPSHOT + ../.. openapi-generator-maven-plugin diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 7da9adbe7ed..2936f136499 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -3,7 +3,9 @@ org.openapitools openapi-generator-project + 4.0.3-SNAPSHOT + ../.. openapi-generator-online diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 200d7dbc9f2..fb876816e28 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -3,7 +3,9 @@ org.openapitools openapi-generator-project + 4.0.3-SNAPSHOT + ../.. 4.0.0 diff --git a/pom.xml b/pom.xml index e47f6cedbf6..ecb40eab0df 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,9 @@ openapi-generator-project pom openapi-generator-project + 4.0.3-SNAPSHOT + https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git From 3ee76a06622c1f5c8e45fa006b3f40a98668ee5a Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Mon, 24 Jun 2019 18:24:50 -0400 Subject: [PATCH 65/73] [core] Initial implementation of a validation framework in core (#3183) * Initial implementation of a validation framework in core * Print surefire summary (helps evaluate errors) * Bump versions: surefire plugin,jmockit * Depend on jmockit within maven-surefire-plugin which requires it --- modules/openapi-generator-core/pom.xml | 7 + .../codegen/validation/GenericValidator.java | 61 +++++++ .../codegen/validation/Invalid.java | 57 +++++++ .../codegen/validation/Severity.java | 33 ++++ .../codegen/validation/Valid.java | 53 ++++++ .../codegen/validation/Validated.java | 68 ++++++++ .../codegen/validation/ValidationResult.java | 104 ++++++++++++ .../codegen/validation/ValidationRule.java | 152 ++++++++++++++++++ .../codegen/validation/Validator.java | 34 ++++ .../validation/GenericValidatorTest.java | 149 +++++++++++++++++ .../codegen/validation/ValidatedTest.java | 35 ++++ .../validation/ValidationRuleTest.java | 68 ++++++++ modules/openapi-generator/pom.xml | 2 +- pom.xml | 16 +- 14 files changed, 835 insertions(+), 4 deletions(-) create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java create mode 100644 modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java create mode 100644 modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java create mode 100644 modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index a91ac2830f6..5b13385a765 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -15,4 +15,11 @@ openapi-generator-core openapi-generator-core https://github.com/openapitools/openapi-generator + + + org.testng + testng + test + + diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java new file mode 100644 index 00000000000..2cac0876053 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import java.util.List; + +/** + * A generic implementation of a validator instance which simply applies rules to an input instance. + * + * @param The type of object being evaluated. + */ +@SuppressWarnings({"WeakerAccess"}) +public class GenericValidator implements Validator { + private List rules; + + /** + * Constructs a new instance of {@link GenericValidator}. + * + * @param rules The rules to be evaluated during validation. + */ + public GenericValidator(List rules) { + this.rules = rules; + } + + /** + * Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning). + * + * @param input The object instance to be validated. + * + * @return A {@link ValidationResult} which details the success, error, and warning validation results. + */ + @Override + public ValidationResult validate(TInput input) { + ValidationResult result = new ValidationResult(); + if (rules != null) { + rules.forEach(it -> { + boolean passes = it.evaluate(input); + if (passes) { + result.addResult(Validated.valid(it)); + } else { + result.addResult(Validated.invalid(it, it.getFailureMessage())); + } + }); + } + return result; + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java new file mode 100644 index 00000000000..2f3745ebf01 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +/** + * Represents a {@link Validated} state which is "Invalid" to some degree of {@link Severity}. + */ +@SuppressWarnings({"WeakerAccess"}) +public final class Invalid extends Validated { + private String message; + private ValidationRule rule; + + /** + * Constructs a new {@link Invalid} instance. + * + * @param rule The rule which was evaluated and resulted in this state. + * @param message The message to be displayed for this invalid state. + */ + Invalid(ValidationRule rule, String message) { + this.rule = rule; + this.message = message; + } + + @Override + String getMessage() { + return message; + } + + @Override + ValidationRule getRule() { + return rule; + } + + /** + * Get details about the severity of this invalid state. + * For instance, is this an {@link Severity#ERROR} or simply a {@link Severity#WARNING}. + * + * @return The {@link Severity} enum detailing this state's severity. + */ + public Severity getSeverity() { + return rule.getSeverity(); + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java new file mode 100644 index 00000000000..7818dfd620a --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java @@ -0,0 +1,33 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +/** + * Defines different levels of severity to be used during validation. + */ +public enum Severity { + /** + * Lower severity indicating that the target state may be unpredictable, no longer supported, or known to have issues. + * Marking a type with this value should not result in application exceptions under normal operating circumstances. + */ + WARNING, + /** + * Higher severity indicating that the target state is not supported, or is known to cause problems with the application. + * Marking a type with this value should result in an application exception or error exit code under normal operating circumstances. + */ + ERROR +} \ No newline at end of file diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java new file mode 100644 index 00000000000..d31443dca23 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java @@ -0,0 +1,53 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +/** + * Represents a {@link Validated} state which is "valid" according to the defined rule. + */ +public final class Valid extends Validated { + private ValidationRule rule; + + /** + * Defines whether or not the validation resulted in a "valid" condition. + * + * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}. + */ + @Override + boolean isValid() { + return true; + } + + /** + * Constructs a new {@link Valid} instance. + * + * @param rule The rule which was evaluated and resulted in this state. + */ + Valid(ValidationRule rule) { + this.rule = rule; + } + + @Override + public String getMessage() { + return null; + } + + @Override + public ValidationRule getRule() { + return rule; + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java new file mode 100644 index 00000000000..4800cd9ce75 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java @@ -0,0 +1,68 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +/** + * Provides details about the state of a completed validation. + */ +public abstract class Validated { + /** + * Defines whether or not the validation resulted in a "valid" condition. + * + * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}. + */ + boolean isValid() { + return false; + } + + /** + * Gets the rule which was evaluated and resulted in this state. + * + * @return The instance of {@link ValidationRule} which was evaluated. + */ + abstract ValidationRule getRule(); + + /** + * Gets the message with details about this validated state. + * + * @return A string intended to be displayed to a user. + */ + abstract String getMessage(); + + /** + * Creates an instance of an {@link Invalid} validation state. + * + * @param rule The rule which was evaluated. + * @param message The message to display to a user. + * + * @return A {@link Validated} instance representing an invalid state according to the rule. + */ + public static Validated invalid(ValidationRule rule, String message) { + return new Invalid(rule, message); + } + + /** + * Creates an instance of an {@link Valid} validation state. + * + * @param rule The rule which was evaluated. + * + * @return A {@link Validated} instance representing a valid state according to the rule. + */ + public static Validated valid(ValidationRule rule) { + return new Valid(rule); + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java new file mode 100644 index 00000000000..166ce2b2dff --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java @@ -0,0 +1,104 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Encapsulates details about the result of a validation test. + */ +@SuppressWarnings("WeakerAccess") +public final class ValidationResult { + private final List validations; + + /** + * Constructs a new {@link ValidationResult} instance, backed by the provided validations (useful for testing). + * + * @param validations A pre-defined set of validations to begin with. + */ + private ValidationResult(List validations) { + this.validations = Collections.synchronizedList(validations); + } + + /** + * Constructs a new {@link ValidationResult} instance. + */ + public ValidationResult() { + this(new ArrayList<>()); + } + + /** + * Gets all the validated states resulting from the evaluation. This includes all {@link Valid} and {@link Invalid} instances. + * + * @return All validated results. + */ + public List getAll() { + return validations; + } + + /** + * Gets a filtered list of {@link Valid} states. + * + * @return A list containing only {@link Valid} states. + */ + public List getValid(){ + return validations.stream().filter(Validated::isValid).map(it -> (Valid)it).collect(Collectors.toList()); + } + + /** + * Gets a filters list of {@link Invalid} states with the level of {@link Severity#ERROR} + * + * @return A list of all validation errors. + */ + public List getErrors(){ + return validations.stream() + .filter(it -> !it.isValid()) + .map(it -> (Invalid)it) + .filter(it -> it.getSeverity().equals(Severity.ERROR)) + .collect(Collectors.toList()); + } + + /** + * Gets a filtered list of {@link Invalid} states with the level of {@link Severity#WARNING} + * + * @return A list of all validation warnings. + */ + public List getWarnings(){ + return validations.stream() + .filter(it -> !it.isValid()) + .map(it -> (Invalid)it) + .filter(it -> it.getSeverity().equals(Severity.WARNING)) + .collect(Collectors.toList()); + } + + /** + * Adds a validation state to the final results. + * + * @param validated The {@link Valid} or {@link Invalid} instance to add to validations. + */ + public void addResult(Validated validated) { + synchronized (validations) { + ValidationRule rule = validated.getRule(); + if (rule != null && !rule.equals(ValidationRule.empty())) { + validations.add(validated); + } + } + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java new file mode 100644 index 00000000000..b774e8653d4 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java @@ -0,0 +1,152 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import java.util.function.Function; + +/** + * Defines a rule to be evaluated against some target object. + */ +@SuppressWarnings("WeakerAccess") +public class ValidationRule { + private Severity severity; + private String description; + private String failureMessage; + private Function test; + + /** + * Constructs a new instance of {@link ValidationRule} + * + * @param severity The declared severity if this validation rule fails. + * @param description A description to help differentiate this rule from others (not intended to be user-facing). + * @param failureMessage The message to be displayed in the event of a test failure (intended to be user-facing). + * @param test The test condition to be applied as a part of this rule, when this function returns true, + * the evaluated instance will be considered "valid" according to this rule. + */ + ValidationRule(Severity severity, String description, String failureMessage, Function test) { + this.severity = severity; + this.description = description; + this.failureMessage = failureMessage; + this.test = test; + } + + /** + * Gets the message to be displayed in the event of a test failure (intended to be user-facing). + * + * @return A string message + */ + public String getFailureMessage() { + return failureMessage; + } + + /** + * Evalute an instance of an object against this rule. + * + * @param input The instance to be evaluated. + * + * @return true if the object state is valid according to this rule, otherwise false. + */ + public boolean evaluate(Object input) { + return test.apply(input); + } + + /** + * Get the level of severity which this rule considers a failure in evaluation. For example, if this is {@link Severity#WARNING} and + * a call to {@link ValidationRule#evaluate(Object)} returns false, a user should not expect an error to be thrown under + * normal operation. + * + * @return An enum defining how severe a failure to evaluate this rule should be considered by the caller. + */ + public Severity getSeverity() { + return severity; + } + + /** + * Gets a description to help differentiate this rule from others (not intended to be user-facing). + * + * @return A string description. + */ + public String getDescription() { + return description; + } + + /** + * Constructs an empty rule (useful for testing). + * + * @return An "empty" rule. + */ + static ValidationRule empty() { + return new ValidationRule(Severity.ERROR, "empty", "failure message", (i) -> false); + } + + /** + * Create an instance of a {@link ValidationRule} + * + * @param severity The declared severity if this validation rule fails. + * @param description A description to help differentiate this rule from others (not intended to be user-facing). + * @param failureMessage The message to be displayed in the event of a test failure (intended to be user-facing). + * @param fn The test condition to be applied as a part of this rule, when this function returns true, + * the evaluated instance will be considered "valid" according to this rule. + * @param The type of the object being evaluated. + * + * @return A new instance of a {@link ValidationRule} + */ + @SuppressWarnings("unchecked") + public static ValidationRule create(Severity severity, String description, String failureMessage, Function fn) { + return new ValidationRule(severity, description, failureMessage, (Function) fn); + } + + /** + * Create an instance of a {@link ValidationRule} which should result in an error should the evaluate of this rule fail. + * + * @param failureMessage The message to be displayed in the event of a test failure (intended to be user-facing). + * @param fn The test condition to be applied as a part of this rule, when this function returns true, + * the evaluated instance will be considered "valid" according to this rule. + * @param The type of the object being evaluated. + * + * @return A new instance of a {@link ValidationRule} + */ + @SuppressWarnings("unchecked") + public static ValidationRule error(String failureMessage, Function fn) { + return new ValidationRule(Severity.ERROR, null, failureMessage, (Function) fn); + } + + /** + * Create an instance of a {@link ValidationRule} which should result in a warning should the evaluate of this rule fail. + * + * @param description A description to help differentiate this rule from others (not intended to be user-facing). + * @param failureMessage The message to be displayed in the event of a test failure (intended to be user-facing). + * @param fn The test condition to be applied as a part of this rule, when this function returns true, + * the evaluated instance will be considered "valid" according to this rule. + * @param The type of the object being evaluated. + * + * @return A new instance of a {@link ValidationRule} + */ + @SuppressWarnings("unchecked") + public static ValidationRule warn(String description, String failureMessage, Function fn) { + return new ValidationRule(Severity.WARNING, description, failureMessage, (Function) fn); + } + + @Override + public String toString() { + return "ValidationRule{" + + "severity=" + severity + + ", description='" + description + '\'' + + ", failureMessage='" + failureMessage + '\'' + + '}'; + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java new file mode 100644 index 00000000000..a47e829fe6a --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +/** + * Defines a contract allowing some input to be validated. + * + * @param The type of the input object. + */ +@FunctionalInterface +public interface Validator { + /** + * Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning). + * + * @param input The object instance to be validated. + * + * @return A {@link ValidationResult} which details the success, error, and warning validation results. + */ + ValidationResult validate(TInput input); +} \ No newline at end of file diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java new file mode 100644 index 00000000000..0a258d2a139 --- /dev/null +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import org.testng.annotations.Test; + +import static org.testng.Assert.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +public class GenericValidatorTest { + class Person { + private int age; + private String name; + + Person(String name, int age) { + this.age = age; + this.name = name; + } + } + + private static boolean isValidAge(Person person) { + return person.age > 0; + } + + private static boolean isAdult(Person person) { + return person.age > 18; + } + + private static boolean isNameSet(Person person) { + return person.name != null && person.name.length() > 0; + } + + private static boolean isNameValid(Person person) { + String pattern = "^[A-Z][a-z]*$"; + return person.name.matches(pattern); + } + + private static boolean isNameNormalLength(Person person) { + return person.name.length() < 10; + } + + private List validationRules = Arrays.asList( + ValidationRule.error("Age must be positive and more than zero", GenericValidatorTest::isValidAge), + ValidationRule.error("Only adults (18 years old and older)", GenericValidatorTest::isAdult), + ValidationRule.error("Name isn't set!", GenericValidatorTest::isNameSet), + ValidationRule.error("Name isn't formatted correct", GenericValidatorTest::isNameValid), + ValidationRule.warn("Name too long?", "Name may be too long.", GenericValidatorTest::isNameNormalLength) + ); + + @Test + public void testGenericValidatorSuccesses(){ + Person person = new Person("Jim", 23); + GenericValidator validator = new GenericValidator<>(validationRules); + ValidationResult result = validator.validate(person); + List validated = result.getAll(); + List valid = result.getValid(); + List invalid = result.getErrors(); + + assertEquals(validated.size(), 5, "Expected 5 validations to run."); + assertEquals(valid.size(), 5, "Expected all validations to succeed"); + assertEquals(invalid.size(), 0, "Expected zero validations to fail."); + } + + @Test + public void testGenericValidatorSingleConditionFails(){ + Person person = new Person("Jim", 3); + GenericValidator validator = new GenericValidator<>(validationRules); + ValidationResult result = validator.validate(person); + List validated = result.getAll(); + List valid = result.getValid(); + List errors = result.getErrors(); + List warnings = result.getWarnings(); + + assertEquals(validated.size(), 5, "Expected 5 validations to run."); + assertEquals(valid.size(), 4, "Expected 4 validations to succeed"); + assertEquals(errors.size(), 1, "Expected 1 validation to fail."); + assertEquals(warnings.size(), 0, "Expected no warnings to be triggered."); + + Invalid failed = errors.get(0); + assertEquals(failed.getMessage(), "Only adults (18 years old and older)"); + } + + @Test + public void testGenericValidatorMultipleConditionsFail(){ + Person person = new Person("asdf", 3); + GenericValidator validator = new GenericValidator<>(validationRules); + ValidationResult result = validator.validate(person); + List validated = result.getAll(); + List valid = result.getValid(); + List errors = result.getErrors(); + List warnings = result.getWarnings(); + + assertEquals(validated.size(), 5, "Expected 5 validations to run."); + assertEquals(valid.size(), 3, "Expected 3 validations to succeed"); + assertEquals(errors.size(), 2, "Expected 2 validations to fail."); + assertEquals(warnings.size(), 0, "Expected no warnings to be triggered."); + + Optional nameValidation = errors.stream().filter(it -> it.getMessage().contains("formatted")).findFirst(); + Optional ageValidation = errors.stream().filter(it -> it.getMessage().contains("adults")).findFirst(); + + assertTrue(nameValidation.isPresent(), "Expected validation on name formatting to fail."); + assertTrue(ageValidation.isPresent(), "Expected validation on age requirements to fail."); + assertEquals(nameValidation.get().getMessage(), "Name isn't formatted correct"); + assertEquals(ageValidation.get().getMessage(), "Only adults (18 years old and older)"); + } + + @Test + public void testGenericValidatorErrorsAndWarnings(){ + Person person = new Person("0123456789asdfghjkl", 3); + GenericValidator validator = new GenericValidator<>(validationRules); + ValidationResult result = validator.validate(person); + List validated = result.getAll(); + List valid = result.getValid(); + List errors = result.getErrors(); + List warnings = result.getWarnings(); + + assertEquals(validated.size(), 5, "Expected 5 validations to run."); + assertEquals(valid.size(), 2, "Expected 2 validations to succeed"); + assertEquals(errors.size(), 2, "Expected 2 validations to fail."); + assertEquals(warnings.size(), 1, "Expected 1 warning to be triggered."); + + Optional nameValidation = errors.stream().filter(it -> it.getMessage().contains("formatted")).findFirst(); + Optional ageValidation = errors.stream().filter(it -> it.getMessage().contains("adults")).findFirst(); + Invalid nameLengthWarning = warnings.get(0); + + assertTrue(nameValidation.isPresent(), "Expected validation on name formatting to fail."); + assertTrue(ageValidation.isPresent(), "Expected validation on age requirements to fail."); + assertEquals(nameValidation.get().getMessage(), "Name isn't formatted correct"); + assertEquals(ageValidation.get().getMessage(), "Only adults (18 years old and older)"); + assertEquals(nameLengthWarning.getMessage(), "Name may be too long."); + } +} diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java new file mode 100644 index 00000000000..8109461de57 --- /dev/null +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import org.testng.annotations.Test; + +import static org.testng.Assert.*; + +public class ValidatedTest { + @Test + public void isValidTrueForValidType(){ + boolean isValid = Validated.valid(ValidationRule.empty()).isValid(); + assertTrue(isValid); + } + + @Test + public void isValidFalseForInvalidType(){ + boolean isValid = Validated.invalid(ValidationRule.empty(), "test").isValid(); + assertFalse(isValid); + } +} diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java new file mode 100644 index 00000000000..afa6c02ff57 --- /dev/null +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.validation; + +import org.testng.annotations.Test; + +import static org.testng.Assert.*; + +public class ValidationRuleTest { + class Sample { + private String name; + + public Sample(String name) { + this.name = name; + } + + public String getName() { + return name; + } + } + + private static boolean checkName(Sample input) { + return input.getName() != null && input.getName().length() > 7; + } + + private static boolean checkPattern(Sample input) { + String pattern = "^[A-Z][a-z]*$"; + return input.getName() != null && input.getName().matches(pattern); + } + + @Test + public void createMethodUsingMethodReference(){ + Sample nil = new Sample(null); + Sample six = new Sample("123456"); + Sample seven = new Sample("1234567"); + Sample eight = new Sample("12345678"); + ValidationRule result = ValidationRule.error("test", ValidationRuleTest::checkName); + assertFalse(result.evaluate(nil)); + assertFalse(result.evaluate(six)); + assertFalse(result.evaluate(seven)); + assertTrue(result.evaluate(eight)); + } + + @Test + public void createMethodUsingLambda(){ + Sample nil = new Sample(null); + Sample lowercase = new Sample("jim"); + Sample titlecase = new Sample("Jim"); + ValidationRule result = ValidationRule.error("test", i -> checkPattern((Sample)i)); + assertFalse(result.evaluate(nil)); + assertFalse(result.evaluate(lowercase)); + assertTrue(result.evaluate(titlecase)); + } +} diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index fb876816e28..cbd6347dbcb 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -315,7 +315,7 @@ org.openapitools openapi-generator-core - 4.0.3-SNAPSHOT + ${project.parent.version} diff --git a/pom.xml b/pom.xml index ecb40eab0df..a63eb41b537 100644 --- a/pom.xml +++ b/pom.xml @@ -155,12 +155,22 @@ maven-surefire-plugin ${surefire-version} + true false none:none org.testng:testng -XX:+StartAttachListener -javaagent:"${settings.localRepository}/org/jmockit/jmockit/${jmockit-version}/jmockit-${jmockit-version}.jar" + + + + org.jmockit + jmockit + ${jmockit-version} + compile + + maven-dependency-plugin @@ -1286,12 +1296,12 @@ + modules/openapi-generator-core modules/openapi-generator modules/openapi-generator-cli modules/openapi-generator-maven-plugin modules/openapi-generator-gradle-plugin modules/openapi-generator-online - modules/openapi-generator-core target/site @@ -1373,8 +1383,8 @@ 1.14 4.1.2 6.14.3 - 2.22.1 - 1.43 + 3.0.0-M3 + 1.46 0.9.10 From 74c569ebf85eed909b7f75437a1fa7c3ffe3d536 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 25 Jun 2019 10:34:44 +0800 Subject: [PATCH 66/73] Make sure Perl client samples are up-to-date (#3207) * Make sure Perl samples are up-to-date * update perl samples --- bin/utils/ensure-up-to-date | 1 + .../petstore/perl/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.travis.yml | 9 + samples/client/petstore/perl/README.md | 88 ++++----- .../perl/docs/AdditionalPropertiesClass.md | 13 +- .../petstore/perl/docs/AnotherFakeApi.md | 60 ++++++ samples/client/petstore/perl/docs/CatAllOf.md | 15 ++ samples/client/petstore/perl/docs/DogAllOf.md | 15 ++ samples/client/petstore/perl/docs/EnumTest.md | 3 - samples/client/petstore/perl/docs/FakeApi.md | 82 ++++---- .../perl/docs/FakeClassnameTags123Api.md | 8 +- .../client/petstore/perl/docs/FormatTest.md | 2 - samples/client/petstore/perl/docs/PetApi.md | 16 +- samples/client/petstore/perl/docs/StoreApi.md | 10 +- samples/client/petstore/perl/docs/UserApi.md | 40 ++-- .../lib/WWW/OpenAPIClient/AnotherFakeApi.pm | 14 +- .../perl/lib/WWW/OpenAPIClient/ApiClient.pm | 6 - .../perl/lib/WWW/OpenAPIClient/FakeApi.pm | 122 ++++++------ .../OpenAPIClient/FakeClassnameTags123Api.pm | 14 +- .../Object/AdditionalPropertiesAnyType.pm | 19 +- .../Object/AdditionalPropertiesArray.pm | 19 +- .../Object/AdditionalPropertiesBoolean.pm | 19 +- .../Object/AdditionalPropertiesClass.pm | 97 ++++++++- .../Object/AdditionalPropertiesInteger.pm | 19 +- .../Object/AdditionalPropertiesNumber.pm | 19 +- .../Object/AdditionalPropertiesObject.pm | 19 +- .../Object/AdditionalPropertiesString.pm | 19 +- .../perl/lib/WWW/OpenAPIClient/Object/Cat.pm | 1 + .../lib/WWW/OpenAPIClient/Object/CatAllOf.pm | 184 ++++++++++++++++++ .../perl/lib/WWW/OpenAPIClient/Object/Dog.pm | 1 + .../lib/WWW/OpenAPIClient/Object/DogAllOf.pm | 184 ++++++++++++++++++ .../lib/WWW/OpenAPIClient/Object/EnumTest.pm | 34 +--- .../WWW/OpenAPIClient/Object/FormatTest.pm | 22 +-- .../OpenAPIClient/Object/TypeHolderDefault.pm | 19 +- .../OpenAPIClient/Object/TypeHolderExample.pm | 19 +- .../lib/WWW/OpenAPIClient/Object/XmlItem.pm | 19 +- .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 28 +-- .../perl/lib/WWW/OpenAPIClient/StoreApi.pm | 16 +- .../perl/lib/WWW/OpenAPIClient/UserApi.pm | 64 +++--- .../petstore/perl/t/AnotherFakeApiTest.t | 41 ++++ samples/client/petstore/perl/t/CatAllOfTest.t | 33 ++++ samples/client/petstore/perl/t/DogAllOfTest.t | 33 ++++ 42 files changed, 1064 insertions(+), 384 deletions(-) create mode 100644 samples/client/petstore/perl/.travis.yml create mode 100644 samples/client/petstore/perl/docs/AnotherFakeApi.md create mode 100644 samples/client/petstore/perl/docs/CatAllOf.md create mode 100644 samples/client/petstore/perl/docs/DogAllOf.md create mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm create mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm create mode 100644 samples/client/petstore/perl/t/AnotherFakeApiTest.t create mode 100644 samples/client/petstore/perl/t/CatAllOfTest.t create mode 100644 samples/client/petstore/perl/t/DogAllOfTest.t diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 52256708c55..166c8c60bd1 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -56,6 +56,7 @@ declare -a scripts=( "./bin/go-gin-petstore-server.sh" "./bin/groovy-petstore.sh" "./bin/apex-petstore.sh" +"./bin/perl-petstore-all.sh" #"./bin/elm-petstore-all.sh" "./bin/meta-codegen.sh" # OTHERS diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index afa63656064..479c313e87b 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/.travis.yml b/samples/client/petstore/perl/.travis.yml new file mode 100644 index 00000000000..cdfebb90fbe --- /dev/null +++ b/samples/client/petstore/perl/.travis.yml @@ -0,0 +1,9 @@ +# https://docs.travis-ci.com/user/languages/perl/ +# + +language: perl + +perl: + - "5.28" + +sudo: false diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index ceba27d0b85..ee3b3777823 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -222,7 +222,6 @@ Each of these calls returns a hashref with various useful pieces of information. To load the API packages: ```perl use WWW::OpenAPIClient::AnotherFakeApi; -use WWW::OpenAPIClient::DefaultApi; use WWW::OpenAPIClient::FakeApi; use WWW::OpenAPIClient::FakeClassnameTags123Api; use WWW::OpenAPIClient::PetApi; @@ -233,7 +232,14 @@ use WWW::OpenAPIClient::UserApi; To load the models: ```perl +use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; +use WWW::OpenAPIClient::Object::AdditionalPropertiesArray; +use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; +use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; +use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; +use WWW::OpenAPIClient::Object::AdditionalPropertiesObject; +use WWW::OpenAPIClient::Object::AdditionalPropertiesString; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -241,45 +247,37 @@ use WWW::OpenAPIClient::Object::ArrayOfNumberOnly; use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; +use WWW::OpenAPIClient::Object::CatAllOf; use WWW::OpenAPIClient::Object::Category; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::Dog; +use WWW::OpenAPIClient::Object::DogAllOf; use WWW::OpenAPIClient::Object::EnumArrays; use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; use WWW::OpenAPIClient::Object::File; use WWW::OpenAPIClient::Object::FileSchemaTestClass; -use WWW::OpenAPIClient::Object::Foo; use WWW::OpenAPIClient::Object::FormatTest; use WWW::OpenAPIClient::Object::HasOnlyReadOnly; -use WWW::OpenAPIClient::Object::HealthCheckResult; -use WWW::OpenAPIClient::Object::InlineObject; -use WWW::OpenAPIClient::Object::InlineObject1; -use WWW::OpenAPIClient::Object::InlineObject2; -use WWW::OpenAPIClient::Object::InlineObject3; -use WWW::OpenAPIClient::Object::InlineObject4; -use WWW::OpenAPIClient::Object::InlineObject5; -use WWW::OpenAPIClient::Object::InlineResponseDefault; use WWW::OpenAPIClient::Object::List; use WWW::OpenAPIClient::Object::MapTest; use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass; use WWW::OpenAPIClient::Object::Model200Response; use WWW::OpenAPIClient::Object::ModelReturn; use WWW::OpenAPIClient::Object::Name; -use WWW::OpenAPIClient::Object::NullableClass; use WWW::OpenAPIClient::Object::NumberOnly; use WWW::OpenAPIClient::Object::Order; use WWW::OpenAPIClient::Object::OuterComposite; use WWW::OpenAPIClient::Object::OuterEnum; -use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; -use WWW::OpenAPIClient::Object::OuterEnumInteger; -use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; +use WWW::OpenAPIClient::Object::TypeHolderDefault; +use WWW::OpenAPIClient::Object::TypeHolderExample; use WWW::OpenAPIClient::Object::User; +use WWW::OpenAPIClient::Object::XmlItem; ```` @@ -292,7 +290,6 @@ use strict; use warnings; # load the API package use WWW::OpenAPIClient::AnotherFakeApi; -use WWW::OpenAPIClient::DefaultApi; use WWW::OpenAPIClient::FakeApi; use WWW::OpenAPIClient::FakeClassnameTags123Api; use WWW::OpenAPIClient::PetApi; @@ -300,7 +297,14 @@ use WWW::OpenAPIClient::StoreApi; use WWW::OpenAPIClient::UserApi; # load the models +use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; +use WWW::OpenAPIClient::Object::AdditionalPropertiesArray; +use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; +use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; +use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; +use WWW::OpenAPIClient::Object::AdditionalPropertiesObject; +use WWW::OpenAPIClient::Object::AdditionalPropertiesString; use WWW::OpenAPIClient::Object::Animal; use WWW::OpenAPIClient::Object::ApiResponse; use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly; @@ -308,45 +312,37 @@ use WWW::OpenAPIClient::Object::ArrayOfNumberOnly; use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; +use WWW::OpenAPIClient::Object::CatAllOf; use WWW::OpenAPIClient::Object::Category; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::Dog; +use WWW::OpenAPIClient::Object::DogAllOf; use WWW::OpenAPIClient::Object::EnumArrays; use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; use WWW::OpenAPIClient::Object::File; use WWW::OpenAPIClient::Object::FileSchemaTestClass; -use WWW::OpenAPIClient::Object::Foo; use WWW::OpenAPIClient::Object::FormatTest; use WWW::OpenAPIClient::Object::HasOnlyReadOnly; -use WWW::OpenAPIClient::Object::HealthCheckResult; -use WWW::OpenAPIClient::Object::InlineObject; -use WWW::OpenAPIClient::Object::InlineObject1; -use WWW::OpenAPIClient::Object::InlineObject2; -use WWW::OpenAPIClient::Object::InlineObject3; -use WWW::OpenAPIClient::Object::InlineObject4; -use WWW::OpenAPIClient::Object::InlineObject5; -use WWW::OpenAPIClient::Object::InlineResponseDefault; use WWW::OpenAPIClient::Object::List; use WWW::OpenAPIClient::Object::MapTest; use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass; use WWW::OpenAPIClient::Object::Model200Response; use WWW::OpenAPIClient::Object::ModelReturn; use WWW::OpenAPIClient::Object::Name; -use WWW::OpenAPIClient::Object::NullableClass; use WWW::OpenAPIClient::Object::NumberOnly; use WWW::OpenAPIClient::Object::Order; use WWW::OpenAPIClient::Object::OuterComposite; use WWW::OpenAPIClient::Object::OuterEnum; -use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; -use WWW::OpenAPIClient::Object::OuterEnumInteger; -use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SpecialModelName; use WWW::OpenAPIClient::Object::Tag; +use WWW::OpenAPIClient::Object::TypeHolderDefault; +use WWW::OpenAPIClient::Object::TypeHolderExample; use WWW::OpenAPIClient::Object::User; +use WWW::OpenAPIClient::Object::XmlItem; # for displaying the API response data use Data::Dumper; @@ -355,10 +351,10 @@ use WWW::OpenAPIClient::; my $api_instance = WWW::OpenAPIClient::->new( ); -my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->call_123_test_special_tags(client => $client); + my $result = $api_instance->call_123_test_special_tags(body => $body); print Dumper($result); }; if ($@) { @@ -374,8 +370,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo | -*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem *FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | @@ -413,7 +408,14 @@ Class | Method | HTTP request | Description # DOCUMENTATION FOR MODELS + - [WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) + - [WWW::OpenAPIClient::Object::AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [WWW::OpenAPIClient::Object::Animal](docs/Animal.md) - [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md) - [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) @@ -421,45 +423,37 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::ArrayTest](docs/ArrayTest.md) - [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md) - [WWW::OpenAPIClient::Object::Cat](docs/Cat.md) + - [WWW::OpenAPIClient::Object::CatAllOf](docs/CatAllOf.md) - [WWW::OpenAPIClient::Object::Category](docs/Category.md) - [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md) - [WWW::OpenAPIClient::Object::Client](docs/Client.md) - [WWW::OpenAPIClient::Object::Dog](docs/Dog.md) + - [WWW::OpenAPIClient::Object::DogAllOf](docs/DogAllOf.md) - [WWW::OpenAPIClient::Object::EnumArrays](docs/EnumArrays.md) - [WWW::OpenAPIClient::Object::EnumClass](docs/EnumClass.md) - [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md) - [WWW::OpenAPIClient::Object::File](docs/File.md) - [WWW::OpenAPIClient::Object::FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [WWW::OpenAPIClient::Object::Foo](docs/Foo.md) - [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md) - [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [WWW::OpenAPIClient::Object::HealthCheckResult](docs/HealthCheckResult.md) - - [WWW::OpenAPIClient::Object::InlineObject](docs/InlineObject.md) - - [WWW::OpenAPIClient::Object::InlineObject1](docs/InlineObject1.md) - - [WWW::OpenAPIClient::Object::InlineObject2](docs/InlineObject2.md) - - [WWW::OpenAPIClient::Object::InlineObject3](docs/InlineObject3.md) - - [WWW::OpenAPIClient::Object::InlineObject4](docs/InlineObject4.md) - - [WWW::OpenAPIClient::Object::InlineObject5](docs/InlineObject5.md) - - [WWW::OpenAPIClient::Object::InlineResponseDefault](docs/InlineResponseDefault.md) - [WWW::OpenAPIClient::Object::List](docs/List.md) - [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md) - [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md) - [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md) - [WWW::OpenAPIClient::Object::Name](docs/Name.md) - - [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md) - [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md) - [WWW::OpenAPIClient::Object::Order](docs/Order.md) - [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md) - [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md) - - [WWW::OpenAPIClient::Object::OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) - - [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md) - - [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [WWW::OpenAPIClient::Object::Pet](docs/Pet.md) - [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md) - [WWW::OpenAPIClient::Object::Tag](docs/Tag.md) + - [WWW::OpenAPIClient::Object::TypeHolderDefault](docs/TypeHolderDefault.md) + - [WWW::OpenAPIClient::Object::TypeHolderExample](docs/TypeHolderExample.md) - [WWW::OpenAPIClient::Object::User](docs/User.md) + - [WWW::OpenAPIClient::Object::XmlItem](docs/XmlItem.md) # DOCUMENTATION FOR AUTHORIZATION @@ -476,10 +470,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key_query - **Location**: URL query string -## bearer_test - -- **Type**: HTTP basic authentication - ## http_basic_test - **Type**: HTTP basic authentication diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md index ce21d69c235..47f95da8f0c 100644 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md @@ -8,8 +8,17 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**map_property** | **HASH[string,string]** | | [optional] -**map_of_map_property** | **HASH[string,HASH[string,string]]** | | [optional] +**map_string** | **HASH[string,string]** | | [optional] +**map_number** | **HASH[string,double]** | | [optional] +**map_integer** | **HASH[string,int]** | | [optional] +**map_boolean** | **HASH[string,boolean]** | | [optional] +**map_array_integer** | **HASH[string,ARRAY[int]]** | | [optional] +**map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional] +**map_map_string** | **HASH[string,HASH[string,string]]** | | [optional] +**map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional] +**anytype_1** | [**object**](.md) | | [optional] +**anytype_2** | [**object**](.md) | | [optional] +**anytype_3** | [**object**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/AnotherFakeApi.md b/samples/client/petstore/perl/docs/AnotherFakeApi.md new file mode 100644 index 00000000000..87c9e4015b7 --- /dev/null +++ b/samples/client/petstore/perl/docs/AnotherFakeApi.md @@ -0,0 +1,60 @@ +# WWW::OpenAPIClient::AnotherFakeApi + +## Load the API package +```perl +use WWW::OpenAPIClient::Object::AnotherFakeApi; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call_123_test_special_tags** +> Client call_123_test_special_tags(body => $body) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```perl +use Data::Dumper; +use WWW::OpenAPIClient::AnotherFakeApi; +my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new( +); + +my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model + +eval { + my $result = $api_instance->call_123_test_special_tags(body => $body); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling AnotherFakeApi->call_123_test_special_tags: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/perl/docs/CatAllOf.md b/samples/client/petstore/perl/docs/CatAllOf.md new file mode 100644 index 00000000000..5c422d64439 --- /dev/null +++ b/samples/client/petstore/perl/docs/CatAllOf.md @@ -0,0 +1,15 @@ +# WWW::OpenAPIClient::Object::CatAllOf + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::CatAllOf; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **boolean** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/perl/docs/DogAllOf.md b/samples/client/petstore/perl/docs/DogAllOf.md new file mode 100644 index 00000000000..6950ae9bba3 --- /dev/null +++ b/samples/client/petstore/perl/docs/DogAllOf.md @@ -0,0 +1,15 @@ +# WWW::OpenAPIClient::Object::DogAllOf + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::DogAllOf; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/perl/docs/EnumTest.md b/samples/client/petstore/perl/docs/EnumTest.md index 60ed7418d2a..aa889b2be86 100644 --- a/samples/client/petstore/perl/docs/EnumTest.md +++ b/samples/client/petstore/perl/docs/EnumTest.md @@ -13,9 +13,6 @@ Name | Type | Description | Notes **enum_integer** | **int** | | [optional] **enum_number** | **double** | | [optional] **outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index e4c380346f5..71f47ac441d 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint +[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem [**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean | [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | @@ -24,10 +24,12 @@ Method | HTTP request | Description [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data -# **fake_health_get** -> HealthCheckResult fake_health_get() +# **create_xml_item** +> create_xml_item(xml_item => $xml_item) -Health check endpoint +creates an XmlItem + +this route creates an XmlItem ### Example ```perl @@ -36,22 +38,25 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); +my $xml_item = WWW::OpenAPIClient::Object::XmlItem->new(); # XmlItem | XmlItem Body eval { - my $result = $api_instance->fake_health_get(); - print Dumper($result); + $api_instance->create_xml_item(xml_item => $xml_item); }; if ($@) { - warn "Exception when calling FakeApi->fake_health_get: $@\n"; + warn "Exception when calling FakeApi->create_xml_item: $@\n"; } ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body | ### Return type -[**HealthCheckResult**](HealthCheckResult.md) +void (empty response body) ### Authorization @@ -59,8 +64,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -105,13 +110,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_outer_composite_serialize** -> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite) +> OuterComposite fake_outer_composite_serialize(body => $body) @@ -124,10 +129,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body +my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body eval { - my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite); + my $result = $api_instance->fake_outer_composite_serialize(body => $body); print Dumper($result); }; if ($@) { @@ -139,7 +144,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -151,7 +156,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -197,7 +202,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -243,13 +248,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_body_with_file_schema** -> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class) +> test_body_with_file_schema(body => $body) @@ -262,10 +267,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | +my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | eval { - $api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class); + $api_instance->test_body_with_file_schema(body => $body); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n"; @@ -276,7 +281,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -294,7 +299,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_body_with_query_params** -> test_body_with_query_params(query => $query, user => $user) +> test_body_with_query_params(query => $query, body => $body) @@ -306,10 +311,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); my $query = "query_example"; # string | -my $user = WWW::OpenAPIClient::Object::User->new(); # User | +my $body = WWW::OpenAPIClient::Object::User->new(); # User | eval { - $api_instance->test_body_with_query_params(query => $query, user => $user); + $api_instance->test_body_with_query_params(query => $query, body => $body); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_query_params: $@\n"; @@ -321,7 +326,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **query** | **string**| | - **user** | [**User**](User.md)| | + **body** | [**User**](User.md)| | ### Return type @@ -339,7 +344,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_client_model** -> Client test_client_model(client => $client) +> Client test_client_model(body => $body) To test \"client\" model @@ -352,10 +357,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_client_model(client => $client); + my $result = $api_instance->test_client_model(body => $body); print Dumper($result); }; if ($@) { @@ -367,7 +372,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | + **body** | [**Client**](Client.md)| client model | ### Return type @@ -531,11 +536,6 @@ Fake endpoint to test group parameters (optional) use Data::Dumper; use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( - - # Configure HTTP basic authorization: bearer_test - # Configure bearer access token for authorization: bearer_test - access_token => 'YOUR_BEARER_TOKEN', - ); my $required_string_group = 56; # int | Required String in group parameters @@ -570,7 +570,7 @@ void (empty response body) ### Authorization -[bearer_test](../README.md#bearer_test) +No authorization required ### HTTP request headers @@ -580,7 +580,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_inline_additional_properties** -> test_inline_additional_properties(request_body => $request_body) +> test_inline_additional_properties(param => $param) test inline additionalProperties @@ -591,10 +591,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body +my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body eval { - $api_instance->test_inline_additional_properties(request_body => $request_body); + $api_instance->test_inline_additional_properties(param => $param); }; if ($@) { warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n"; @@ -605,7 +605,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **request_body** | [**HASH[string,string]**](string.md)| request body | + **param** | [**HASH[string,string]**](string.md)| request body | ### Return type diff --git a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md index 67c2122cb6f..70e303f7bf0 100644 --- a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **test_classname** -> Client test_classname(client => $client) +> Client test_classname(body => $body) To test class name in snake case @@ -31,10 +31,10 @@ my $api_instance = WWW::OpenAPIClient::FakeClassnameTags123Api->new( #api_key_prefix => {'api_key_query' => 'Bearer'}, ); -my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_classname(client => $client); + my $result = $api_instance->test_classname(body => $body); print Dumper($result); }; if ($@) { @@ -46,7 +46,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client** | [**Client**](Client.md)| client model | + **body** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md index 7cfabebb281..3a1bf2c21f3 100644 --- a/samples/client/petstore/perl/docs/FormatTest.md +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -21,8 +21,6 @@ Name | Type | Description | Notes **date_time** | **DateTime** | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | -**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**pattern_with_digits_and_delimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 5218d9282f1..899e2f63e07 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -21,7 +21,7 @@ Method | HTTP request | Description # **add_pet** -> add_pet(pet => $pet) +> add_pet(body => $body) Add a new pet to the store @@ -35,10 +35,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->add_pet(pet => $pet); + $api_instance->add_pet(body => $body); }; if ($@) { warn "Exception when calling PetApi->add_pet: $@\n"; @@ -49,7 +49,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -264,7 +264,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_pet** -> update_pet(pet => $pet) +> update_pet(body => $body) Update an existing pet @@ -278,10 +278,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->update_pet(pet => $pet); + $api_instance->update_pet(body => $body); }; if ($@) { warn "Exception when calling PetApi->update_pet: $@\n"; @@ -292,7 +292,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index e467823c53a..fe591e701a8 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -154,7 +154,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_order** -> Order place_order(order => $order) +> Order place_order(body => $body) Place an order for a pet @@ -165,10 +165,10 @@ use WWW::OpenAPIClient::StoreApi; my $api_instance = WWW::OpenAPIClient::StoreApi->new( ); -my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet +my $body = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet eval { - my $result = $api_instance->place_order(order => $order); + my $result = $api_instance->place_order(body => $body); print Dumper($result); }; if ($@) { @@ -180,7 +180,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | + **body** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -192,7 +192,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index ebe449515cb..543f18109c7 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **create_user** -> create_user(user => $user) +> create_user(body => $body) Create user @@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object +my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object eval { - $api_instance->create_user(user => $user); + $api_instance->create_user(body => $body); }; if ($@) { warn "Exception when calling UserApi->create_user: $@\n"; @@ -47,7 +47,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | + **body** | [**User**](User.md)| Created user object | ### Return type @@ -59,13 +59,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_users_with_array_input** -> create_users_with_array_input(user => $user) +> create_users_with_array_input(body => $body) Creates list of users with given input array @@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_array_input(user => $user); + $api_instance->create_users_with_array_input(body => $body); }; if ($@) { warn "Exception when calling UserApi->create_users_with_array_input: $@\n"; @@ -90,7 +90,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **body** | [**ARRAY[User]**](User.md)| List of user object | ### Return type @@ -102,13 +102,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_users_with_list_input** -> create_users_with_list_input(user => $user) +> create_users_with_list_input(body => $body) Creates list of users with given input array @@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_list_input(user => $user); + $api_instance->create_users_with_list_input(body => $body); }; if ($@) { warn "Exception when calling UserApi->create_users_with_list_input: $@\n"; @@ -133,7 +133,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **body** | [**ARRAY[User]**](User.md)| List of user object | ### Return type @@ -145,7 +145,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -325,7 +325,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_user** -> update_user(username => $username, user => $user) +> update_user(username => $username, body => $body) Updated user @@ -339,10 +339,10 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( ); my $username = "username_example"; # string | name that need to be deleted -my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object +my $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object eval { - $api_instance->update_user(username => $username, user => $user); + $api_instance->update_user(username => $username, body => $body); }; if ($@) { warn "Exception when calling UserApi->update_user: $@\n"; @@ -354,7 +354,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **string**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | + **body** | [**User**](User.md)| Updated user object | ### Return type @@ -366,7 +366,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm index cd1df44004d..e389921bd42 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm @@ -53,10 +53,10 @@ sub new { # # To test special tags # -# @param Client $client client model (required) +# @param Client $body client model (required) { my $params = { - 'client' => { + 'body' => { data_type => 'Client', description => 'client model', required => '1', @@ -73,9 +73,9 @@ sub new { sub call_123_test_special_tags { my ($self, %args) = @_; - # verify the required parameter 'client' is set - unless (exists $args{'client'}) { - croak("Missing the required parameter 'client' when calling call_123_test_special_tags"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling call_123_test_special_tags"); } # parse inputs @@ -95,8 +95,8 @@ sub call_123_test_special_tags { my $_body_data; # body params - if ( exists $args{'client'}) { - $_body_data = $args{'client'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm index e7fc63fd102..f99f06bd87d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm @@ -348,12 +348,6 @@ sub update_params_for_auth { $query_params->{'api_key_query'} = $api_key; } } - elsif ($auth eq 'bearer_test') { - // this endpoint requires Bearer (JWT) authentication (access token) - if ($self->{config}{access_token}) { - $headers['Authorization'] = 'Bearer ' . $self->{config}{access_token}; - } - } elsif ($auth eq 'http_basic_test') { if ($self->{config}{username} || $self->{config}{password}) { $header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index 29dcd10fe83..5309ef4b29c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -49,52 +49,64 @@ sub new { # -# fake_health_get +# create_xml_item # -# Health check endpoint +# creates an XmlItem # +# @param XmlItem $xml_item XmlItem Body (required) { my $params = { + 'xml_item' => { + data_type => 'XmlItem', + description => 'XmlItem Body', + required => '1', + }, }; - __PACKAGE__->method_documentation->{ 'fake_health_get' } = { - summary => 'Health check endpoint', + __PACKAGE__->method_documentation->{ 'create_xml_item' } = { + summary => 'creates an XmlItem', params => $params, - returns => 'HealthCheckResult', + returns => undef, }; } -# @return HealthCheckResult +# @return void # -sub fake_health_get { +sub create_xml_item { my ($self, %args) = @_; - # parse inputs - my $_resource_path = '/fake/health'; + # verify the required parameter 'xml_item' is set + unless (exists $args{'xml_item'}) { + croak("Missing the required parameter 'xml_item' when calling create_xml_item"); + } - my $_method = 'GET'; + # parse inputs + my $_resource_path = '/fake/create_xml_item'; + + my $_method = 'POST'; my $query_params = {}; my $header_params = {}; my $form_params = {}; # 'Accept' and 'Content-Type' header - my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + my $_header_accept = $self->{api_client}->select_header_accept(); if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16'); my $_body_data; + # body params + if ( exists $args{'xml_item'}) { + $_body_data = $args{'xml_item'}; + } + # authentication setting, if any my $auth_settings = [qw()]; # make the API Call - my $response = $self->{api_client}->call_api($_resource_path, $_method, + $self->{api_client}->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings); - if (!$response) { - return; - } - my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response); - return $_response_object; + return; } # @@ -135,7 +147,7 @@ sub fake_outer_boolean_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params @@ -162,10 +174,10 @@ sub fake_outer_boolean_serialize { # # # -# @param OuterComposite $outer_composite Input composite as post body (optional) +# @param OuterComposite $body Input composite as post body (optional) { my $params = { - 'outer_composite' => { + 'body' => { data_type => 'OuterComposite', description => 'Input composite as post body', required => '0', @@ -195,12 +207,12 @@ sub fake_outer_composite_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params - if ( exists $args{'outer_composite'}) { - $_body_data = $args{'outer_composite'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -255,7 +267,7 @@ sub fake_outer_number_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params @@ -315,7 +327,7 @@ sub fake_outer_string_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params @@ -342,10 +354,10 @@ sub fake_outer_string_serialize { # # # -# @param FileSchemaTestClass $file_schema_test_class (required) +# @param FileSchemaTestClass $body (required) { my $params = { - 'file_schema_test_class' => { + 'body' => { data_type => 'FileSchemaTestClass', description => '', required => '1', @@ -362,9 +374,9 @@ sub fake_outer_string_serialize { sub test_body_with_file_schema { my ($self, %args) = @_; - # verify the required parameter 'file_schema_test_class' is set - unless (exists $args{'file_schema_test_class'}) { - croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling test_body_with_file_schema"); } # parse inputs @@ -384,8 +396,8 @@ sub test_body_with_file_schema { my $_body_data; # body params - if ( exists $args{'file_schema_test_class'}) { - $_body_data = $args{'file_schema_test_class'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -404,7 +416,7 @@ sub test_body_with_file_schema { # # # @param string $query (required) -# @param User $user (required) +# @param User $body (required) { my $params = { 'query' => { @@ -412,7 +424,7 @@ sub test_body_with_file_schema { description => '', required => '1', }, - 'user' => { + 'body' => { data_type => 'User', description => '', required => '1', @@ -434,9 +446,9 @@ sub test_body_with_query_params { croak("Missing the required parameter 'query' when calling test_body_with_query_params"); } - # verify the required parameter 'user' is set - unless (exists $args{'user'}) { - croak("Missing the required parameter 'user' when calling test_body_with_query_params"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling test_body_with_query_params"); } # parse inputs @@ -461,8 +473,8 @@ sub test_body_with_query_params { my $_body_data; # body params - if ( exists $args{'user'}) { - $_body_data = $args{'user'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -480,10 +492,10 @@ sub test_body_with_query_params { # # To test \"client\" model # -# @param Client $client client model (required) +# @param Client $body client model (required) { my $params = { - 'client' => { + 'body' => { data_type => 'Client', description => 'client model', required => '1', @@ -500,9 +512,9 @@ sub test_body_with_query_params { sub test_client_model { my ($self, %args) = @_; - # verify the required parameter 'client' is set - unless (exists $args{'client'}) { - croak("Missing the required parameter 'client' when calling test_client_model"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling test_client_model"); } # parse inputs @@ -522,8 +534,8 @@ sub test_client_model { my $_body_data; # body params - if ( exists $args{'client'}) { - $_body_data = $args{'client'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -1010,7 +1022,7 @@ sub test_group_parameters { my $_body_data; # authentication setting, if any - my $auth_settings = [qw(bearer_test )]; + my $auth_settings = [qw()]; # make the API Call $self->{api_client}->call_api($_resource_path, $_method, @@ -1024,10 +1036,10 @@ sub test_group_parameters { # # test inline additionalProperties # -# @param HASH[string,string] $request_body request body (required) +# @param HASH[string,string] $param request body (required) { my $params = { - 'request_body' => { + 'param' => { data_type => 'HASH[string,string]', description => 'request body', required => '1', @@ -1044,9 +1056,9 @@ sub test_group_parameters { sub test_inline_additional_properties { my ($self, %args) = @_; - # verify the required parameter 'request_body' is set - unless (exists $args{'request_body'}) { - croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties"); + # verify the required parameter 'param' is set + unless (exists $args{'param'}) { + croak("Missing the required parameter 'param' when calling test_inline_additional_properties"); } # parse inputs @@ -1066,8 +1078,8 @@ sub test_inline_additional_properties { my $_body_data; # body params - if ( exists $args{'request_body'}) { - $_body_data = $args{'request_body'}; + if ( exists $args{'param'}) { + $_body_data = $args{'param'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm index c521d2c5758..f57d72428c9 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm @@ -53,10 +53,10 @@ sub new { # # To test class name in snake case # -# @param Client $client client model (required) +# @param Client $body client model (required) { my $params = { - 'client' => { + 'body' => { data_type => 'Client', description => 'client model', required => '1', @@ -73,9 +73,9 @@ sub new { sub test_classname { my ($self, %args) = @_; - # verify the required parameter 'client' is set - unless (exists $args{'client'}) { - croak("Missing the required parameter 'client' when calling test_classname"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling test_classname"); } # parse inputs @@ -95,8 +95,8 @@ sub test_classname { my $_body_data; # body params - if ( exists $args{'client'}) { - $_body_data = $args{'client'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm index 8e30b03ea8f..55621de2d7b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm index efc94b94778..b66e305d9d5 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm index b7268ad68a6..0c12fffd5ba 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index 3bbbceeb84b..f388c3a4d1d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -161,16 +161,79 @@ __PACKAGE__->class_documentation({description => '', } ); __PACKAGE__->method_documentation({ - 'map_property' => { + 'map_string' => { datatype => 'HASH[string,string]', - base_name => 'map_property', + base_name => 'map_string', description => '', format => '', read_only => '', }, - 'map_of_map_property' => { + 'map_number' => { + datatype => 'HASH[string,double]', + base_name => 'map_number', + description => '', + format => '', + read_only => '', + }, + 'map_integer' => { + datatype => 'HASH[string,int]', + base_name => 'map_integer', + description => '', + format => '', + read_only => '', + }, + 'map_boolean' => { + datatype => 'HASH[string,boolean]', + base_name => 'map_boolean', + description => '', + format => '', + read_only => '', + }, + 'map_array_integer' => { + datatype => 'HASH[string,ARRAY[int]]', + base_name => 'map_array_integer', + description => '', + format => '', + read_only => '', + }, + 'map_array_anytype' => { + datatype => 'HASH[string,ARRAY[object]]', + base_name => 'map_array_anytype', + description => '', + format => '', + read_only => '', + }, + 'map_map_string' => { datatype => 'HASH[string,HASH[string,string]]', - base_name => 'map_of_map_property', + base_name => 'map_map_string', + description => '', + format => '', + read_only => '', + }, + 'map_map_anytype' => { + datatype => 'HASH[string,HASH[string,object]]', + base_name => 'map_map_anytype', + description => '', + format => '', + read_only => '', + }, + 'anytype_1' => { + datatype => 'object', + base_name => 'anytype_1', + description => '', + format => '', + read_only => '', + }, + 'anytype_2' => { + datatype => 'object', + base_name => 'anytype_2', + description => '', + format => '', + read_only => '', + }, + 'anytype_3' => { + datatype => 'object', + base_name => 'anytype_3', description => '', format => '', read_only => '', @@ -178,13 +241,31 @@ __PACKAGE__->method_documentation({ }); __PACKAGE__->openapi_types( { - 'map_property' => 'HASH[string,string]', - 'map_of_map_property' => 'HASH[string,HASH[string,string]]' + 'map_string' => 'HASH[string,string]', + 'map_number' => 'HASH[string,double]', + 'map_integer' => 'HASH[string,int]', + 'map_boolean' => 'HASH[string,boolean]', + 'map_array_integer' => 'HASH[string,ARRAY[int]]', + 'map_array_anytype' => 'HASH[string,ARRAY[object]]', + 'map_map_string' => 'HASH[string,HASH[string,string]]', + 'map_map_anytype' => 'HASH[string,HASH[string,object]]', + 'anytype_1' => 'object', + 'anytype_2' => 'object', + 'anytype_3' => 'object' } ); __PACKAGE__->attribute_map( { - 'map_property' => 'map_property', - 'map_of_map_property' => 'map_of_map_property' + 'map_string' => 'map_string', + 'map_number' => 'map_number', + 'map_integer' => 'map_integer', + 'map_boolean' => 'map_boolean', + 'map_array_integer' => 'map_array_integer', + 'map_array_anytype' => 'map_array_anytype', + 'map_map_string' => 'map_map_string', + 'map_map_anytype' => 'map_map_anytype', + 'anytype_1' => 'anytype_1', + 'anytype_2' => 'anytype_2', + 'anytype_3' => 'anytype_3' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm index da3887e899b..98ccc1329c0 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm index b742632d41e..6c20cd9b4cc 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm index bf10d33d38c..79ec11321c8 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm index 594f8489c8e..c91754dba18 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm index 66aaed54284..69f331f0ba9 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm @@ -31,6 +31,7 @@ use Date::Parse; use DateTime; use WWW::OpenAPIClient::Object::Animal; +use WWW::OpenAPIClient::Object::CatAllOf; use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::Animal"); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm new file mode 100644 index 00000000000..0e30dfe8a3d --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm @@ -0,0 +1,184 @@ +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +package WWW::OpenAPIClient::Object::CatAllOf; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. +# REF: https://openapi-generator.tech +# + +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + if (defined $self->{$_key}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + + +__PACKAGE__->class_documentation({description => '', + class => 'CatAllOf', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'declawed' => { + datatype => 'boolean', + base_name => 'declawed', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'declawed' => 'boolean' +} ); + +__PACKAGE__->attribute_map( { + 'declawed' => 'declawed' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm index e9a735f0e20..5b10bbfc0ff 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm @@ -31,6 +31,7 @@ use Date::Parse; use DateTime; use WWW::OpenAPIClient::Object::Animal; +use WWW::OpenAPIClient::Object::DogAllOf; use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::Animal"); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm new file mode 100644 index 00000000000..df524136e74 --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm @@ -0,0 +1,184 @@ +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +package WWW::OpenAPIClient::Object::DogAllOf; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. +# REF: https://openapi-generator.tech +# + +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# Do not edit the class manually. +# Ref: https://openapi-generator.tech +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + if (defined $self->{$_key}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + + +__PACKAGE__->class_documentation({description => '', + class => 'DogAllOf', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'breed' => { + datatype => 'string', + base_name => 'breed', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'breed' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'breed' => 'breed' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm index a563f72d70e..34585dee384 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm @@ -31,9 +31,6 @@ use Date::Parse; use DateTime; use WWW::OpenAPIClient::Object::OuterEnum; -use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; -use WWW::OpenAPIClient::Object::OuterEnumInteger; -use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use base ("Class::Accessor", "Class::Data::Inheritable"); @@ -200,27 +197,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - 'outer_enum_integer' => { - datatype => 'OuterEnumInteger', - base_name => 'outerEnumInteger', - description => '', - format => '', - read_only => '', - }, - 'outer_enum_default_value' => { - datatype => 'OuterEnumDefaultValue', - base_name => 'outerEnumDefaultValue', - description => '', - format => '', - read_only => '', - }, - 'outer_enum_integer_default_value' => { - datatype => 'OuterEnumIntegerDefaultValue', - base_name => 'outerEnumIntegerDefaultValue', - description => '', - format => '', - read_only => '', - }, }); __PACKAGE__->openapi_types( { @@ -228,10 +204,7 @@ __PACKAGE__->openapi_types( { 'enum_string_required' => 'string', 'enum_integer' => 'int', 'enum_number' => 'double', - 'outer_enum' => 'OuterEnum', - 'outer_enum_integer' => 'OuterEnumInteger', - 'outer_enum_default_value' => 'OuterEnumDefaultValue', - 'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue' + 'outer_enum' => 'OuterEnum' } ); __PACKAGE__->attribute_map( { @@ -239,10 +212,7 @@ __PACKAGE__->attribute_map( { 'enum_string_required' => 'enum_string_required', 'enum_integer' => 'enum_integer', 'enum_number' => 'enum_number', - 'outer_enum' => 'outerEnum', - 'outer_enum_integer' => 'outerEnumInteger', - 'outer_enum_default_value' => 'outerEnumDefaultValue', - 'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue' + 'outer_enum' => 'outerEnum' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index b3c1defbd7e..3a077d8fc9b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -252,20 +252,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - 'pattern_with_digits' => { - datatype => 'string', - base_name => 'pattern_with_digits', - description => 'A string that is a 10 digit number. Can have leading zeros.', - format => '', - read_only => '', - }, - 'pattern_with_digits_and_delimiter' => { - datatype => 'string', - base_name => 'pattern_with_digits_and_delimiter', - description => 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.', - format => '', - read_only => '', - }, }); __PACKAGE__->openapi_types( { @@ -281,9 +267,7 @@ __PACKAGE__->openapi_types( { 'date' => 'DateTime', 'date_time' => 'DateTime', 'uuid' => 'string', - 'password' => 'string', - 'pattern_with_digits' => 'string', - 'pattern_with_digits_and_delimiter' => 'string' + 'password' => 'string' } ); __PACKAGE__->attribute_map( { @@ -299,9 +283,7 @@ __PACKAGE__->attribute_map( { 'date' => 'date', 'date_time' => 'dateTime', 'uuid' => 'uuid', - 'password' => 'password', - 'pattern_with_digits' => 'pattern_with_digits', - 'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter' + 'password' => 'password' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm index 147a8d9abf3..69c427ec07a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm index f3e28b05051..84e327b9141 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm index d6e700b3623..19523d899f1 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm @@ -4,7 +4,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI 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 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -114,13 +114,20 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element); + } + $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -135,10 +142,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index f55d7b63834..70d56989012 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -53,10 +53,10 @@ sub new { # # Add a new pet to the store # -# @param Pet $pet Pet object that needs to be added to the store (required) +# @param Pet $body Pet object that needs to be added to the store (required) { my $params = { - 'pet' => { + 'body' => { data_type => 'Pet', description => 'Pet object that needs to be added to the store', required => '1', @@ -73,9 +73,9 @@ sub new { sub add_pet { my ($self, %args) = @_; - # verify the required parameter 'pet' is set - unless (exists $args{'pet'}) { - croak("Missing the required parameter 'pet' when calling add_pet"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling add_pet"); } # parse inputs @@ -95,8 +95,8 @@ sub add_pet { my $_body_data; # body params - if ( exists $args{'pet'}) { - $_body_data = $args{'pet'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -385,10 +385,10 @@ sub get_pet_by_id { # # Update an existing pet # -# @param Pet $pet Pet object that needs to be added to the store (required) +# @param Pet $body Pet object that needs to be added to the store (required) { my $params = { - 'pet' => { + 'body' => { data_type => 'Pet', description => 'Pet object that needs to be added to the store', required => '1', @@ -405,9 +405,9 @@ sub get_pet_by_id { sub update_pet { my ($self, %args) = @_; - # verify the required parameter 'pet' is set - unless (exists $args{'pet'}) { - croak("Missing the required parameter 'pet' when calling update_pet"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling update_pet"); } # parse inputs @@ -427,8 +427,8 @@ sub update_pet { my $_body_data; # body params - if ( exists $args{'pet'}) { - $_body_data = $args{'pet'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm index 3b87d3d8f73..cfd4a0a29fc 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm @@ -232,10 +232,10 @@ sub get_order_by_id { # # Place an order for a pet # -# @param Order $order order placed for purchasing the pet (required) +# @param Order $body order placed for purchasing the pet (required) { my $params = { - 'order' => { + 'body' => { data_type => 'Order', description => 'order placed for purchasing the pet', required => '1', @@ -252,9 +252,9 @@ sub get_order_by_id { sub place_order { my ($self, %args) = @_; - # verify the required parameter 'order' is set - unless (exists $args{'order'}) { - croak("Missing the required parameter 'order' when calling place_order"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling place_order"); } # parse inputs @@ -270,12 +270,12 @@ sub place_order { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params - if ( exists $args{'order'}) { - $_body_data = $args{'order'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm index 15bb4b97a3c..3d3dfab9c7d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm @@ -53,10 +53,10 @@ sub new { # # Create user # -# @param User $user Created user object (required) +# @param User $body Created user object (required) { my $params = { - 'user' => { + 'body' => { data_type => 'User', description => 'Created user object', required => '1', @@ -73,9 +73,9 @@ sub new { sub create_user { my ($self, %args) = @_; - # verify the required parameter 'user' is set - unless (exists $args{'user'}) { - croak("Missing the required parameter 'user' when calling create_user"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling create_user"); } # parse inputs @@ -91,12 +91,12 @@ sub create_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params - if ( exists $args{'user'}) { - $_body_data = $args{'user'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -114,10 +114,10 @@ sub create_user { # # Creates list of users with given input array # -# @param ARRAY[User] $user List of user object (required) +# @param ARRAY[User] $body List of user object (required) { my $params = { - 'user' => { + 'body' => { data_type => 'ARRAY[User]', description => 'List of user object', required => '1', @@ -134,9 +134,9 @@ sub create_user { sub create_users_with_array_input { my ($self, %args) = @_; - # verify the required parameter 'user' is set - unless (exists $args{'user'}) { - croak("Missing the required parameter 'user' when calling create_users_with_array_input"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling create_users_with_array_input"); } # parse inputs @@ -152,12 +152,12 @@ sub create_users_with_array_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params - if ( exists $args{'user'}) { - $_body_data = $args{'user'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -175,10 +175,10 @@ sub create_users_with_array_input { # # Creates list of users with given input array # -# @param ARRAY[User] $user List of user object (required) +# @param ARRAY[User] $body List of user object (required) { my $params = { - 'user' => { + 'body' => { data_type => 'ARRAY[User]', description => 'List of user object', required => '1', @@ -195,9 +195,9 @@ sub create_users_with_array_input { sub create_users_with_list_input { my ($self, %args) = @_; - # verify the required parameter 'user' is set - unless (exists $args{'user'}) { - croak("Missing the required parameter 'user' when calling create_users_with_list_input"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling create_users_with_list_input"); } # parse inputs @@ -213,12 +213,12 @@ sub create_users_with_list_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; # body params - if ( exists $args{'user'}) { - $_body_data = $args{'user'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any @@ -493,7 +493,7 @@ sub logout_user { # Updated user # # @param string $username name that need to be deleted (required) -# @param User $user Updated user object (required) +# @param User $body Updated user object (required) { my $params = { 'username' => { @@ -501,7 +501,7 @@ sub logout_user { description => 'name that need to be deleted', required => '1', }, - 'user' => { + 'body' => { data_type => 'User', description => 'Updated user object', required => '1', @@ -523,9 +523,9 @@ sub update_user { croak("Missing the required parameter 'username' when calling update_user"); } - # verify the required parameter 'user' is set - unless (exists $args{'user'}) { - croak("Missing the required parameter 'user' when calling update_user"); + # verify the required parameter 'body' is set + unless (exists $args{'body'}) { + croak("Missing the required parameter 'body' when calling update_user"); } # parse inputs @@ -541,7 +541,7 @@ sub update_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); # path params if ( exists $args{'username'}) { @@ -552,8 +552,8 @@ sub update_user { my $_body_data; # body params - if ( exists $args{'user'}) { - $_body_data = $args{'user'}; + if ( exists $args{'body'}) { + $_body_data = $args{'body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/t/AnotherFakeApiTest.t b/samples/client/petstore/perl/t/AnotherFakeApiTest.t new file mode 100644 index 00000000000..52d6452f0a3 --- /dev/null +++ b/samples/client/petstore/perl/t/AnotherFakeApiTest.t @@ -0,0 +1,41 @@ +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by OpenAPI Generator +# Please update the test cases below to test the API endpoints. +# Ref: https://openapi-generator.tech +# +use Test::More tests => 1; #TODO update number of test cases +use Test::Exception; + +use lib 'lib'; +use strict; +use warnings; + +use_ok('WWW::OpenAPIClient::AnotherFakeApi'); + +my $api = WWW::OpenAPIClient::AnotherFakeApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::AnotherFakeApi'); + +# +# call_123_test_special_tags test +# +{ + my $body = undef; # replace NULL with a proper value + my $result = $api->call_123_test_special_tags(body => $body); +} + + +1; diff --git a/samples/client/petstore/perl/t/CatAllOfTest.t b/samples/client/petstore/perl/t/CatAllOfTest.t new file mode 100644 index 00000000000..4cccac8672e --- /dev/null +++ b/samples/client/petstore/perl/t/CatAllOfTest.t @@ -0,0 +1,33 @@ +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by the OpenAPI Generator +# Please update the test cases below to test the model. +# Ref: https://openapi-generator.tech +# +use Test::More tests => 2; +use Test::Exception; + +use lib 'lib'; +use strict; +use warnings; + + +use_ok('WWW::OpenAPIClient::Object::CatAllOf'); + +my $instance = WWW::OpenAPIClient::Object::CatAllOf->new(); + +isa_ok($instance, 'WWW::OpenAPIClient::Object::CatAllOf'); + diff --git a/samples/client/petstore/perl/t/DogAllOfTest.t b/samples/client/petstore/perl/t/DogAllOfTest.t new file mode 100644 index 00000000000..441bfc78633 --- /dev/null +++ b/samples/client/petstore/perl/t/DogAllOfTest.t @@ -0,0 +1,33 @@ +=begin comment + +OpenAPI 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: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech + +=end comment + +=cut + +# +# NOTE: This class is auto generated by the OpenAPI Generator +# Please update the test cases below to test the model. +# Ref: https://openapi-generator.tech +# +use Test::More tests => 2; +use Test::Exception; + +use lib 'lib'; +use strict; +use warnings; + + +use_ok('WWW::OpenAPIClient::Object::DogAllOf'); + +my $instance = WWW::OpenAPIClient::Object::DogAllOf->new(); + +isa_ok($instance, 'WWW::OpenAPIClient::Object::DogAllOf'); + From 2b554133717a973208026c56e495f150bc8f7a1d Mon Sep 17 00:00:00 2001 From: Johan Brandhorst Date: Tue, 25 Jun 2019 05:02:20 +0100 Subject: [PATCH 67/73] [Go][Client] Use configured Scheme and Host in requests (#3115) * [Go][Client] Ensure test errors don't crash Previously we did not interrupt execution of a test case when an error was returned from an API call. This was causing the tests to crash as soon as we try to dereference the response. We now fail the tests as soon as the first API error is received. * [Go][Client] Use configured Scheme and Host in requests Previously we were simply setting the Host header and completely ignoring the configured scheme. --- .../src/main/resources/go/client.mustache | 15 +- samples/client/petstore/go/auth_test.go | 59 +++-- samples/client/petstore/go/fake_api_test.go | 3 +- .../petstore/go/go-petstore-withXml/client.go | 15 +- .../client/petstore/go/go-petstore/client.go | 15 +- samples/client/petstore/go/pet_api_test.go | 40 ++- samples/client/petstore/go/store_api_test.go | 3 +- samples/client/petstore/go/user_api_test.go | 21 +- .../go/go-petstore/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/README.md | 50 +++- .../petstore/go/go-petstore/api/openapi.yaml | 104 ++++++-- .../go/go-petstore/api_another_fake.go | 3 +- .../petstore/go/go-petstore/api_default.go | 3 +- .../petstore/go/go-petstore/api_fake.go | 27 +- .../go-petstore/api_fake_classname_tags123.go | 3 +- .../client/petstore/go/go-petstore/api_pet.go | 20 +- .../petstore/go/go-petstore/api_store.go | 10 +- .../petstore/go/go-petstore/api_user.go | 18 +- .../client/petstore/go/go-petstore/client.go | 26 +- .../docs/AdditionalPropertiesClass.md | 1 + .../petstore/go/go-petstore/docs/Animal.md | 1 + .../go/go-petstore/docs/AnotherFakeApi.md | 17 +- .../go/go-petstore/docs/ApiResponse.md | 1 + .../docs/ArrayOfArrayOfNumberOnly.md | 1 + .../go/go-petstore/docs/ArrayOfNumberOnly.md | 1 + .../petstore/go/go-petstore/docs/ArrayTest.md | 1 + .../go/go-petstore/docs/Capitalization.md | 1 + .../petstore/go/go-petstore/docs/Cat.md | 1 + .../petstore/go/go-petstore/docs/CatAllOf.md | 11 + .../petstore/go/go-petstore/docs/Category.md | 1 + .../go/go-petstore/docs/ClassModel.md | 1 + .../petstore/go/go-petstore/docs/Client.md | 1 + .../go/go-petstore/docs/DefaultApi.md | 13 +- .../petstore/go/go-petstore/docs/Dog.md | 1 + .../petstore/go/go-petstore/docs/DogAllOf.md | 11 + .../go/go-petstore/docs/EnumArrays.md | 1 + .../petstore/go/go-petstore/docs/EnumClass.md | 1 + .../petstore/go/go-petstore/docs/EnumTest.md | 1 + .../petstore/go/go-petstore/docs/FakeApi.md | 235 ++++++++++++------ .../docs/FakeClassnameTags123Api.md | 17 +- .../petstore/go/go-petstore/docs/File.md | 1 + .../go-petstore/docs/FileSchemaTestClass.md | 1 + .../petstore/go/go-petstore/docs/Foo.md | 1 + .../go/go-petstore/docs/FormatTest.md | 1 + .../go/go-petstore/docs/HasOnlyReadOnly.md | 1 + .../go/go-petstore/docs/HealthCheckResult.md | 1 + .../go/go-petstore/docs/InlineObject.md | 1 + .../go/go-petstore/docs/InlineObject1.md | 1 + .../go/go-petstore/docs/InlineObject2.md | 1 + .../go/go-petstore/docs/InlineObject3.md | 1 + .../go/go-petstore/docs/InlineObject4.md | 1 + .../go/go-petstore/docs/InlineObject5.md | 1 + .../go-petstore/docs/InlineResponseDefault.md | 1 + .../petstore/go/go-petstore/docs/List.md | 1 + .../petstore/go/go-petstore/docs/MapTest.md | 1 + ...dPropertiesAndAdditionalPropertiesClass.md | 1 + .../go/go-petstore/docs/Model200Response.md | 1 + .../petstore/go/go-petstore/docs/Name.md | 1 + .../go/go-petstore/docs/NullableClass.md | 22 ++ .../go/go-petstore/docs/NumberOnly.md | 1 + .../petstore/go/go-petstore/docs/Order.md | 1 + .../go/go-petstore/docs/OuterComposite.md | 1 + .../petstore/go/go-petstore/docs/OuterEnum.md | 1 + .../go-petstore/docs/OuterEnumDefaultValue.md | 1 + .../go/go-petstore/docs/OuterEnumInteger.md | 1 + .../docs/OuterEnumIntegerDefaultValue.md | 1 + .../petstore/go/go-petstore/docs/Pet.md | 1 + .../petstore/go/go-petstore/docs/PetApi.md | 163 ++++++++---- .../go/go-petstore/docs/ReadOnlyFirst.md | 1 + .../petstore/go/go-petstore/docs/Return.md | 1 + .../go/go-petstore/docs/SpecialModelName.md | 1 + .../petstore/go/go-petstore/docs/StoreApi.md | 64 +++-- .../petstore/go/go-petstore/docs/Tag.md | 1 + .../petstore/go/go-petstore/docs/User.md | 1 + .../petstore/go/go-petstore/docs/UserApi.md | 136 ++++++---- .../go/go-petstore/model_cat_all_of.go | 14 ++ .../go/go-petstore/model_dog_all_of.go | 14 ++ .../go/go-petstore/model_nullable_class.go | 28 +++ 78 files changed, 834 insertions(+), 394 deletions(-) create mode 100644 samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md create mode 100644 samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md create mode 100644 samples/openapi3/client/petstore/go/go-petstore/docs/NullableClass.md create mode 100644 samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go create mode 100644 samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go create mode 100644 samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 71db41037b2..c67976ea72f 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -244,6 +244,16 @@ func (c *APIClient) prepareRequest( return nil, err } + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -274,11 +284,6 @@ func (c *APIClient) prepareRequest( localVarRequest.Header = headers } - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go index ab152c98d1f..5f817703a88 100644 --- a/samples/client/petstore/go/auth_test.go +++ b/samples/client/petstore/go/auth_test.go @@ -43,8 +43,7 @@ func TestOAuth2(t *testing.T) { r, err := client.PetApi.AddPet(context.Background(), newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -53,8 +52,7 @@ func TestOAuth2(t *testing.T) { r, err = client.PetApi.DeletePet(auth, 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -79,8 +77,7 @@ func TestBasicAuth(t *testing.T) { r, err := client.PetApi.AddPet(auth, newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -89,8 +86,7 @@ func TestBasicAuth(t *testing.T) { r, err = client.PetApi.DeletePet(auth, 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -110,8 +106,7 @@ func TestAccessToken(t *testing.T) { r, err := client.PetApi.AddPet(nil, newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -120,8 +115,7 @@ func TestAccessToken(t *testing.T) { r, err = client.PetApi.DeletePet(auth, 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -141,8 +135,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { r, err := client.PetApi.AddPet(context.Background(), newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -150,8 +143,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { _, r, err = client.PetApi.GetPetById(auth, 12992) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } reqb, _ := httputil.DumpRequest(r.Request, true) @@ -161,8 +153,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { r, err = client.PetApi.DeletePet(auth, 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -178,8 +169,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { r, err := client.PetApi.AddPet(nil, newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -187,8 +177,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { _, r, err = client.PetApi.GetPetById(auth, 12992) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } reqb, _ := httputil.DumpRequest(r.Request, true) @@ -198,8 +187,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { r, err = client.PetApi.DeletePet(auth, 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -214,8 +202,7 @@ func TestDefaultHeader(t *testing.T) { r, err := client.PetApi.AddPet(context.Background(), newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -224,8 +211,7 @@ func TestDefaultHeader(t *testing.T) { r, err = client.PetApi.DeletePet(context.Background(), 12992, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -240,15 +226,26 @@ func TestHostOverride(t *testing.T) { _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) if err != nil { - t.Errorf("Error while finding pets by status") - t.Log(err) + t.Fatalf("Error while finding pets by status: %v", err) } - if r.Request.Host != testHost { + if r.Request.URL.Host != testHost { t.Errorf("Request Host is %v, expected %v", r.Request.Host, testHost) } } +func TestSchemeOverride(t *testing.T) { + _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + + if err != nil { + t.Fatalf("Error while finding pets by status: %v", err) + } + + if r.Request.URL.Scheme != testScheme { + t.Errorf("Request Scheme is %v, expected %v", r.Request.URL.Scheme, testScheme) + } +} + // Add custom clients to the context. func createContext(httpClient *http.Client) context.Context { parent := oauth2.NoContext diff --git a/samples/client/petstore/go/fake_api_test.go b/samples/client/petstore/go/fake_api_test.go index 94b7fee3ed5..f4242b5048c 100644 --- a/samples/client/petstore/go/fake_api_test.go +++ b/samples/client/petstore/go/fake_api_test.go @@ -20,8 +20,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index c666bcfe6ea..9c9943dd671 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -256,6 +256,16 @@ func (c *APIClient) prepareRequest( return nil, err } + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -286,11 +296,6 @@ func (c *APIClient) prepareRequest( localVarRequest.Header = headers } - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index e057b745291..e67a99338b8 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -255,6 +255,16 @@ func (c *APIClient) prepareRequest( return nil, err } + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -285,11 +295,6 @@ func (c *APIClient) prepareRequest( localVarRequest.Header = headers } - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index 0e23ca936e3..969fab1f667 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -14,12 +14,14 @@ import ( var client *sw.APIClient -const testHost = "testhost" +const testHost = "petstore.swagger.io:80" +const testScheme = "http" func TestMain(m *testing.M) { cfg := sw.NewConfiguration() cfg.AddDefaultHeader("testheader", "testvalue") cfg.Host = testHost + cfg.Scheme = testScheme client = sw.NewAPIClient(cfg) retCode := m.Run() os.Exit(retCode) @@ -32,8 +34,7 @@ func TestAddPet(t *testing.T) { r, err := client.PetApi.AddPet(context.Background(), newPet) if err != nil { - t.Errorf("Error while adding pet") - t.Log(err) + t.Fatalf("Error while adding pet: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -44,8 +45,7 @@ func TestFindPetsByStatusWithMissingParam(t *testing.T) { _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) if err != nil { - t.Errorf("Error while testing TestFindPetsByStatusWithMissingParam") - t.Log(err) + t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -66,8 +66,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) { a.Contains(assertedError.Error(), "Not Found") } else if err != nil { - t.Errorf("Error while getting pet by invalid id") - t.Log(err) + t.Fatalf("Error while getting pet by invalid id: %v", err) t.Log(r) } else { t.Log(resp) @@ -80,8 +79,7 @@ func TestUpdatePetWithForm(t *testing.T) { Status: optional.NewString("available"), }) if err != nil { - t.Errorf("Error while updating pet by id") - t.Log(err) + t.Fatalf("Error while updating pet by id: %v", err) t.Log(r) } if r.StatusCode != 200 { @@ -96,8 +94,7 @@ func TestFindPetsByTag(t *testing.T) { var found = false resp, r, err := client.PetApi.FindPetsByTags(context.Background(), []string{"tag2"}) if err != nil { - t.Errorf("Error while getting pet by tag") - t.Log(err) + t.Fatalf("Error while getting pet by tag: %v", err) t.Log(r) } else { if len(resp) == 0 { @@ -126,8 +123,7 @@ func TestFindPetsByTag(t *testing.T) { func TestFindPetsByStatus(t *testing.T) { resp, r, err := client.PetApi.FindPetsByStatus(context.Background(), []string{"available"}) if err != nil { - t.Errorf("Error while getting pet by id") - t.Log(err) + t.Fatalf("Error while getting pet by id: %v", err) t.Log(r) } else { if len(resp) == 0 { @@ -154,8 +150,7 @@ func TestUploadFile(t *testing.T) { }) if err != nil { - t.Errorf("Error while uploading file") - t.Log(err) + t.Fatalf("Error while uploading file: %v", err) } if r.StatusCode != 200 { @@ -174,8 +169,7 @@ func TestUploadFileRequired(t *testing.T) { }) if err != nil { - t.Errorf("Error while uploading file") - t.Log(err) + t.Fatalf("Error while uploading file: %v", err) } if r.StatusCode != 200 { @@ -187,8 +181,7 @@ func TestDeletePet(t *testing.T) { r, err := client.PetApi.DeletePet(context.Background(), 12830, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -269,8 +262,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) { for i := 0; i < n; i++ { err := <-errc if err != nil { - t.Errorf("Error performing concurrent test") - t.Log(err) + t.Fatalf("Error performing concurrent test: %v", err) } } } @@ -279,8 +271,7 @@ func deletePet(t *testing.T, id int64) { r, err := client.PetApi.DeletePet(context.Background(), id, nil) if err != nil { - t.Errorf("Error while deleting pet by id") - t.Log(err) + t.Fatalf("Error while deleting pet by id: %v", err) } if r.StatusCode != 200 { t.Log(r) @@ -291,8 +282,7 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) { assert := assert.New(t) resp, r, err := client.PetApi.GetPetById(context.Background(), id) if err != nil { - t.Errorf("Error while getting pet by id") - t.Log(err) + t.Fatalf("Error while getting pet by id: %v", err) } else { assert.Equal(resp.Id, int64(id), "Pet id should be equal") assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) diff --git a/samples/client/petstore/go/store_api_test.go b/samples/client/petstore/go/store_api_test.go index 72191d0dd61..3088adf7b40 100644 --- a/samples/client/petstore/go/store_api_test.go +++ b/samples/client/petstore/go/store_api_test.go @@ -28,9 +28,8 @@ func TestPlaceOrder(t *testing.T) { MatchString(err.Error()) { t.Log("Skipping error for parsing time with `+0000` UTC offset as Petstore Test Server does not return valid RFC 3339 datetime") } else { - t.Errorf("Error while placing order") + t.Fatalf("Error while placing order: %v", err) } - t.Log(err) } if r.StatusCode != 200 { t.Log(r) diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go index 67995a160ad..012c608fab6 100644 --- a/samples/client/petstore/go/user_api_test.go +++ b/samples/client/petstore/go/user_api_test.go @@ -23,8 +23,7 @@ func TestCreateUser(t *testing.T) { apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser) if err != nil { - t.Errorf("Error while adding user") - t.Log(err) + t.Fatalf("Error while adding user: %v", err) } if apiResponse.StatusCode != 200 { t.Log(apiResponse) @@ -58,8 +57,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background(), newUsers) if err != nil { - t.Errorf("Error while adding users") - t.Log(err) + t.Fatalf("Error while adding users: %v", err) } if apiResponse.StatusCode != 200 { t.Log(apiResponse) @@ -84,8 +82,7 @@ func TestGetUserByName(t *testing.T) { resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") if err != nil { - t.Errorf("Error while getting user by id") - t.Log(err) + t.Fatalf("Error while getting user by id: %v", err) } else { assert.Equal(resp.Id, int64(1000), "User id should be equal") assert.Equal(resp.Username, "gopher", "User name should be gopher") @@ -102,8 +99,7 @@ func TestGetUserByNameWithInvalidID(t *testing.T) { if apiResponse != nil && apiResponse.StatusCode == 404 { return // This is a pass condition. API will return with a 404 error. } else if err != nil { - t.Errorf("Error while getting user by invalid id") - t.Log(err) + t.Fatalf("Error while getting user by invalid id: %v", err) t.Log(apiResponse) } else { t.Log(resp) @@ -128,8 +124,7 @@ func TestUpdateUser(t *testing.T) { apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser) if err != nil { - t.Errorf("Error while deleting user by id") - t.Log(err) + t.Fatalf("Error while deleting user by id: %v", err) } if apiResponse.StatusCode != 200 { t.Log(apiResponse) @@ -138,8 +133,7 @@ func TestUpdateUser(t *testing.T) { //verify changings are correct resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") if err != nil { - t.Errorf("Error while getting user by id") - t.Log(err) + t.Fatalf("Error while getting user by id: %v", err) } else { assert.Equal(resp.Id, int64(1000), "User id should be equal") assert.Equal(resp.FirstName, "gopher20", "User name should be gopher") @@ -151,8 +145,7 @@ func TestDeleteUser(t *testing.T) { apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher") if err != nil { - t.Errorf("Error while deleting user") - t.Log(err) + t.Fatalf("Error while deleting user: %v", err) } if apiResponse.StatusCode != 200 { t.Log(apiResponse) diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index afa63656064..d96260ba335 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 4a51fe4074f..82f28d6e265 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -12,7 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation Install the following dependencies: -``` + +```shell go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context @@ -20,6 +21,7 @@ go get github.com/antihax/optional ``` Put the package under your project folder and add the following in import: + ```golang import "./petstore" ``` @@ -79,10 +81,12 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) @@ -104,6 +108,7 @@ Class | Method | HTTP request | Description - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) @@ -121,51 +126,71 @@ Class | Method | HTTP request | Description ## Documentation For Authorization + + ## api_key -- **Type**: API key + +- **Type**: API key Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. }) r, err := client.Service.Operation(auth, args) ``` + + ## api_key_query -- **Type**: API key + +- **Type**: API key Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. }) r, err := client.Service.Operation(auth, args) ``` + + ## bearer_test + - **Type**: HTTP basic authentication Example + ```golang auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", + UserName: "username", + Password: "password", }) r, err := client.Service.Operation(auth, args) ``` + + ## http_basic_test + - **Type**: HTTP basic authentication Example + ```golang auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", + UserName: "username", + Password: "password", }) r, err := client.Service.Operation(auth, args) ``` + + ## petstore_auth + + - **Type**: OAuth - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog @@ -174,12 +199,14 @@ r, err := client.Service.Operation(auth, args) - **read:pets**: read your pets Example + ```golang auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") r, err := client.Service.Operation(auth, args) ``` Or via OAuth2 module to automatically refresh tokens and perform user authentication. + ```golang import "golang.org/x/oauth2" @@ -190,6 +217,7 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) r, err := client.Service.Operation(auth, args) ``` + ## Author diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 2cd94b385f3..260820910af 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -130,7 +130,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -350,7 +351,8 @@ paths: - store /store/order/{order_id}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted @@ -370,7 +372,8 @@ paths: tags: - store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -604,7 +607,6 @@ paths: name: required_string_group required: true schema: - format: int32 type: integer style: form - description: Required Boolean in group parameters @@ -630,7 +632,6 @@ paths: name: string_group required: false schema: - format: int32 type: integer style: form - description: Boolean in group parameters @@ -803,7 +804,6 @@ paths: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1045,7 +1045,8 @@ paths: - $another-fake? /fake/body-with-file-schema: put: - description: For this test, the body for this request much reference a schema named `File`. + description: For this test, the body for this request much reference a schema + named `File`. operationId: testBodyWithFileSchema requestBody: content: @@ -1368,7 +1369,6 @@ components: property: type: string 123Number: - format: int32 readOnly: true type: integer required: @@ -1393,17 +1393,11 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object + - $ref: '#/components/schemas/Dog_allOf' Cat: allOf: - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object + - $ref: '#/components/schemas/Cat_allOf' Animal: discriminator: propertyName: className @@ -1423,7 +1417,6 @@ components: format_test: properties: integer: - format: int32 maximum: 100 minimum: 10 type: integer @@ -1478,7 +1471,8 @@ components: pattern: ^\d{10}$ type: string pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. pattern: /^image_\d{1,3}$/i type: string required: @@ -1625,6 +1619,7 @@ components: indirect_map: additionalProperties: type: boolean + type: object type: object ArrayTest: properties: @@ -1693,7 +1688,6 @@ components: - 0 - 1 - 2 - format: int32 type: integer OuterEnumDefaultValue: default: placed @@ -1708,7 +1702,6 @@ components: - 0 - 1 - 2 - format: int32 type: integer OuterComposite: example: @@ -1734,6 +1727,7 @@ components: StringBooleanMap: additionalProperties: type: boolean + type: object FileSchemaTestClass: example: file: @@ -1766,7 +1760,8 @@ components: xml: name: $special[model.name] HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. example: NullableMessage: NullableMessage properties: @@ -1774,6 +1769,64 @@ components: nullable: true type: string type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object inline_response_default: example: string: @@ -1824,7 +1877,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1917,6 +1969,14 @@ components: required: - requiredFile type: object + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go index f74f5bffd55..1c5c50d2e53 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -33,7 +32,7 @@ To test special tags and operation ID starting with number */ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, client Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go index 78cb5d9ae6e..1642ea1d22c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -31,7 +30,7 @@ DefaultApiService */ func (a *DefaultApiService) FooGet(ctx context.Context) (InlineResponseDefault, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index 94003cdd5aa..6dd6f996d1f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "github.com/antihax/optional" "os" ) @@ -33,7 +32,7 @@ FakeApiService Health check endpoint */ func (a *FakeApiService) FakeHealthGet(ctx context.Context) (HealthCheckResult, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -126,7 +125,7 @@ type FakeOuterBooleanSerializeOpts struct { func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -224,7 +223,7 @@ type FakeOuterCompositeSerializeOpts struct { func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -326,7 +325,7 @@ type FakeOuterNumberSerializeOpts struct { func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -424,7 +423,7 @@ type FakeOuterStringSerializeOpts struct { func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -515,7 +514,7 @@ For this test, the body for this request much reference a schema named `Fil */ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaTestClass FileSchemaTestClass) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -583,7 +582,7 @@ FakeApiService */ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, user User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -653,7 +652,7 @@ To test \"client\" model */ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -769,7 +768,7 @@ type TestEndpointParametersOpts struct { func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -913,7 +912,7 @@ type TestEnumParametersOpts struct { func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1016,7 +1015,7 @@ type TestGroupParametersOpts struct { func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1093,7 +1092,7 @@ FakeApiService test inline additionalProperties */ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, requestBody map[string]string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -1161,7 +1160,7 @@ FakeApiService test json serialization of form data */ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go index f5448af3597..c58af2fc260 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" ) // Linger please @@ -33,7 +32,7 @@ To test class name in snake case */ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, client Client) (Client, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") + localVarHttpMethod = http.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index a496a787982..564ca6cf47c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" "github.com/antihax/optional" "os" ) @@ -34,7 +34,7 @@ PetApiService Add a new pet to the store */ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -108,7 +108,7 @@ type DeletePetOpts struct { func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -179,7 +179,7 @@ Multiple status values can be provided with comma separated strings */ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -267,7 +267,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 */ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -355,7 +355,7 @@ Returns a single pet */ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -453,7 +453,7 @@ PetApiService Update an existing pet */ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -529,7 +529,7 @@ type UpdatePetWithFormOpts struct { func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -611,7 +611,7 @@ type UploadFileOpts struct { func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -724,7 +724,7 @@ type UploadFileWithRequiredFileOpts struct { func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index cec38c8c42b..39411cc6f67 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -33,7 +33,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or */ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -100,7 +100,7 @@ Returns a map of status codes to quantities */ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -199,7 +199,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val */ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -292,7 +292,7 @@ StoreApiService Place an order for a pet */ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_user.go b/samples/openapi3/client/petstore/go/go-petstore/api_user.go index 75eb29fd091..da7b38d1dfa 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_user.go @@ -14,8 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "strings" "fmt" + "strings" ) // Linger please @@ -33,7 +33,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -100,7 +100,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -167,7 +167,7 @@ UserApiService Creates list of users with given input array */ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = http.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -235,7 +235,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -302,7 +302,7 @@ UserApiService Get user by user name */ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -390,7 +390,7 @@ UserApiService Logs user into the system */ func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -476,7 +476,7 @@ UserApiService Logs out current logged in user session */ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -543,7 +543,7 @@ This can only be done by the logged in user. */ func (a *UserApiService) UpdateUser(ctx context.Context, username string, user User) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") + localVarHttpMethod = http.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index ca4d0d38465..db46607be28 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -232,10 +232,11 @@ func (c *APIClient) prepareRequest( if err != nil { return nil, err } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) w.Close() @@ -257,6 +258,16 @@ func (c *APIClient) prepareRequest( return nil, err } + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -287,11 +298,6 @@ func (c *APIClient) prepareRequest( localVarRequest.Header = headers } - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) @@ -331,6 +337,10 @@ func (c *APIClient) prepareRequest( } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } if xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err @@ -385,7 +395,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } else if jsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) + err = xml.NewEncoder(bodyBuf).Encode(body) } if err != nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md index 0c8ba7085b3..9668c3d6427 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md @@ -1,6 +1,7 @@ # AdditionalPropertiesClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapProperty** | **map[string]string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Animal.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Animal.md index d7113331a60..02d23377da6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Animal.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Animal.md @@ -1,6 +1,7 @@ # Animal ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 43c63231137..9c6ce64e293 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -7,7 +7,9 @@ Method | HTTP request | Description [**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags -# **Call123TestSpecialTags** + +## Call123TestSpecialTags + > Client Call123TestSpecialTags(ctx, client) To test special tags @@ -15,10 +17,11 @@ To test special tags and operation ID starting with number ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **client** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | ### Return type @@ -30,8 +33,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md index f9b16338ecd..41d28fb578c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md @@ -1,6 +1,7 @@ # ApiResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | **int32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index a53147b6270..555213013b2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -1,6 +1,7 @@ # ArrayOfArrayOfNumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md index 19031e76d20..56618756dd7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md @@ -1,6 +1,7 @@ # ArrayOfNumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayNumber** | **[]float32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayTest.md index a46d1acf665..0da0bc52d2d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ArrayTest.md @@ -1,6 +1,7 @@ # ArrayTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayOfString** | **[]string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Capitalization.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Capitalization.md index ac65ee37dba..426b8eabd9b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Capitalization.md @@ -1,6 +1,7 @@ # Capitalization ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SmallCamel** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Cat.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Cat.md index b51d5fd2b95..1ef1f095e94 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Cat.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Cat.md @@ -1,6 +1,7 @@ # Cat ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md new file mode 100644 index 00000000000..c978cee0417 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md @@ -0,0 +1,11 @@ +# CatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md index 1440215d225..01e8344bd06 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md @@ -1,6 +1,7 @@ # Category ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ClassModel.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ClassModel.md index 8d7a7284393..0b925cebb1f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ClassModel.md @@ -1,6 +1,7 @@ # ClassModel ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Class** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Client.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Client.md index fdf5fd9a69d..551da852eec 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Client.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Client.md @@ -1,6 +1,7 @@ # Client ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Client** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md index 5d1fe96684d..4fd0ab98720 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md @@ -7,11 +7,14 @@ Method | HTTP request | Description [**FooGet**](DefaultApi.md#FooGet) | **Get** /foo | -# **FooGet** + +## FooGet + > InlineResponseDefault FooGet(ctx, ) ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -24,8 +27,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Dog.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Dog.md index 13c0aa28e6b..ff35dd5cdca 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Dog.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Dog.md @@ -1,6 +1,7 @@ # Dog ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md new file mode 100644 index 00000000000..b87153e9265 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md @@ -0,0 +1,11 @@ +# DogAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Breed** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumArrays.md b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumArrays.md index 9eca8b29032..3021f881830 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumArrays.md @@ -1,6 +1,7 @@ # EnumArrays ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **JustSymbol** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumClass.md index 67f017becd0..c6932388c06 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumClass.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumClass.md @@ -1,6 +1,7 @@ # EnumClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumTest.md index 26c48e0c126..1fe92c432dc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/EnumTest.md @@ -1,6 +1,7 @@ # EnumTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumString** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index 62bb01be5c8..5695233a26c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -19,11 +19,14 @@ Method | HTTP request | Description [**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -# **FakeHealthGet** + +## FakeHealthGet + > HealthCheckResult FakeHealthGet(ctx, ) Health check endpoint ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -36,12 +39,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterBooleanSerialize -# **FakeOuterBooleanSerialize** > bool FakeOuterBooleanSerialize(ctx, optional) @@ -49,14 +56,17 @@ Test serialization of outer boolean types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.Bool**| Input boolean as post body | @@ -71,12 +81,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: */* +- **Content-Type**: application/json +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterCompositeSerialize -# **FakeOuterCompositeSerialize** > OuterComposite FakeOuterCompositeSerialize(ctx, optional) @@ -84,14 +98,17 @@ Test serialization of object with outer number type ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body | @@ -106,12 +123,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: */* +- **Content-Type**: application/json +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterNumberSerialize -# **FakeOuterNumberSerialize** > float32 FakeOuterNumberSerialize(ctx, optional) @@ -119,14 +140,17 @@ Test serialization of outer number types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.Float32**| Input number as post body | @@ -141,12 +165,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: */* +- **Content-Type**: application/json +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterStringSerialize -# **FakeOuterStringSerialize** > string FakeOuterStringSerialize(ctx, optional) @@ -154,14 +182,17 @@ Test serialization of outer string types ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **optional.String**| Input string as post body | @@ -176,12 +207,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: */* +- **Content-Type**: application/json +- **Accept**: */* -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithFileSchema -# **TestBodyWithFileSchema** > TestBodyWithFileSchema(ctx, fileSchemaTestClass) @@ -189,10 +224,11 @@ For this test, the body for this request much reference a schema named `File`. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -204,22 +240,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithQueryParams -# **TestBodyWithQueryParams** > TestBodyWithQueryParams(ctx, query, user) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **query** | **string**| | - **user** | [**User**](User.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**query** | **string**| | +**user** | [**User**](User.md)| | ### Return type @@ -231,12 +272,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestClientModel -# **TestClientModel** > Client TestClientModel(ctx, client) To test \"client\" model @@ -244,10 +289,11 @@ To test \"client\" model ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **client** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | ### Return type @@ -259,12 +305,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEndpointParameters -# **TestEndpointParameters** > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -272,18 +322,21 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **number** | **float32**| None | - **double** | **float64**| None | - **patternWithoutDelimiter** | **string**| None | - **byte_** | **string**| None | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**number** | **float32**| None | +**double** | **float64**| None | +**patternWithoutDelimiter** | **string**| None | +**byte_** | **string**| None | **optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -311,12 +364,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEnumParameters -# **TestEnumParameters** > TestEnumParameters(ctx, optional) To test enum parameters @@ -324,14 +381,17 @@ To test enum parameters ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestEnumParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) | @@ -353,12 +413,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestGroupParameters -# **TestGroupParameters** > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) Fake endpoint to test group parameters (optional) @@ -366,17 +430,20 @@ Fake endpoint to test group parameters (optional) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **requiredStringGroup** | **int32**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **int64**| Required Integer in group parameters | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**requiredStringGroup** | **int32**| Required String in group parameters | +**requiredBooleanGroup** | **bool**| Required Boolean in group parameters | +**requiredInt64Group** | **int64**| Required Integer in group parameters | **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a TestGroupParametersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -396,21 +463,26 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestInlineAdditionalProperties -# **TestInlineAdditionalProperties** > TestInlineAdditionalProperties(ctx, requestBody) test inline additionalProperties ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **requestBody** | [**map[string]string**](string.md)| request body | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**requestBody** | [**map[string]string**](string.md)| request body | ### Return type @@ -422,22 +494,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestJsonFormData -# **TestJsonFormData** > TestJsonFormData(ctx, param, param2) test json serialization of form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **param** | **string**| field1 | - **param2** | **string**| field2 | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**param** | **string**| field1 | +**param2** | **string**| field2 | ### Return type @@ -449,8 +526,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index db334ab5689..5bf7b3bcc99 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -7,7 +7,9 @@ Method | HTTP request | Description [**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case -# **TestClassname** + +## TestClassname + > Client TestClassname(ctx, client) To test class name in snake case @@ -15,10 +17,11 @@ To test class name in snake case ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **client** | [**Client**](Client.md)| client model | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | ### Return type @@ -30,8 +33,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/File.md b/samples/openapi3/client/petstore/go/go-petstore/docs/File.md index e7f7d80e05d..a113b0312cd 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/File.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/File.md @@ -1,6 +1,7 @@ # File ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SourceURI** | **string** | Test capitalization | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md index 69cbfa2c189..ae51414dd6c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md @@ -1,6 +1,7 @@ # FileSchemaTestClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **File** | [**File**](File.md) | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Foo.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Foo.md index 4900535886f..a5f66bcf525 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Foo.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Foo.md @@ -1,6 +1,7 @@ # Foo ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Bar** | **string** | | [optional] [default to bar] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md index 8801f1d5700..0bc27ab1c4b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md @@ -1,6 +1,7 @@ # FormatTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Integer** | **int32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md index c259e8b325a..9e2f4957359 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md @@ -1,6 +1,7 @@ # HasOnlyReadOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Bar** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/go/go-petstore/docs/HealthCheckResult.md index fa2d93d82aa..5c8c5861027 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/HealthCheckResult.md @@ -1,6 +1,7 @@ # HealthCheckResult ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **NullableMessage** | Pointer to **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject.md index ba0eb8201e2..3065b5f2433 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject.md @@ -1,6 +1,7 @@ # InlineObject ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Updated name of the pet | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject1.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject1.md index 0330fdd8ff7..0e4f031ae78 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject1.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject1.md @@ -1,6 +1,7 @@ # InlineObject1 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AdditionalMetadata** | **string** | Additional data to pass to server | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject2.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject2.md index dca7f2953e4..c7f889b63b5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject2.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject2.md @@ -1,6 +1,7 @@ # InlineObject2 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumFormStringArray** | **[]string** | Form parameter enum test (string array) | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject3.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject3.md index 398fa834485..8c5249fca4d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject3.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject3.md @@ -1,6 +1,7 @@ # InlineObject3 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Integer** | **int32** | None | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject4.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject4.md index ff4b519d951..988e4881314 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject4.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject4.md @@ -1,6 +1,7 @@ # InlineObject4 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Param** | **string** | field1 | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject5.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject5.md index c5d977bebe6..bcd135b5a97 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject5.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineObject5.md @@ -1,6 +1,7 @@ # InlineObject5 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AdditionalMetadata** | **string** | Additional data to pass to server | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineResponseDefault.md index e437c153a5f..071a391fbf3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/InlineResponseDefault.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/InlineResponseDefault.md @@ -1,6 +1,7 @@ # InlineResponseDefault ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **String** | [**Foo**](Foo.md) | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/List.md b/samples/openapi3/client/petstore/go/go-petstore/docs/List.md index 3255fa27868..bba2e529906 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/List.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/List.md @@ -1,6 +1,7 @@ # List ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Var123List** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/MapTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/MapTest.md index 49381ec4b85..6645e044658 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/MapTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/MapTest.md @@ -1,6 +1,7 @@ # MapTest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 0e5f61f6273..a2ce1068b27 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -1,6 +1,7 @@ # MixedPropertiesAndAdditionalPropertiesClass ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Uuid** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Model200Response.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Model200Response.md index c5abac20d86..27b93bd1549 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Model200Response.md @@ -1,6 +1,7 @@ # Model200Response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md index fccddf63899..453e54d9851 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md @@ -1,6 +1,7 @@ # Name ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/NullableClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableClass.md new file mode 100644 index 00000000000..7c70bd76808 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/NullableClass.md @@ -0,0 +1,22 @@ +# NullableClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegerProp** | Pointer to **int32** | | [optional] +**NumberProp** | Pointer to **float32** | | [optional] +**BooleanProp** | Pointer to **bool** | | [optional] +**StringProp** | Pointer to **string** | | [optional] +**DateProp** | Pointer to **string** | | [optional] +**DatetimeProp** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**ArrayNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ArrayAndItemsNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ArrayItemsNullable** | [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectAndItemsNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectItemsNullable** | [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/NumberOnly.md b/samples/openapi3/client/petstore/go/go-petstore/docs/NumberOnly.md index 4d2ea1b0413..604cf37eede 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/NumberOnly.md @@ -1,6 +1,7 @@ # NumberOnly ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **JustNumber** | **float32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md index befa9151a18..eeef0971005 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md @@ -1,6 +1,7 @@ # Order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterComposite.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterComposite.md index 30732cf10bf..df9bce1bd90 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterComposite.md @@ -1,6 +1,7 @@ # OuterComposite ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MyNumber** | **float32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnum.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnum.md index 06d413b0168..c97466159c5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnum.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnum.md @@ -1,6 +1,7 @@ # OuterEnum ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumDefaultValue.md index 1487a710393..823808a3d76 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumDefaultValue.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumDefaultValue.md @@ -1,6 +1,7 @@ # OuterEnumDefaultValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumInteger.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumInteger.md index 8be15eee6a2..b48e6b759a7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumInteger.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumInteger.md @@ -1,6 +1,7 @@ # OuterEnumInteger ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumIntegerDefaultValue.md index 27d962f106e..cdb350fc185 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/OuterEnumIntegerDefaultValue.md @@ -1,6 +1,7 @@ # OuterEnumIntegerDefaultValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md index 049c82eb5a0..c48104c6397 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md @@ -1,6 +1,7 @@ # Pet ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md index 481ce5e80e5..c4f37589f0c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -15,16 +15,19 @@ Method | HTTP request | Description [**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -# **AddPet** + +## AddPet + > AddPet(ctx, pet) Add a new pet to the store ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -36,26 +39,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePet -# **DeletePet** > DeletePet(ctx, petId, optional) Deletes a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| Pet id to delete | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a DeletePetOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -71,12 +81,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FindPetsByStatus -# **FindPetsByStatus** > []Pet FindPetsByStatus(ctx, status) Finds Pets by status @@ -84,10 +98,11 @@ Multiple status values can be provided with comma separated strings ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **status** | [**[]string**](string.md)| Status values that need to be considered for filter | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**status** | [**[]string**](string.md)| Status values that need to be considered for filter | ### Return type @@ -99,12 +114,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FindPetsByTags -# **FindPetsByTags** > []Pet FindPetsByTags(ctx, tags) Finds Pets by tags @@ -112,10 +131,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **tags** | [**[]string**](string.md)| Tags to filter by | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tags** | [**[]string**](string.md)| Tags to filter by | ### Return type @@ -127,12 +147,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPetById -# **GetPetById** > Pet GetPetById(ctx, petId) Find pet by ID @@ -140,10 +164,11 @@ Returns a single pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to return | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to return | ### Return type @@ -155,21 +180,26 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePet -# **UpdatePet** > UpdatePet(ctx, pet) Update an existing pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -181,26 +211,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePetWithForm -# **UpdatePetWithForm** > UpdatePetWithForm(ctx, petId, optional) Updates a pet in the store with form data ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet that needs to be updated | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -217,26 +254,33 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFile -# **UploadFile** > ApiResponse UploadFile(ctx, petId, optional) uploads an image ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to update | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UploadFileOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -253,27 +297,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFileWithRequiredFile -# **UploadFileWithRequiredFile** > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) uploads an image (required) ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to update | - **requiredFile** | ***os.File*****os.File**| file to upload | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | +**requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters ### Optional Parameters + Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -290,8 +341,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data - - **Accept**: application/json +- **Content-Type**: multipart/form-data +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md index b3546db3cc8..3fee799f295 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md @@ -1,6 +1,7 @@ # ReadOnlyFirst ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Bar** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Return.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Return.md index bcf50e4e5cd..11be0b27c50 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Return.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Return.md @@ -1,6 +1,7 @@ # Return ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Return** | **int32** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/SpecialModelName.md b/samples/openapi3/client/petstore/go/go-petstore/docs/SpecialModelName.md index 7b2dfb654c0..96d7a28a409 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/SpecialModelName.md @@ -1,6 +1,7 @@ # SpecialModelName ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md index fb9743b96d0..c7f9bbcee08 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md @@ -10,7 +10,9 @@ Method | HTTP request | Description [**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet -# **DeleteOrder** + +## DeleteOrder + > DeleteOrder(ctx, orderId) Delete purchase order by ID @@ -18,10 +20,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orderId** | **string**| ID of the order that needs to be deleted | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string**| ID of the order that needs to be deleted | ### Return type @@ -33,18 +36,23 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetInventory -# **GetInventory** > map[string]int32 GetInventory(ctx, ) Returns pet inventories by status Returns a map of status codes to quantities ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -57,12 +65,16 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrderById -# **GetOrderById** > Order GetOrderById(ctx, orderId) Find purchase order by ID @@ -70,10 +82,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orderId** | **int64**| ID of pet that needs to be fetched | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **int64**| ID of pet that needs to be fetched | ### Return type @@ -85,21 +98,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PlaceOrder -# **PlaceOrder** > Order PlaceOrder(ctx, order) Place an order for a pet ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **order** | [**Order**](Order.md)| order placed for purchasing the pet | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -111,8 +129,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/xml, application/json +- **Content-Type**: application/json +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md index acacb4f54a7..d6b3cc117b5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md @@ -1,6 +1,7 @@ # Tag ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go/go-petstore/docs/User.md index 87e1456c8a8..7675d7ff701 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/User.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/User.md @@ -1,6 +1,7 @@ # User ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md index 3784b31187d..6c443592e53 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md @@ -14,7 +14,9 @@ Method | HTTP request | Description [**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user -# **CreateUser** + +## CreateUser + > CreateUser(ctx, user) Create user @@ -22,10 +24,11 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **user** | [**User**](User.md)| Created user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**User**](User.md)| Created user object | ### Return type @@ -37,21 +40,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithArrayInput -# **CreateUsersWithArrayInput** > CreateUsersWithArrayInput(ctx, user) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **user** | [**[]User**](array.md)| List of user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**[]User**](User.md)| List of user object | ### Return type @@ -63,21 +71,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithListInput -# **CreateUsersWithListInput** > CreateUsersWithListInput(ctx, user) Creates list of users with given input array ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **user** | [**[]User**](array.md)| List of user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**[]User**](User.md)| List of user object | ### Return type @@ -89,12 +102,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser -# **DeleteUser** > DeleteUser(ctx, username) Delete user @@ -102,10 +119,11 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The name that needs to be deleted | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be deleted | ### Return type @@ -117,21 +135,26 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserByName -# **GetUserByName** > User GetUserByName(ctx, username) Get user by user name ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -143,22 +166,27 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LoginUser -# **LoginUser** > string LoginUser(ctx, username, password) Logs user into the system ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The user name for login | +**password** | **string**| The password for login in clear text | ### Return type @@ -170,16 +198,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LogoutUser -# **LogoutUser** > LogoutUser(ctx, ) Logs out current logged in user session ### Required Parameters + This endpoint does not need any parameter. ### Return type @@ -192,12 +225,16 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser -# **UpdateUser** > UpdateUser(ctx, username, user) Updated user @@ -205,11 +242,12 @@ This can only be done by the logged in user. ### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| name that need to be deleted | +**user** | [**User**](User.md)| Updated user object | ### Return type @@ -221,8 +259,10 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go new file mode 100644 index 00000000000..3c1d802bd41 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go @@ -0,0 +1,14 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore + +type CatAllOf struct { + Declawed bool `json:"declawed,omitempty"` +} diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go new file mode 100644 index 00000000000..a0db0aba4b5 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go @@ -0,0 +1,14 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore + +type DogAllOf struct { + Breed string `json:"breed,omitempty"` +} diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go new file mode 100644 index 00000000000..b0c0b536e06 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go @@ -0,0 +1,28 @@ +/* + * OpenAPI 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: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore +import ( + "time" +) + +type NullableClass struct { + IntegerProp *int32 `json:"integer_prop,omitempty"` + NumberProp *float32 `json:"number_prop,omitempty"` + BooleanProp *bool `json:"boolean_prop,omitempty"` + StringProp *string `json:"string_prop,omitempty"` + DateProp *string `json:"date_prop,omitempty"` + DatetimeProp *time.Time `json:"datetime_prop,omitempty"` + ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` + ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` + ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"` + ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` + ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` + ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` +} From 9518e2a02eb1b026fdebe763401874fd7b301363 Mon Sep 17 00:00:00 2001 From: Bernd Date: Tue, 25 Jun 2019 06:04:40 +0200 Subject: [PATCH 68/73] [typescript-rxjs] refactor to arrow functions and short hand object creation (#3077) * feat(typescript-rxjs): change BaseAPI to arrow functions, use shorthands where possible * feat(typescript-rxjs): replace null checking with throwIfRequired helper function in api controllers * feat(typescript-rxjs): use shorthand syntax for object creation of query and header params * feat(typescript-rxjs): provide fallback for previously exported RequiredError and querystring * refactor(typescript-rxjs): change order of query and headers definition * feat(typescript-rxjs): regenerate samples * fix(typescript-rxjs): missing closing curly * fix(typescript-rxjs): add condition to prevent undefined parameters in header or query params --- .../resources/typescript-rxjs/apis.mustache | 156 +++++----- .../typescript-rxjs/runtime.mustache | 76 +++-- .../builds/default/apis/PetApi.ts | 275 ++++++++---------- .../builds/default/apis/StoreApi.ts | 73 +++-- .../builds/default/apis/UserApi.ts | 165 +++++------ .../typescript-rxjs/builds/default/runtime.ts | 76 +++-- .../builds/es6-target/apis/PetApi.ts | 275 ++++++++---------- .../builds/es6-target/apis/StoreApi.ts | 73 +++-- .../builds/es6-target/apis/UserApi.ts | 165 +++++------ .../builds/es6-target/runtime.ts | 76 +++-- .../builds/with-interfaces/apis/PetApi.ts | 275 ++++++++---------- .../builds/with-interfaces/apis/StoreApi.ts | 73 +++-- .../builds/with-interfaces/apis/UserApi.ts | 165 +++++------ .../builds/with-interfaces/runtime.ts | 76 +++-- .../builds/with-npm-version/apis/PetApi.ts | 275 ++++++++---------- .../builds/with-npm-version/apis/StoreApi.ts | 73 +++-- .../builds/with-npm-version/apis/UserApi.ts | 165 +++++------ .../builds/with-npm-version/runtime.ts | 76 +++-- 18 files changed, 1175 insertions(+), 1413 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache index c394a87f283..fe486821daf 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache @@ -1,7 +1,7 @@ // tslint:disable {{>licenseInfo}} import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; {{#imports.0}} import { {{#imports}} @@ -37,105 +37,83 @@ export class {{classname}} extends BaseAPI { * {{&summary}} {{/summary}} */ - {{nickname}}({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + {{nickname}} = ({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> => { {{#allParams}} {{#required}} - if (requestParameters.{{paramName}} === null || requestParameters.{{paramName}} === undefined) { - throw new RequiredError('{{paramName}}','Required parameter requestParameters.{{paramName}} was null or undefined when calling {{nickname}}.'); - } - + throwIfRequired(requestParameters, '{{paramName}}', '{{nickname}}'); {{/required}} {{/allParams}} - const queryParameters: HttpQuery = {}; - {{#queryParams}} - {{#isListContainer}} - if (requestParameters.{{paramName}}) { + const headers: HttpHeaders = { + {{#bodyParam}} + {{^consumes}} + 'Content-Type': 'application/json', + {{/consumes}} + {{#consumes.0}} + 'Content-Type': '{{{mediaType}}}', + {{/consumes.0}} + {{/bodyParam}} + {{#headerParams}} + {{#isListContainer}} + ...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])) }), + {{/isListContainer}} + {{^isListContainer}} + ...(requestParameters.{{paramName}} && { '{{baseName}}': String(requestParameters.{{paramName}}) }), + {{/isListContainer}} + {{/headerParams}} + {{#authMethods}} + {{#isBasic}} + ...(this.configuration.username && this.configuration.password && { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` }), + {{/isBasic}} + {{#isApiKey}} + {{#isKeyInHeader}} + ...(this.configuration.apiKey && { '{{keyParamName}}': this.configuration.apiKey('{{keyParamName}}') }), // {{name}} authentication + {{/isKeyInHeader}} + {{/isApiKey}} + {{#isOAuth}} + // oauth required + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('{{name}}', [{{#scopes}}'{{{scope}}}'{{^-last}}, {{/-last}}{{/scopes}}]) + : this.configuration.accessToken) + }), + {{/isOAuth}} + {{/authMethods}} + }; + + const query: HttpQuery = { + {{#queryParams}} + {{#isListContainer}} {{#isCollectionFormatMulti}} - queryParameters['{{baseName}}'] = requestParameters.{{paramName}}; + ...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}} }), {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - queryParameters['{{baseName}}'] = requestParameters.{{paramName}}.join(COLLECTION_FORMATS["{{collectionFormat}}"]); + ...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']) }), {{/isCollectionFormatMulti}} - } - - {{/isListContainer}} - {{^isListContainer}} - if (requestParameters.{{paramName}} !== undefined && requestParameters.{{paramName}} !== null) { + {{/isListContainer}} + {{^isListContainer}} {{#isDateTime}} - queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString(); + ...(requestParameters.{{paramName}} && { '{{baseName}}': (requestParameters.{{paramName}} as any).toISOString() }), {{/isDateTime}} {{^isDateTime}} {{#isDate}} - queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString(); + ...(requestParameters.{{paramName}} && { '{{baseName}}': (requestParameters.{{paramName}} as any).toISOString() }), {{/isDate}} {{^isDate}} - queryParameters['{{baseName}}'] = requestParameters.{{paramName}}; + ...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}} }), {{/isDate}} {{/isDateTime}} - } + {{/isListContainer}} + {{/queryParams}} + {{#authMethods}} + {{#isApiKey}} + {{#isKeyInQuery}} + ...(this.configuration.apiKey && { '{{keyParamName}}': this.configuration.apiKey && this.configuration.apiKey('{{keyParamName}}') }), // {{name}} authentication + {{/isKeyInQuery}} + {{/isApiKey}} + {{/authMethods}} + }; - {{/isListContainer}} - {{/queryParams}} - const headerParameters: HttpHeaders = {}; - - {{#bodyParam}} - {{^consumes}} - headerParameters['Content-Type'] = 'application/json'; - - {{/consumes}} - {{#consumes.0}} - headerParameters['Content-Type'] = '{{{mediaType}}}'; - - {{/consumes.0}} - {{/bodyParam}} - {{#headerParams}} - {{#isListContainer}} - if (requestParameters.{{paramName}}) { - headerParameters['{{baseName}}'] = requestParameters.{{paramName}}.join(COLLECTION_FORMATS["{{collectionFormat}}"])); - } - - {{/isListContainer}} - {{^isListContainer}} - if (requestParameters.{{paramName}} !== undefined && requestParameters.{{paramName}} !== null) { - headerParameters['{{baseName}}'] = String(requestParameters.{{paramName}}); - } - - {{/isListContainer}} - {{/headerParams}} - {{#authMethods}} - {{#isBasic}} - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - - {{/isBasic}} - {{#isApiKey}} - {{#isKeyInHeader}} - if (this.configuration && this.configuration.apiKey) { - headerParameters["{{keyParamName}}"] = this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication - } - - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (this.configuration && this.configuration.apiKey) { - queryParameters["{{keyParamName}}"] = this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication - } - - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isOAuth}} - if (this.configuration && this.configuration.accessToken) { - // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } - - {{/isOAuth}} - {{/authMethods}} {{#hasFormParams}} const formData = new FormData(); {{/hasFormParams}} @@ -148,7 +126,7 @@ export class {{classname}} extends BaseAPI { }) {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - formData.append('{{baseName}}', requestParameters.{{paramName}}.join(COLLECTION_FORMATS["{{collectionFormat}}"])); + formData.append('{{baseName}}', requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); {{/isCollectionFormatMulti}} } @@ -161,10 +139,10 @@ export class {{classname}} extends BaseAPI { {{/isListContainer}} {{/formParams}} return this.request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>({ - path: `{{{path}}}`{{#pathParams}}.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters.{{paramName}}))){{/pathParams}}, + path: `{{{path}}}`{{#pathParams}}.replace({{=<% %>=}}`{<%baseName%>}`<%={{ }}=%>, encodeURIComponent(String(requestParameters.{{paramName}}))){{/pathParams}}, method: '{{httpMethod}}', - headers: headerParameters, - query: queryParameters, + headers, + query, {{#hasBodyParam}} {{#bodyParam}} {{#isContainer}} @@ -196,9 +174,9 @@ export class {{classname}} extends BaseAPI { {{#allParams}} {{#isEnum}} /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum {{operationIdCamelCase}}{{enumName}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache index a3644702312..19f893b62d3 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache @@ -55,30 +55,26 @@ export class Configuration { * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[]; + private middleware: Middleware[] = []; constructor(protected configuration = new Configuration()) { this.middleware = configuration.middleware; } - withMiddleware(this: T, ...middlewares: Middleware[]) { + withMiddleware = (middlewares: Middleware[]) => { const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); + next.middleware = next.middleware.concat(middlewares); return next; } - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - protected request(context: RequestOpts): Observable { - return this.rxjsRequest(this.createRequestArgs(context)).pipe( + protected request = (context: RequestOpts): Observable => + this.rxjsRequest(this.createRequestArgs(context)).pipe( map((res) => { if (res.status >= 200 && res.status < 300) { return res.response as T; @@ -86,15 +82,14 @@ export class BaseAPI { throw res; }) ); - } - private createRequestArgs(context: RequestOpts): RequestArgs { + private createRequestArgs = (context: RequestOpts): RequestArgs => { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. + // only add the queryString to the URL if there are query parameters. // this is done to avoid urls ending with a '?' character which buggy webservers // do not handle correctly sometimes. - url += '?' + querystring(context.query); + url += '?' + queryString(context.query); } const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body); const options = { @@ -105,9 +100,9 @@ export class BaseAPI { return { url, options }; } - private rxjsRequest(params: RequestContext): Observable { - const preMiddlewares = this.middleware && this.middleware.filter((item) => item.pre); - const postMiddlewares = this.middleware && this.middleware.filter((item) => item.post); + private rxjsRequest = (params: RequestContext): Observable => { + const preMiddlewares = this.middleware.filter((item) => item.pre); + const postMiddlewares = this.middleware.filter((item) => item.post); return of(params).pipe( map((args) => { @@ -133,19 +128,13 @@ export class BaseAPI { * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } + private clone = (): T => + Object.assign(Object.create(Object.getPrototypeOf(this)), this) } +// export for not being a breaking change export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } } export const COLLECTION_FORMATS = { @@ -175,17 +164,24 @@ export interface RequestOpts { body?: HttpBody; } -export function querystring(params: HttpQuery): string { - return Object.keys(params) - .map((key) => { - const value = params[key]; - if (value instanceof Array) { - return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) - .join('&'); - } - return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; - }) - .join('&'); +const queryString = (params: HttpQuery): string => Object.keys(params) + .map((key) => { + const value = params[key]; + if (value instanceof Array) { + return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) + .join('&'); + } + return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; + }) + .join('&'); + +// alias fallback for not being a breaking change +export const querystring = queryString; + +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] === null || params[key] === undefined) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } } export interface RequestContext extends RequestArgs {} diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts index dab74f1d7bf..8f8db90ce78 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { ApiResponse, Pet, @@ -63,31 +63,27 @@ export class PetApi extends BaseAPI { /** * Add a new pet to the store */ - addPet(requestParameters: AddPetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.'); - } + addPet = (requestParameters: AddPetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'addPet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -95,33 +91,27 @@ export class PetApi extends BaseAPI { /** * Deletes a pet */ - deletePet(requestParameters: DeletePetRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.'); - } + deletePet = (requestParameters: DeletePetRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'deletePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) { - headerParameters['api_key'] = String(requestParameters.apiKey); - } - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + ...(requestParameters.apiKey && { 'api_key': String(requestParameters.apiKey) }), // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -129,33 +119,27 @@ export class PetApi extends BaseAPI { * Multiple status values can be provided with comma separated strings * Finds Pets by status */ - findPetsByStatus(requestParameters: FindPetsByStatusRequest): Observable> { - if (requestParameters.status === null || requestParameters.status === undefined) { - throw new RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.'); - } + findPetsByStatus = (requestParameters: FindPetsByStatusRequest): Observable> => { + throwIfRequired(requestParameters, 'status', 'findPetsByStatus'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.status) { - queryParameters['status'] = requestParameters.status.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByStatus`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -163,33 +147,27 @@ export class PetApi extends BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - findPetsByTags(requestParameters: FindPetsByTagsRequest): Observable> { - if (requestParameters.tags === null || requestParameters.tags === undefined) { - throw new RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); - } + findPetsByTags = (requestParameters: FindPetsByTagsRequest): Observable> => { + throwIfRequired(requestParameters, 'tags', 'findPetsByTags'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.tags) { - queryParameters['tags'] = requestParameters.tags.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByTags`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -197,55 +175,48 @@ export class PetApi extends BaseAPI { * Returns a single pet * Find pet by ID */ - getPetById(requestParameters: GetPetByIdRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.'); - } + getPetById = (requestParameters: GetPetByIdRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'getPetById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Update an existing pet */ - updatePet(requestParameters: UpdatePetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.'); - } + updatePet = (requestParameters: UpdatePetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'updatePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -253,23 +224,20 @@ export class PetApi extends BaseAPI { /** * Updates a pet in the store with form data */ - updatePetWithForm(requestParameters: UpdatePetWithFormRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.'); - } + updatePetWithForm = (requestParameters: UpdatePetWithFormRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'updatePetWithForm'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.name !== undefined) { @@ -281,10 +249,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -292,23 +260,20 @@ export class PetApi extends BaseAPI { /** * uploads an image */ - uploadFile(requestParameters: UploadFileRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.'); - } + uploadFile = (requestParameters: UploadFileRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'uploadFile'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.additionalMetadata !== undefined) { @@ -320,10 +285,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}/uploadImage`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -331,9 +296,9 @@ export class PetApi extends BaseAPI { } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum FindPetsByStatusStatusEnum { Available = 'available', Pending = 'pending', diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts index c0755e5c98f..d7350a81516 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { Order, } from '../models'; @@ -38,20 +38,20 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID */ - deleteOrder(requestParameters: DeleteOrderRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.'); - } + deleteOrder = (requestParameters: DeleteOrderRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'deleteOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -59,20 +59,20 @@ export class StoreApi extends BaseAPI { * Returns a map of status codes to quantities * Returns pet inventories by status */ - getInventory(): Observable<{ [key: string]: number; }> { - const queryParameters: HttpQuery = {}; + getInventory = (): Observable<{ [key: string]: number; }> => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request<{ [key: string]: number; }>({ path: `/store/inventory`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -80,42 +80,41 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID */ - getOrderById(requestParameters: GetOrderByIdRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.'); - } + getOrderById = (requestParameters: GetOrderByIdRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'getOrderById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Place an order for a pet */ - placeOrder(requestParameters: PlaceOrderRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.'); - } + placeOrder = (requestParameters: PlaceOrderRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'placeOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/store/order`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts index dee6c06cbea..8b994caf6c8 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { User, } from '../models'; @@ -56,22 +56,21 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Create user */ - createUser(requestParameters: CreateUserRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.'); - } + createUser = (requestParameters: CreateUserRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -79,22 +78,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.'); - } + createUsersWithArrayInput = (requestParameters: CreateUsersWithArrayInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithArrayInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithArray`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -102,22 +100,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.'); - } + createUsersWithListInput = (requestParameters: CreateUsersWithListInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithListInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithList`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -126,88 +123,82 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Delete user */ - deleteUser(requestParameters: DeleteUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.'); - } + deleteUser = (requestParameters: DeleteUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'deleteUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Get user by user name */ - getUserByName(requestParameters: GetUserByNameRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.'); - } + getUserByName = (requestParameters: GetUserByNameRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'getUserByName'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs user into the system */ - loginUser(requestParameters: LoginUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.'); - } + loginUser = (requestParameters: LoginUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'loginUser'); + throwIfRequired(requestParameters, 'password', 'loginUser'); - if (requestParameters.password === null || requestParameters.password === undefined) { - throw new RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.'); - } + const headers: HttpHeaders = { + }; - const queryParameters: HttpQuery = {}; - - if (requestParameters.username !== undefined && requestParameters.username !== null) { - queryParameters['username'] = requestParameters.username; - } - - if (requestParameters.password !== undefined && requestParameters.password !== null) { - queryParameters['password'] = requestParameters.password; - } - - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + ...(requestParameters.username && { 'username': requestParameters.username }), + ...(requestParameters.password && { 'password': requestParameters.password }), + }; return this.request({ path: `/user/login`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs out current logged in user session */ - logoutUser(): Observable { - const queryParameters: HttpQuery = {}; + logoutUser = (): Observable => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + }; + + const query: HttpQuery = { + }; return this.request({ path: `/user/logout`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -215,26 +206,22 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Updated user */ - updateUser(requestParameters: UpdateUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.'); - } + updateUser = (requestParameters: UpdateUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'updateUser'); + throwIfRequired(requestParameters, 'body', 'updateUser'); - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.'); - } + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts index e28e284bf19..1d160d5d379 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts @@ -66,30 +66,26 @@ export class Configuration { * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[]; + private middleware: Middleware[] = []; constructor(protected configuration = new Configuration()) { this.middleware = configuration.middleware; } - withMiddleware(this: T, ...middlewares: Middleware[]) { + withMiddleware = (middlewares: Middleware[]) => { const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); + next.middleware = next.middleware.concat(middlewares); return next; } - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - protected request(context: RequestOpts): Observable { - return this.rxjsRequest(this.createRequestArgs(context)).pipe( + protected request = (context: RequestOpts): Observable => + this.rxjsRequest(this.createRequestArgs(context)).pipe( map((res) => { if (res.status >= 200 && res.status < 300) { return res.response as T; @@ -97,15 +93,14 @@ export class BaseAPI { throw res; }) ); - } - private createRequestArgs(context: RequestOpts): RequestArgs { + private createRequestArgs = (context: RequestOpts): RequestArgs => { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. + // only add the queryString to the URL if there are query parameters. // this is done to avoid urls ending with a '?' character which buggy webservers // do not handle correctly sometimes. - url += '?' + querystring(context.query); + url += '?' + queryString(context.query); } const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body); const options = { @@ -116,9 +111,9 @@ export class BaseAPI { return { url, options }; } - private rxjsRequest(params: RequestContext): Observable { - const preMiddlewares = this.middleware && this.middleware.filter((item) => item.pre); - const postMiddlewares = this.middleware && this.middleware.filter((item) => item.post); + private rxjsRequest = (params: RequestContext): Observable => { + const preMiddlewares = this.middleware.filter((item) => item.pre); + const postMiddlewares = this.middleware.filter((item) => item.post); return of(params).pipe( map((args) => { @@ -144,19 +139,13 @@ export class BaseAPI { * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } + private clone = (): T => + Object.assign(Object.create(Object.getPrototypeOf(this)), this) } +// export for not being a breaking change export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } } export const COLLECTION_FORMATS = { @@ -186,17 +175,24 @@ export interface RequestOpts { body?: HttpBody; } -export function querystring(params: HttpQuery): string { - return Object.keys(params) - .map((key) => { - const value = params[key]; - if (value instanceof Array) { - return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) - .join('&'); - } - return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; - }) - .join('&'); +const queryString = (params: HttpQuery): string => Object.keys(params) + .map((key) => { + const value = params[key]; + if (value instanceof Array) { + return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) + .join('&'); + } + return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; + }) + .join('&'); + +// alias fallback for not being a breaking change +export const querystring = queryString; + +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] === null || params[key] === undefined) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } } export interface RequestContext extends RequestArgs {} diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts index dab74f1d7bf..8f8db90ce78 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { ApiResponse, Pet, @@ -63,31 +63,27 @@ export class PetApi extends BaseAPI { /** * Add a new pet to the store */ - addPet(requestParameters: AddPetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.'); - } + addPet = (requestParameters: AddPetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'addPet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -95,33 +91,27 @@ export class PetApi extends BaseAPI { /** * Deletes a pet */ - deletePet(requestParameters: DeletePetRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.'); - } + deletePet = (requestParameters: DeletePetRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'deletePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) { - headerParameters['api_key'] = String(requestParameters.apiKey); - } - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + ...(requestParameters.apiKey && { 'api_key': String(requestParameters.apiKey) }), // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -129,33 +119,27 @@ export class PetApi extends BaseAPI { * Multiple status values can be provided with comma separated strings * Finds Pets by status */ - findPetsByStatus(requestParameters: FindPetsByStatusRequest): Observable> { - if (requestParameters.status === null || requestParameters.status === undefined) { - throw new RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.'); - } + findPetsByStatus = (requestParameters: FindPetsByStatusRequest): Observable> => { + throwIfRequired(requestParameters, 'status', 'findPetsByStatus'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.status) { - queryParameters['status'] = requestParameters.status.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByStatus`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -163,33 +147,27 @@ export class PetApi extends BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - findPetsByTags(requestParameters: FindPetsByTagsRequest): Observable> { - if (requestParameters.tags === null || requestParameters.tags === undefined) { - throw new RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); - } + findPetsByTags = (requestParameters: FindPetsByTagsRequest): Observable> => { + throwIfRequired(requestParameters, 'tags', 'findPetsByTags'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.tags) { - queryParameters['tags'] = requestParameters.tags.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByTags`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -197,55 +175,48 @@ export class PetApi extends BaseAPI { * Returns a single pet * Find pet by ID */ - getPetById(requestParameters: GetPetByIdRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.'); - } + getPetById = (requestParameters: GetPetByIdRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'getPetById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Update an existing pet */ - updatePet(requestParameters: UpdatePetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.'); - } + updatePet = (requestParameters: UpdatePetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'updatePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -253,23 +224,20 @@ export class PetApi extends BaseAPI { /** * Updates a pet in the store with form data */ - updatePetWithForm(requestParameters: UpdatePetWithFormRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.'); - } + updatePetWithForm = (requestParameters: UpdatePetWithFormRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'updatePetWithForm'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.name !== undefined) { @@ -281,10 +249,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -292,23 +260,20 @@ export class PetApi extends BaseAPI { /** * uploads an image */ - uploadFile(requestParameters: UploadFileRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.'); - } + uploadFile = (requestParameters: UploadFileRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'uploadFile'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.additionalMetadata !== undefined) { @@ -320,10 +285,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}/uploadImage`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -331,9 +296,9 @@ export class PetApi extends BaseAPI { } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum FindPetsByStatusStatusEnum { Available = 'available', Pending = 'pending', diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts index c0755e5c98f..d7350a81516 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { Order, } from '../models'; @@ -38,20 +38,20 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID */ - deleteOrder(requestParameters: DeleteOrderRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.'); - } + deleteOrder = (requestParameters: DeleteOrderRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'deleteOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -59,20 +59,20 @@ export class StoreApi extends BaseAPI { * Returns a map of status codes to quantities * Returns pet inventories by status */ - getInventory(): Observable<{ [key: string]: number; }> { - const queryParameters: HttpQuery = {}; + getInventory = (): Observable<{ [key: string]: number; }> => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request<{ [key: string]: number; }>({ path: `/store/inventory`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -80,42 +80,41 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID */ - getOrderById(requestParameters: GetOrderByIdRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.'); - } + getOrderById = (requestParameters: GetOrderByIdRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'getOrderById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Place an order for a pet */ - placeOrder(requestParameters: PlaceOrderRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.'); - } + placeOrder = (requestParameters: PlaceOrderRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'placeOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/store/order`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts index dee6c06cbea..8b994caf6c8 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { User, } from '../models'; @@ -56,22 +56,21 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Create user */ - createUser(requestParameters: CreateUserRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.'); - } + createUser = (requestParameters: CreateUserRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -79,22 +78,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.'); - } + createUsersWithArrayInput = (requestParameters: CreateUsersWithArrayInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithArrayInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithArray`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -102,22 +100,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.'); - } + createUsersWithListInput = (requestParameters: CreateUsersWithListInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithListInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithList`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -126,88 +123,82 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Delete user */ - deleteUser(requestParameters: DeleteUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.'); - } + deleteUser = (requestParameters: DeleteUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'deleteUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Get user by user name */ - getUserByName(requestParameters: GetUserByNameRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.'); - } + getUserByName = (requestParameters: GetUserByNameRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'getUserByName'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs user into the system */ - loginUser(requestParameters: LoginUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.'); - } + loginUser = (requestParameters: LoginUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'loginUser'); + throwIfRequired(requestParameters, 'password', 'loginUser'); - if (requestParameters.password === null || requestParameters.password === undefined) { - throw new RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.'); - } + const headers: HttpHeaders = { + }; - const queryParameters: HttpQuery = {}; - - if (requestParameters.username !== undefined && requestParameters.username !== null) { - queryParameters['username'] = requestParameters.username; - } - - if (requestParameters.password !== undefined && requestParameters.password !== null) { - queryParameters['password'] = requestParameters.password; - } - - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + ...(requestParameters.username && { 'username': requestParameters.username }), + ...(requestParameters.password && { 'password': requestParameters.password }), + }; return this.request({ path: `/user/login`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs out current logged in user session */ - logoutUser(): Observable { - const queryParameters: HttpQuery = {}; + logoutUser = (): Observable => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + }; + + const query: HttpQuery = { + }; return this.request({ path: `/user/logout`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -215,26 +206,22 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Updated user */ - updateUser(requestParameters: UpdateUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.'); - } + updateUser = (requestParameters: UpdateUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'updateUser'); + throwIfRequired(requestParameters, 'body', 'updateUser'); - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.'); - } + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts index e28e284bf19..1d160d5d379 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts @@ -66,30 +66,26 @@ export class Configuration { * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[]; + private middleware: Middleware[] = []; constructor(protected configuration = new Configuration()) { this.middleware = configuration.middleware; } - withMiddleware(this: T, ...middlewares: Middleware[]) { + withMiddleware = (middlewares: Middleware[]) => { const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); + next.middleware = next.middleware.concat(middlewares); return next; } - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - protected request(context: RequestOpts): Observable { - return this.rxjsRequest(this.createRequestArgs(context)).pipe( + protected request = (context: RequestOpts): Observable => + this.rxjsRequest(this.createRequestArgs(context)).pipe( map((res) => { if (res.status >= 200 && res.status < 300) { return res.response as T; @@ -97,15 +93,14 @@ export class BaseAPI { throw res; }) ); - } - private createRequestArgs(context: RequestOpts): RequestArgs { + private createRequestArgs = (context: RequestOpts): RequestArgs => { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. + // only add the queryString to the URL if there are query parameters. // this is done to avoid urls ending with a '?' character which buggy webservers // do not handle correctly sometimes. - url += '?' + querystring(context.query); + url += '?' + queryString(context.query); } const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body); const options = { @@ -116,9 +111,9 @@ export class BaseAPI { return { url, options }; } - private rxjsRequest(params: RequestContext): Observable { - const preMiddlewares = this.middleware && this.middleware.filter((item) => item.pre); - const postMiddlewares = this.middleware && this.middleware.filter((item) => item.post); + private rxjsRequest = (params: RequestContext): Observable => { + const preMiddlewares = this.middleware.filter((item) => item.pre); + const postMiddlewares = this.middleware.filter((item) => item.post); return of(params).pipe( map((args) => { @@ -144,19 +139,13 @@ export class BaseAPI { * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } + private clone = (): T => + Object.assign(Object.create(Object.getPrototypeOf(this)), this) } +// export for not being a breaking change export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } } export const COLLECTION_FORMATS = { @@ -186,17 +175,24 @@ export interface RequestOpts { body?: HttpBody; } -export function querystring(params: HttpQuery): string { - return Object.keys(params) - .map((key) => { - const value = params[key]; - if (value instanceof Array) { - return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) - .join('&'); - } - return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; - }) - .join('&'); +const queryString = (params: HttpQuery): string => Object.keys(params) + .map((key) => { + const value = params[key]; + if (value instanceof Array) { + return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) + .join('&'); + } + return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; + }) + .join('&'); + +// alias fallback for not being a breaking change +export const querystring = queryString; + +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] === null || params[key] === undefined) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } } export interface RequestContext extends RequestArgs {} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts index dab74f1d7bf..8f8db90ce78 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { ApiResponse, Pet, @@ -63,31 +63,27 @@ export class PetApi extends BaseAPI { /** * Add a new pet to the store */ - addPet(requestParameters: AddPetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.'); - } + addPet = (requestParameters: AddPetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'addPet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -95,33 +91,27 @@ export class PetApi extends BaseAPI { /** * Deletes a pet */ - deletePet(requestParameters: DeletePetRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.'); - } + deletePet = (requestParameters: DeletePetRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'deletePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) { - headerParameters['api_key'] = String(requestParameters.apiKey); - } - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + ...(requestParameters.apiKey && { 'api_key': String(requestParameters.apiKey) }), // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -129,33 +119,27 @@ export class PetApi extends BaseAPI { * Multiple status values can be provided with comma separated strings * Finds Pets by status */ - findPetsByStatus(requestParameters: FindPetsByStatusRequest): Observable> { - if (requestParameters.status === null || requestParameters.status === undefined) { - throw new RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.'); - } + findPetsByStatus = (requestParameters: FindPetsByStatusRequest): Observable> => { + throwIfRequired(requestParameters, 'status', 'findPetsByStatus'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.status) { - queryParameters['status'] = requestParameters.status.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByStatus`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -163,33 +147,27 @@ export class PetApi extends BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - findPetsByTags(requestParameters: FindPetsByTagsRequest): Observable> { - if (requestParameters.tags === null || requestParameters.tags === undefined) { - throw new RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); - } + findPetsByTags = (requestParameters: FindPetsByTagsRequest): Observable> => { + throwIfRequired(requestParameters, 'tags', 'findPetsByTags'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.tags) { - queryParameters['tags'] = requestParameters.tags.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByTags`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -197,55 +175,48 @@ export class PetApi extends BaseAPI { * Returns a single pet * Find pet by ID */ - getPetById(requestParameters: GetPetByIdRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.'); - } + getPetById = (requestParameters: GetPetByIdRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'getPetById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Update an existing pet */ - updatePet(requestParameters: UpdatePetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.'); - } + updatePet = (requestParameters: UpdatePetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'updatePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -253,23 +224,20 @@ export class PetApi extends BaseAPI { /** * Updates a pet in the store with form data */ - updatePetWithForm(requestParameters: UpdatePetWithFormRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.'); - } + updatePetWithForm = (requestParameters: UpdatePetWithFormRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'updatePetWithForm'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.name !== undefined) { @@ -281,10 +249,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -292,23 +260,20 @@ export class PetApi extends BaseAPI { /** * uploads an image */ - uploadFile(requestParameters: UploadFileRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.'); - } + uploadFile = (requestParameters: UploadFileRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'uploadFile'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.additionalMetadata !== undefined) { @@ -320,10 +285,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}/uploadImage`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -331,9 +296,9 @@ export class PetApi extends BaseAPI { } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum FindPetsByStatusStatusEnum { Available = 'available', Pending = 'pending', diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts index c0755e5c98f..d7350a81516 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/StoreApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { Order, } from '../models'; @@ -38,20 +38,20 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID */ - deleteOrder(requestParameters: DeleteOrderRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.'); - } + deleteOrder = (requestParameters: DeleteOrderRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'deleteOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -59,20 +59,20 @@ export class StoreApi extends BaseAPI { * Returns a map of status codes to quantities * Returns pet inventories by status */ - getInventory(): Observable<{ [key: string]: number; }> { - const queryParameters: HttpQuery = {}; + getInventory = (): Observable<{ [key: string]: number; }> => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request<{ [key: string]: number; }>({ path: `/store/inventory`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -80,42 +80,41 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID */ - getOrderById(requestParameters: GetOrderByIdRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.'); - } + getOrderById = (requestParameters: GetOrderByIdRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'getOrderById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Place an order for a pet */ - placeOrder(requestParameters: PlaceOrderRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.'); - } + placeOrder = (requestParameters: PlaceOrderRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'placeOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/store/order`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts index dee6c06cbea..8b994caf6c8 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { User, } from '../models'; @@ -56,22 +56,21 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Create user */ - createUser(requestParameters: CreateUserRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.'); - } + createUser = (requestParameters: CreateUserRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -79,22 +78,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.'); - } + createUsersWithArrayInput = (requestParameters: CreateUsersWithArrayInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithArrayInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithArray`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -102,22 +100,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.'); - } + createUsersWithListInput = (requestParameters: CreateUsersWithListInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithListInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithList`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -126,88 +123,82 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Delete user */ - deleteUser(requestParameters: DeleteUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.'); - } + deleteUser = (requestParameters: DeleteUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'deleteUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Get user by user name */ - getUserByName(requestParameters: GetUserByNameRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.'); - } + getUserByName = (requestParameters: GetUserByNameRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'getUserByName'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs user into the system */ - loginUser(requestParameters: LoginUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.'); - } + loginUser = (requestParameters: LoginUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'loginUser'); + throwIfRequired(requestParameters, 'password', 'loginUser'); - if (requestParameters.password === null || requestParameters.password === undefined) { - throw new RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.'); - } + const headers: HttpHeaders = { + }; - const queryParameters: HttpQuery = {}; - - if (requestParameters.username !== undefined && requestParameters.username !== null) { - queryParameters['username'] = requestParameters.username; - } - - if (requestParameters.password !== undefined && requestParameters.password !== null) { - queryParameters['password'] = requestParameters.password; - } - - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + ...(requestParameters.username && { 'username': requestParameters.username }), + ...(requestParameters.password && { 'password': requestParameters.password }), + }; return this.request({ path: `/user/login`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs out current logged in user session */ - logoutUser(): Observable { - const queryParameters: HttpQuery = {}; + logoutUser = (): Observable => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + }; + + const query: HttpQuery = { + }; return this.request({ path: `/user/logout`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -215,26 +206,22 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Updated user */ - updateUser(requestParameters: UpdateUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.'); - } + updateUser = (requestParameters: UpdateUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'updateUser'); + throwIfRequired(requestParameters, 'body', 'updateUser'); - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.'); - } + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts index e28e284bf19..1d160d5d379 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts @@ -66,30 +66,26 @@ export class Configuration { * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[]; + private middleware: Middleware[] = []; constructor(protected configuration = new Configuration()) { this.middleware = configuration.middleware; } - withMiddleware(this: T, ...middlewares: Middleware[]) { + withMiddleware = (middlewares: Middleware[]) => { const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); + next.middleware = next.middleware.concat(middlewares); return next; } - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - protected request(context: RequestOpts): Observable { - return this.rxjsRequest(this.createRequestArgs(context)).pipe( + protected request = (context: RequestOpts): Observable => + this.rxjsRequest(this.createRequestArgs(context)).pipe( map((res) => { if (res.status >= 200 && res.status < 300) { return res.response as T; @@ -97,15 +93,14 @@ export class BaseAPI { throw res; }) ); - } - private createRequestArgs(context: RequestOpts): RequestArgs { + private createRequestArgs = (context: RequestOpts): RequestArgs => { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. + // only add the queryString to the URL if there are query parameters. // this is done to avoid urls ending with a '?' character which buggy webservers // do not handle correctly sometimes. - url += '?' + querystring(context.query); + url += '?' + queryString(context.query); } const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body); const options = { @@ -116,9 +111,9 @@ export class BaseAPI { return { url, options }; } - private rxjsRequest(params: RequestContext): Observable { - const preMiddlewares = this.middleware && this.middleware.filter((item) => item.pre); - const postMiddlewares = this.middleware && this.middleware.filter((item) => item.post); + private rxjsRequest = (params: RequestContext): Observable => { + const preMiddlewares = this.middleware.filter((item) => item.pre); + const postMiddlewares = this.middleware.filter((item) => item.post); return of(params).pipe( map((args) => { @@ -144,19 +139,13 @@ export class BaseAPI { * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } + private clone = (): T => + Object.assign(Object.create(Object.getPrototypeOf(this)), this) } +// export for not being a breaking change export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } } export const COLLECTION_FORMATS = { @@ -186,17 +175,24 @@ export interface RequestOpts { body?: HttpBody; } -export function querystring(params: HttpQuery): string { - return Object.keys(params) - .map((key) => { - const value = params[key]; - if (value instanceof Array) { - return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) - .join('&'); - } - return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; - }) - .join('&'); +const queryString = (params: HttpQuery): string => Object.keys(params) + .map((key) => { + const value = params[key]; + if (value instanceof Array) { + return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) + .join('&'); + } + return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; + }) + .join('&'); + +// alias fallback for not being a breaking change +export const querystring = queryString; + +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] === null || params[key] === undefined) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } } export interface RequestContext extends RequestArgs {} diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts index dab74f1d7bf..8f8db90ce78 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { ApiResponse, Pet, @@ -63,31 +63,27 @@ export class PetApi extends BaseAPI { /** * Add a new pet to the store */ - addPet(requestParameters: AddPetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.'); - } + addPet = (requestParameters: AddPetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'addPet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -95,33 +91,27 @@ export class PetApi extends BaseAPI { /** * Deletes a pet */ - deletePet(requestParameters: DeletePetRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.'); - } + deletePet = (requestParameters: DeletePetRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'deletePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) { - headerParameters['api_key'] = String(requestParameters.apiKey); - } - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + ...(requestParameters.apiKey && { 'api_key': String(requestParameters.apiKey) }), // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -129,33 +119,27 @@ export class PetApi extends BaseAPI { * Multiple status values can be provided with comma separated strings * Finds Pets by status */ - findPetsByStatus(requestParameters: FindPetsByStatusRequest): Observable> { - if (requestParameters.status === null || requestParameters.status === undefined) { - throw new RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.'); - } + findPetsByStatus = (requestParameters: FindPetsByStatusRequest): Observable> => { + throwIfRequired(requestParameters, 'status', 'findPetsByStatus'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.status) { - queryParameters['status'] = requestParameters.status.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByStatus`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -163,33 +147,27 @@ export class PetApi extends BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - findPetsByTags(requestParameters: FindPetsByTagsRequest): Observable> { - if (requestParameters.tags === null || requestParameters.tags === undefined) { - throw new RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); - } + findPetsByTags = (requestParameters: FindPetsByTagsRequest): Observable> => { + throwIfRequired(requestParameters, 'tags', 'findPetsByTags'); - const queryParameters: HttpQuery = {}; - - if (requestParameters.tags) { - queryParameters['tags'] = requestParameters.tags.join(COLLECTION_FORMATS["csv"]); - } - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), + }; return this.request>({ path: `/pet/findByTags`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -197,55 +175,48 @@ export class PetApi extends BaseAPI { * Returns a single pet * Find pet by ID */ - getPetById(requestParameters: GetPetByIdRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.'); - } + getPetById = (requestParameters: GetPetByIdRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'getPetById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Update an existing pet */ - updatePet(requestParameters: UpdatePetRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.'); - } + updatePet = (requestParameters: UpdatePetRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'updatePet'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { + 'Content-Type': 'application/json', // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; return this.request({ path: `/pet`, method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -253,23 +224,20 @@ export class PetApi extends BaseAPI { /** * Updates a pet in the store with form data */ - updatePetWithForm(requestParameters: UpdatePetWithFormRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.'); - } + updatePetWithForm = (requestParameters: UpdatePetWithFormRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'updatePetWithForm'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.name !== undefined) { @@ -281,10 +249,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -292,23 +260,20 @@ export class PetApi extends BaseAPI { /** * uploads an image */ - uploadFile(requestParameters: UploadFileRequest): Observable { - if (requestParameters.petId === null || requestParameters.petId === undefined) { - throw new RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.'); - } + uploadFile = (requestParameters: UploadFileRequest): Observable => { + throwIfRequired(requestParameters, 'petId', 'uploadFile'); - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { + const headers: HttpHeaders = { // oauth required - if (typeof this.configuration.accessToken === 'function') { - headerParameters["Authorization"] = this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); - } else { - headerParameters["Authorization"] = this.configuration.accessToken; - } - } + ...(this.configuration.accessToken && { + Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken('petstore_auth', ['write:pets', 'read:pets']) + : this.configuration.accessToken) + }), + }; + + const query: HttpQuery = { + }; const formData = new FormData(); if (requestParameters.additionalMetadata !== undefined) { @@ -320,10 +285,10 @@ export class PetApi extends BaseAPI { } return this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))), + path: `/pet/{petId}/uploadImage`.replace(`{petId}`, encodeURIComponent(String(requestParameters.petId))), method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: formData, }); } @@ -331,9 +296,9 @@ export class PetApi extends BaseAPI { } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum FindPetsByStatusStatusEnum { Available = 'available', Pending = 'pending', diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts index c0755e5c98f..d7350a81516 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { Order, } from '../models'; @@ -38,20 +38,20 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID */ - deleteOrder(requestParameters: DeleteOrderRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.'); - } + deleteOrder = (requestParameters: DeleteOrderRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'deleteOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -59,20 +59,20 @@ export class StoreApi extends BaseAPI { * Returns a map of status codes to quantities * Returns pet inventories by status */ - getInventory(): Observable<{ [key: string]: number; }> { - const queryParameters: HttpQuery = {}; + getInventory = (): Observable<{ [key: string]: number; }> => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + ...(this.configuration.apiKey && { 'api_key': this.configuration.apiKey('api_key') }), // api_key authentication + }; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication - } + const query: HttpQuery = { + }; return this.request<{ [key: string]: number; }>({ path: `/store/inventory`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -80,42 +80,41 @@ export class StoreApi extends BaseAPI { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID */ - getOrderById(requestParameters: GetOrderByIdRequest): Observable { - if (requestParameters.orderId === null || requestParameters.orderId === undefined) { - throw new RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.'); - } + getOrderById = (requestParameters: GetOrderByIdRequest): Observable => { + throwIfRequired(requestParameters, 'orderId', 'getOrderById'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))), + path: `/store/order/{orderId}`.replace(`{orderId}`, encodeURIComponent(String(requestParameters.orderId))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Place an order for a pet */ - placeOrder(requestParameters: PlaceOrderRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.'); - } + placeOrder = (requestParameters: PlaceOrderRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'placeOrder'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/store/order`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts index dee6c06cbea..8b994caf6c8 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts @@ -12,7 +12,7 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, RequiredError, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; +import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime'; import { User, } from '../models'; @@ -56,22 +56,21 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Create user */ - createUser(requestParameters: CreateUserRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.'); - } + createUser = (requestParameters: CreateUserRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -79,22 +78,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.'); - } + createUsersWithArrayInput = (requestParameters: CreateUsersWithArrayInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithArrayInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithArray`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -102,22 +100,21 @@ export class UserApi extends BaseAPI { /** * Creates list of users with given input array */ - createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest): Observable { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.'); - } + createUsersWithListInput = (requestParameters: CreateUsersWithListInputRequest): Observable => { + throwIfRequired(requestParameters, 'body', 'createUsersWithListInput'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ path: `/user/createWithList`, method: 'POST', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } @@ -126,88 +123,82 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Delete user */ - deleteUser(requestParameters: DeleteUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.'); - } + deleteUser = (requestParameters: DeleteUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'deleteUser'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'DELETE', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Get user by user name */ - getUserByName(requestParameters: GetUserByNameRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.'); - } + getUserByName = (requestParameters: GetUserByNameRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'getUserByName'); - const queryParameters: HttpQuery = {}; + const headers: HttpHeaders = { + }; - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs user into the system */ - loginUser(requestParameters: LoginUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.'); - } + loginUser = (requestParameters: LoginUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'loginUser'); + throwIfRequired(requestParameters, 'password', 'loginUser'); - if (requestParameters.password === null || requestParameters.password === undefined) { - throw new RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.'); - } + const headers: HttpHeaders = { + }; - const queryParameters: HttpQuery = {}; - - if (requestParameters.username !== undefined && requestParameters.username !== null) { - queryParameters['username'] = requestParameters.username; - } - - if (requestParameters.password !== undefined && requestParameters.password !== null) { - queryParameters['password'] = requestParameters.password; - } - - const headerParameters: HttpHeaders = {}; + const query: HttpQuery = { + ...(requestParameters.username && { 'username': requestParameters.username }), + ...(requestParameters.password && { 'password': requestParameters.password }), + }; return this.request({ path: `/user/login`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } /** * Logs out current logged in user session */ - logoutUser(): Observable { - const queryParameters: HttpQuery = {}; + logoutUser = (): Observable => { - const headerParameters: HttpHeaders = {}; + const headers: HttpHeaders = { + }; + + const query: HttpQuery = { + }; return this.request({ path: `/user/logout`, method: 'GET', - headers: headerParameters, - query: queryParameters, + headers, + query, }); } @@ -215,26 +206,22 @@ export class UserApi extends BaseAPI { * This can only be done by the logged in user. * Updated user */ - updateUser(requestParameters: UpdateUserRequest): Observable { - if (requestParameters.username === null || requestParameters.username === undefined) { - throw new RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.'); - } + updateUser = (requestParameters: UpdateUserRequest): Observable => { + throwIfRequired(requestParameters, 'username', 'updateUser'); + throwIfRequired(requestParameters, 'body', 'updateUser'); - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.'); - } + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + }; - const queryParameters: HttpQuery = {}; - - const headerParameters: HttpHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const query: HttpQuery = { + }; return this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))), + path: `/user/{username}`.replace(`{username}`, encodeURIComponent(String(requestParameters.username))), method: 'PUT', - headers: headerParameters, - query: queryParameters, + headers, + query, body: requestParameters.body, }); } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts index e28e284bf19..1d160d5d379 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts @@ -66,30 +66,26 @@ export class Configuration { * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[]; + private middleware: Middleware[] = []; constructor(protected configuration = new Configuration()) { this.middleware = configuration.middleware; } - withMiddleware(this: T, ...middlewares: Middleware[]) { + withMiddleware = (middlewares: Middleware[]) => { const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); + next.middleware = next.middleware.concat(middlewares); return next; } - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - protected request(context: RequestOpts): Observable { - return this.rxjsRequest(this.createRequestArgs(context)).pipe( + protected request = (context: RequestOpts): Observable => + this.rxjsRequest(this.createRequestArgs(context)).pipe( map((res) => { if (res.status >= 200 && res.status < 300) { return res.response as T; @@ -97,15 +93,14 @@ export class BaseAPI { throw res; }) ); - } - private createRequestArgs(context: RequestOpts): RequestArgs { + private createRequestArgs = (context: RequestOpts): RequestArgs => { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. + // only add the queryString to the URL if there are query parameters. // this is done to avoid urls ending with a '?' character which buggy webservers // do not handle correctly sometimes. - url += '?' + querystring(context.query); + url += '?' + queryString(context.query); } const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body); const options = { @@ -116,9 +111,9 @@ export class BaseAPI { return { url, options }; } - private rxjsRequest(params: RequestContext): Observable { - const preMiddlewares = this.middleware && this.middleware.filter((item) => item.pre); - const postMiddlewares = this.middleware && this.middleware.filter((item) => item.post); + private rxjsRequest = (params: RequestContext): Observable => { + const preMiddlewares = this.middleware.filter((item) => item.pre); + const postMiddlewares = this.middleware.filter((item) => item.post); return of(params).pipe( map((args) => { @@ -144,19 +139,13 @@ export class BaseAPI { * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } + private clone = (): T => + Object.assign(Object.create(Object.getPrototypeOf(this)), this) } +// export for not being a breaking change export class RequiredError extends Error { name: 'RequiredError' = 'RequiredError'; - constructor(public field: string, msg?: string) { - super(msg); - } } export const COLLECTION_FORMATS = { @@ -186,17 +175,24 @@ export interface RequestOpts { body?: HttpBody; } -export function querystring(params: HttpQuery): string { - return Object.keys(params) - .map((key) => { - const value = params[key]; - if (value instanceof Array) { - return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) - .join('&'); - } - return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; - }) - .join('&'); +const queryString = (params: HttpQuery): string => Object.keys(params) + .map((key) => { + const value = params[key]; + if (value instanceof Array) { + return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`) + .join('&'); + } + return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`; + }) + .join('&'); + +// alias fallback for not being a breaking change +export const querystring = queryString; + +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] === null || params[key] === undefined) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } } export interface RequestContext extends RequestArgs {} From f6817640675771dc3537150d7d04c6c1f3fd7ab5 Mon Sep 17 00:00:00 2001 From: Ramanth Date: Tue, 25 Jun 2019 11:42:13 +0530 Subject: [PATCH 69/73] [R] feat(r): Inclusion of useragent, timeout and serialization (#3084) * feat(r): Inclusion of useragent timeout and serialization * fix(r): fixing name of timeout parameter * fix(r): fixing unit tests * fix(r): fixing minor issues * fix(r): updated r petstore batch command * fix(r): minor unit test fix * fix(r): refactor of useragent passing and other minor --- .../src/main/resources/r/api.mustache | 6 +++++ .../src/main/resources/r/api_client.mustache | 26 ++++++++++++++----- samples/client/petstore/R/R/api_client.R | 25 +++++++++++++----- samples/client/petstore/R/R/user_api.R | 6 +++-- 4 files changed, 47 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 955bd104bbe..b56c7827999 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -79,7 +79,13 @@ {{#hasBodyParam}} {{#bodyParams}} if (!missing(`{{paramName}}`)) { + {{#isListContainer}} + body.items = paste(unlist(lapply({{paramName}}, function(param){param$toJSONString()})), collapse = ",") + body <- paste0('[', body.items, ']') + {{/isListContainer}} + {{^isListContainer}} body <- `{{paramName}}`$toJSONString() + {{/isListContainer}} } else { body <- NULL } diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 585ddee77f3..4a7e01b588a 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -38,8 +38,10 @@ ApiClient <- R6::R6Class( apiKeys = NULL, # Access token accessToken = NULL, + # Time Out (seconds) + timeout = NULL, # constructor - initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL){ + initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL, timeout=NULL){ if (!is.null(basePath)) { self$basePath <- basePath } @@ -69,22 +71,32 @@ ApiClient <- R6::R6Class( if (!is.null(userAgent)) { self$`userAgent` <- userAgent } + + if (!is.null(timeout)) { + self$timeout <- timeout + } }, CallApi = function(url, method, queryParams, headerParams, body, ...){ headers <- httr::add_headers(c(headerParams, self$defaultHeaders)) + {{! Adding timeout that can be set at the apiClient object level}} + httpTimeout <- NULL + if (!is.null(self$timeout)) { + httpTimeout <- httr::timeout(self$timeout) + } + if (method == "GET") { - httr::GET(url, query = queryParams, headers, ...) + httr::GET(url, query = queryParams, headers, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "POST") { - httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "PUT") { - httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "PATCH") { - httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "HEAD") { - httr::HEAD(url, query = queryParams, headers, ...) + httr::HEAD(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "DELETE") { - httr::DELETE(url, query = queryParams, headers, ...) + httr::DELETE(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else { stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") } diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R index 8d3d0fcd8b2..ec5af87dd39 100644 --- a/samples/client/petstore/R/R/api_client.R +++ b/samples/client/petstore/R/R/api_client.R @@ -45,8 +45,10 @@ ApiClient <- R6::R6Class( apiKeys = NULL, # Access token accessToken = NULL, + # Time Out (seconds) + timeout = NULL, # constructor - initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL){ + initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL, timeout=NULL){ if (!is.null(basePath)) { self$basePath <- basePath } @@ -76,22 +78,31 @@ ApiClient <- R6::R6Class( if (!is.null(userAgent)) { self$`userAgent` <- userAgent } + + if (!is.null(timeout)) { + self$timeout <- timeout + } }, CallApi = function(url, method, queryParams, headerParams, body, ...){ headers <- httr::add_headers(c(headerParams, self$defaultHeaders)) + httpTimeout <- NULL + if (!is.null(self$timeout)) { + httpTimeout <- httr::timeout(self$timeout) + } + if (method == "GET") { - httr::GET(url, query = queryParams, headers, ...) + httr::GET(url, query = queryParams, headers, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "POST") { - httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "PUT") { - httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "PATCH") { - httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...) + httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "HEAD") { - httr::HEAD(url, query = queryParams, headers, ...) + httr::HEAD(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else if (method == "DELETE") { - httr::DELETE(url, query = queryParams, headers, ...) + httr::DELETE(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...) } else { stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") } diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index a3696c701a9..656e1acd683 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -122,7 +122,8 @@ UserApi <- R6::R6Class( } if (!missing(`body`)) { - body <- `body`$toJSONString() + body.items = paste(unlist(lapply(body, function(param){param$toJSONString()})), collapse = ",") + body <- paste0('[', body.items, ']') } else { body <- NULL } @@ -166,7 +167,8 @@ UserApi <- R6::R6Class( } if (!missing(`body`)) { - body <- `body`$toJSONString() + body.items = paste(unlist(lapply(body, function(param){param$toJSONString()})), collapse = ",") + body <- paste0('[', body.items, ']') } else { body <- NULL } From 5b9283beca0f0a8a185d3be5b53ccc7442341dc2 Mon Sep 17 00:00:00 2001 From: Tomasz Prus Date: Tue, 25 Jun 2019 08:13:43 +0200 Subject: [PATCH 70/73] feat: configurable limit of simultaneous connections (python/asyncio) (#3200) * feat: configurable limit of simultaneous connections (python/asyncio) * fix: remove unused import (python/asyncio) --- .../src/main/resources/python/asyncio/rest.mustache | 5 ++++- .../src/main/resources/python/configuration.mustache | 10 ++++++++++ .../python-asyncio/petstore_api/configuration.py | 10 +++------- .../petstore/python-asyncio/petstore_api/rest.py | 5 ++++- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache index 36b061f8f49..4585f1c6ad5 100644 --- a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache @@ -38,8 +38,11 @@ class RESTResponse(io.IOBase): class RESTClientObject(object): - def __init__(self, configuration, pools_size=4, maxsize=4): + def __init__(self, configuration, pools_size=4, maxsize=None): + # maxsize is number of requests to host that are allowed in parallel + if maxsize is None: + maxsize = configuration.connection_pool_maxsize # ca_certs if configuration.ssl_ca_cert: diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index b6c134aa1c4..6d0d5c62e1c 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -6,7 +6,9 @@ from __future__ import absolute_import import copy import logging +{{^asyncio}} import multiprocessing +{{/asyncio}} import sys import urllib3 @@ -116,6 +118,13 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): """Set this to True/False to enable/disable SSL hostname verification. """ + {{#asyncio}} + self.connection_pool_maxsize = 100 + """This value is passed to the aiohttp to limit simultaneous connections. + Default values is 100, None means no-limit. + """ + {{/asyncio}} + {{^asyncio}} self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is @@ -123,6 +132,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance. """ + {{/asyncio}} self.proxy = None """Proxy URL diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index fa0c3f4d320..886cf0bd9ad 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -14,7 +14,6 @@ from __future__ import absolute_import import copy import logging -import multiprocessing import sys import urllib3 @@ -115,12 +114,9 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): """Set this to True/False to enable/disable SSL hostname verification. """ - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = 100 + """This value is passed to the aiohttp to limit simultaneous connections. + Default values is 100, None means no-limit. """ self.proxy = None diff --git a/samples/client/petstore/python-asyncio/petstore_api/rest.py b/samples/client/petstore/python-asyncio/petstore_api/rest.py index d06b8459fb8..e13f81b4527 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/rest.py +++ b/samples/client/petstore/python-asyncio/petstore_api/rest.py @@ -46,8 +46,11 @@ class RESTResponse(io.IOBase): class RESTClientObject(object): - def __init__(self, configuration, pools_size=4, maxsize=4): + def __init__(self, configuration, pools_size=4, maxsize=None): + # maxsize is number of requests to host that are allowed in parallel + if maxsize is None: + maxsize = configuration.connection_pool_maxsize # ca_certs if configuration.ssl_ca_cert: From fe8dd343a8e9e6b7f4074772d346791948ed2b40 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 25 Jun 2019 14:25:45 +0800 Subject: [PATCH 71/73] Remove Jean from the core team in the public website (#3212) --- website/dynamic/team.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/website/dynamic/team.yml b/website/dynamic/team.yml index c3a2d9509f2..a72bfae3409 100644 --- a/website/dynamic/team.yml +++ b/website/dynamic/team.yml @@ -12,9 +12,6 @@ core: - name: Akihito Nakano github: ackintosh joined: 2018/02 - - name: Jean-François Côté - github: JFCote - joined: 2018/03 - name: Jérémie Bresson github: jmini joined: 2018/04 From 94c583b6ce55b60dcf7865345c8ed7d9d3bc8adb Mon Sep 17 00:00:00 2001 From: Amit Joshi Date: Tue, 25 Jun 2019 02:40:05 -0400 Subject: [PATCH 72/73] [aspnetcore]: Preliminary support for ASP.NET 3.0 Core preview 5 (#2824) * First set of fixes to support ver 3.0, useswashbuckle does not work yet * Fix swashbuckle issues iwth aspnetcore 3.0 * Use default routing for 2.2 and turn off default for 3.0 * fix up documentation * PR Feedback and wrong name in mustache file * Fix for 2.1 usage too * Change isFramework to useFrameworkReference as name to make thngs explicitly clear. Also fix small messages for the review comments * Make JSON.NET version configurable * Activate endpoint routing and use camel case NamingStrategy * Make Newtonsoft version configurable to match ASP.NET Core preview 5 * Fix spelling of an option, remove a duplicate call and update docs --- docs/generators/aspnetcore.md | 9 +- .../languages/AspNetCoreServerCodegen.java | 106 +++++++++++++++++- .../aspnetcore/2.1/Project.csproj.mustache | 14 ++- .../resources/aspnetcore/2.1/Startup.mustache | 13 ++- 4 files changed, 131 insertions(+), 11 deletions(-) diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index a864c9e7024..387832c1ab2 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -16,14 +16,19 @@ sidebar_label: aspnetcore |packageVersion|C# package version.| |1.0.0| |packageGuid|The GUID that will be associated with the C# project| |null| |sourceFolder|source folder for generated code| |src| -|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_1| -|aspnetCoreVersion|ASP.NET Core version: 2.2 (default), 2.1, 2.0 (deprecated)| |2.2| +|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2| +|aspnetCoreVersion|ASP.NET Core version: 3.0 (preview4 only), 2.2, 2.1, 2.0 (deprecated)| |2.2| +|swashbuckleVersion|Swashbucke version: 3.0.0, 4.0.0| |3.0.0| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| |isLibrary|Is the build a library| |false| +|useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| +|useNewtonsoft|Uses the Newtonsoft JSON library.| |true| +|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| +|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| |classModifier|Class Modifier can be empty, abstract| || |operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| |buildTarget|Target to build an application or library| |program| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 8ffa5e4a6d9..ae3ed7e12da 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -38,6 +38,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { public static final String USE_SWASHBUCKLE = "useSwashbuckle"; public static final String ASPNET_CORE_VERSION = "aspnetCoreVersion"; + public static final String SWASHBUCKLE_VERSION = "swashbuckleVersion"; public static final String CLASS_MODIFIER = "classModifier"; public static final String OPERATION_MODIFIER = "operationModifier"; public static final String OPERATION_IS_ASYNC = "operationIsAsync"; @@ -51,6 +52,10 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { public static final String SDK_LIB = "Microsoft.NET.Sdk"; public static final String COMPATIBILITY_VERSION = "compatibilityVersion"; public static final String IS_LIBRARY = "isLibrary"; + public static final String USE_FRAMEWORK_REFERENCE = "useFrameworkReference"; + public static final String USE_NEWTONSOFT = "useNewtonsoft"; + public static final String USE_DEFAULT_ROUTING = "useDefaultRouting"; + public static final String NEWTONSOFT_VERSION = "newtonsoftVersion"; private String packageGuid = "{" + randomUUID().toString().toUpperCase(Locale.ROOT) + "}"; @@ -60,18 +65,23 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { private boolean useSwashbuckle = true; protected int serverPort = 8080; protected String serverHost = "0.0.0.0"; - protected CliOption aspnetCoreVersion = new CliOption(ASPNET_CORE_VERSION, "ASP.NET Core version: 2.2 (default), 2.1, 2.0 (deprecated)"); + protected CliOption swashbuckleVersion = new CliOption(SWASHBUCKLE_VERSION, "Swashbucke version: 3.0.0, 4.0.0"); ; // default to 2.1 + protected CliOption aspnetCoreVersion = new CliOption(ASPNET_CORE_VERSION, "ASP.NET Core version: 3.0 (preview4 only), 2.2, 2.1, 2.0 (deprecated)"); private CliOption classModifier = new CliOption(CLASS_MODIFIER, "Class Modifier can be empty, abstract"); private CliOption operationModifier = new CliOption(OPERATION_MODIFIER, "Operation Modifier can be virtual, abstract or partial"); private CliOption modelClassModifier = new CliOption(MODEL_CLASS_MODIFIER, "Model Class Modifier can be nothing or partial"); private boolean generateBody = true; private CliOption buildTarget = new CliOption("buildTarget", "Target to build an application or library"); private String projectSdk = SDK_WEB; - private String compatibilityVersion = "Version_2_1"; + private String compatibilityVersion = "Version_2_2"; private boolean operationIsAsync = false; private boolean operationResultTask = false; private boolean isLibrary = false; + private boolean useFrameworkReference = false; + private boolean useNewtonsoft = true; + private boolean useDefaultRouting = true; + private String newtonsoftVersion = "3.0.0-preview5-19227-01"; public AspNetCoreServerCodegen() { super(); @@ -146,10 +156,18 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { aspnetCoreVersion.addEnum("2.0", "ASP.NET COre 2.0"); aspnetCoreVersion.addEnum("2.1", "ASP.NET Core 2.1"); aspnetCoreVersion.addEnum("2.2", "ASP.NET Core 2.2"); + aspnetCoreVersion.addEnum("3.0", "ASP.NET Core 3.0"); aspnetCoreVersion.setDefault("2.2"); aspnetCoreVersion.setOptValue(aspnetCoreVersion.getDefault()); addOption(aspnetCoreVersion.getOpt(), aspnetCoreVersion.getDescription(), aspnetCoreVersion.getOptValue()); + swashbuckleVersion.addEnum("3.0.0", "Swashbuckle 3.0.0"); + swashbuckleVersion.addEnum("4.0.0", "Swashbuckle 4.0.0"); + swashbuckleVersion.addEnum("5.0.0", "Swashbuckle 5.0.0"); + swashbuckleVersion.setDefault("3.0.0"); + swashbuckleVersion.setOptValue(swashbuckleVersion.getDefault()); + addOption(swashbuckleVersion.getOpt(), swashbuckleVersion.getDescription(), swashbuckleVersion.getOptValue()); + // CLI Switches addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC, @@ -175,6 +193,23 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { "Is the build a library", isLibrary); + addSwitch(USE_FRAMEWORK_REFERENCE, + "Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.", + useFrameworkReference); + + addSwitch(USE_NEWTONSOFT, + "Uses the Newtonsoft JSON library.", + useNewtonsoft); + + addOption(NEWTONSOFT_VERSION, + "Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+", + newtonsoftVersion); + + + addSwitch(USE_DEFAULT_ROUTING, + "Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.", + useDefaultRouting); + classModifier.addEnum("", "Keep class default with no modifier"); classModifier.addEnum("abstract", "Make class abstract"); classModifier.setDefault(""); @@ -246,6 +281,11 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { } additionalProperties.put("packageGuid", packageGuid); + if (!additionalProperties.containsKey(NEWTONSOFT_VERSION)) { + additionalProperties.put(NEWTONSOFT_VERSION, newtonsoftVersion); + } else { + newtonsoftVersion = (String)additionalProperties.get(NEWTONSOFT_VERSION); + } // CHeck for the modifiers etc. // The order of the checks is important. @@ -275,6 +315,10 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { // determine the ASP.NET core version setting setAspnetCoreVersion(packageFolder); + setSwashbuckleVersion(); + setIsFramework(); + setUseNewtonsoft(); + setUseEndpointRouting(); supportingFiles.add(new SupportingFile("build.sh.mustache", "", "build.sh")); supportingFiles.add(new SupportingFile("build.bat.mustache", "", "build.bat")); @@ -479,10 +523,66 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { if (isLibrary) { operationIsAsync = false; additionalProperties.put(OPERATION_IS_ASYNC, operationIsAsync); - } else if (additionalProperties.containsKey(OPERATION_IS_ASYNC)) { + } else if (additionalProperties.containsKey(OPERATION_IS_ASYNC)) { operationIsAsync = convertPropertyToBooleanAndWriteBack(OPERATION_IS_ASYNC); } else { additionalProperties.put(OPERATION_IS_ASYNC, operationIsAsync); } } + + private void setIsFramework() { + if (aspnetCoreVersion.getOptValue().startsWith("3.")) {// default, do nothing + LOGGER.warn("ASP.NET core version is " + aspnetCoreVersion.getOptValue() + " so changing to use frameworkReference instead of packageReference "); + useFrameworkReference = true; + additionalProperties.put(USE_FRAMEWORK_REFERENCE, useFrameworkReference); + } else { + if (additionalProperties.containsKey(USE_FRAMEWORK_REFERENCE)) { + useFrameworkReference = convertPropertyToBooleanAndWriteBack(USE_FRAMEWORK_REFERENCE); + } else { + additionalProperties.put(USE_FRAMEWORK_REFERENCE, useFrameworkReference); + } + } + + } + + private void setUseNewtonsoft() { + if (aspnetCoreVersion.getOptValue().startsWith("2.")) { + LOGGER.warn("ASP.NET core version is " + aspnetCoreVersion.getOptValue() + " so staying on default json library."); + useNewtonsoft = false; + additionalProperties.put(USE_NEWTONSOFT, useNewtonsoft); + } else { + if (additionalProperties.containsKey(USE_NEWTONSOFT)) { + useNewtonsoft = convertPropertyToBooleanAndWriteBack(USE_NEWTONSOFT); + } else { + additionalProperties.put(USE_NEWTONSOFT, useNewtonsoft); + } + } + } + + private void setUseEndpointRouting() { + if (aspnetCoreVersion.getOptValue().startsWith("3.")) { + LOGGER.warn("ASP.NET core version is " + aspnetCoreVersion.getOptValue() + " so switching to old style endpoint routing."); + useDefaultRouting = false; + additionalProperties.put(USE_DEFAULT_ROUTING, useDefaultRouting); + } else { + if (additionalProperties.containsKey(USE_DEFAULT_ROUTING)) { + useDefaultRouting = convertPropertyToBooleanAndWriteBack(USE_DEFAULT_ROUTING); + } else { + additionalProperties.put(USE_DEFAULT_ROUTING, useDefaultRouting); + } + } + } + + private void setSwashbuckleVersion() { + setCliOption(swashbuckleVersion); + + if (aspnetCoreVersion.getOptValue().startsWith("3.")) { + LOGGER.warn("ASP.NET core version is " + aspnetCoreVersion.getOptValue() + " so changing default Swashbuckle version to 4.0.0."); + swashbuckleVersion.setOptValue("4.0.0"); + additionalProperties.put(SWASHBUCKLE_VERSION, swashbuckleVersion.getOptValue()); + } else { + // default, do nothing + LOGGER.info("Swashbuckle version: " + swashbuckleVersion.getOptValue()); + } + } } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache index 3714e878dc4..a7b6b35bd78 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache @@ -12,10 +12,20 @@ {{packageName}} +{{#useFrameworkReference}} +{{#isLibrary}} + +{{/isLibrary}} +{{/useFrameworkReference}} +{{^useFrameworkReference}} +{{/useFrameworkReference}} +{{#useNewtonsoft}} + +{{/useNewtonsoft}} {{#useSwashbuckle}} - - + + {{/useSwashbuckle}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache index 5883d72bcae..98fb1fe23e6 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache @@ -60,16 +60,16 @@ namespace {{packageName}} // Add framework services. services - .AddMvc() + .AddMvc({{^useDefaultRoutng}}opts => opts.EnableEndpointRouting = false{{/useDefaultRoutng}}) {{#compatibilityVersion}} .SetCompatibilityVersion(CompatibilityVersion.{{compatibilityVersion}}) {{/compatibilityVersion}} - .AddJsonOptions(opts => + .{{#useNewtonsoft}}AddNewtonsoftJson{{/useNewtonsoft}}{{^useNewtonsoft}}AddJsonOptions{{/useNewtonsoft}}(opts => { opts.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); opts.SerializerSettings.Converters.Add(new StringEnumConverter { - CamelCaseText = true + {{#useNewtonsoft}}NamingStrategy = new CamelCaseNamingStrategy(){{/useNewtonsoft}}{{^useNewtonsoft}}CamelCaseText = true{{/useNewtonsoft}} }); }); {{#useSwashbuckle}} @@ -127,7 +127,12 @@ namespace {{packageName}} //TODO: Or alternatively use the original Swagger contract that's included in the static files // c.SwaggerEndpoint("/openapi-original.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} Original"); - }){{/useSwashbuckle}}; + }){{/useSwashbuckle}};{{^useDefaultRoutng}} + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + });{{/useDefaultRoutng}} if (env.IsDevelopment()) { From 01f991a0347702a2b3398860f2d00e6fca2ecc5c Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Tue, 25 Jun 2019 08:46:19 +0200 Subject: [PATCH 73/73] Fix inheritance with modelPrefix (#3151) * Fix inheritance with modelPrefix Fix #3150 * Fix typo --- .../openapitools/codegen/DefaultCodegen.java | 4 +- .../codegen/DefaultCodegenTest.java | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e22a4f8ea50..d3998a47bca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -1756,10 +1756,10 @@ public class DefaultCodegen implements CodegenConfig { m.interfaces.add(modelName); addImport(m, modelName); if (allDefinitions != null && refSchema != null) { - if (allParents.contains(modelName) && supportsMultipleInheritance) { + if (allParents.contains(ref) && supportsMultipleInheritance) { // multiple inheritance addProperties(allProperties, allRequired, refSchema); - } else if (parentName != null && parentName.equals(modelName) && supportsInheritance) { + } else if (parentName != null && parentName.equals(ref) && supportsInheritance) { // single inheritance addProperties(allProperties, allRequired, refSchema); } else { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index fcb8a9f916f..b8b3a717905 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -18,6 +18,7 @@ package org.openapitools.codegen; import com.google.common.collect.Sets; +import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -28,10 +29,15 @@ import io.swagger.v3.oas.models.parameters.QueryParameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; +import io.swagger.v3.parser.core.models.ParseOptions; +import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; import java.util.*; import java.util.stream.Collectors; @@ -654,4 +660,48 @@ public class DefaultCodegenTest { Assert.assertEquals(imports, expected); } + + @Test + public void modelDoNotContainInheritedVars() { + DefaultCodegen codegen = new DefaultCodegen(); + codegen.supportsInheritance = true; + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/generic.yaml", null, new ParseOptions()).getOpenAPI(); + codegen.setOpenAPI(openAPI); + + CodegenModel codegenModel = codegen.fromModel("Dog", openAPI.getComponents().getSchemas().get("Dog")); + + Assert.assertEquals(codegenModel.vars.size(), 1); + } + + @Test + public void modelWithPrefixDoNotContainInheritedVars() { + DefaultCodegen codegen = new DefaultCodegen(); + codegen.supportsInheritance = true; + codegen.setModelNamePrefix("prefix"); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/generic.yaml", null, new ParseOptions()).getOpenAPI(); + codegen.setOpenAPI(openAPI); + + CodegenModel codegenModel = codegen.fromModel("Dog", openAPI.getComponents().getSchemas().get("Dog")); + + Assert.assertEquals(codegenModel.vars.size(), 1); + } + @Test + public void modelWithSuffixDoNotContainInheritedVars() { + DefaultCodegen codegen = new DefaultCodegen(); + codegen.supportsInheritance = true; + codegen.setModelNameSuffix("suffix"); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/generic.yaml", null, new ParseOptions()).getOpenAPI(); + codegen.setOpenAPI(openAPI); + + CodegenModel codegenModel = codegen.fromModel("Dog", openAPI.getComponents().getSchemas().get("Dog")); + + Assert.assertEquals(codegenModel.vars.size(), 1); + } + }