diff --git a/bin/ci/java-rest-assured-jackson.json b/bin/ci/java-rest-assured-jackson.json new file mode 100644 index 000000000000..1ff56d80ea83 --- /dev/null +++ b/bin/ci/java-rest-assured-jackson.json @@ -0,0 +1,16 @@ +{ + "!include": "bin/java-petstore-rest-assured-jackson.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/rest-assured-jackson", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/rest-assured", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "is", + "java8": "true", + "dateLibrary": "java8", + "serializationLibrary": "jackson", + "useBeanValidation": "true", + "performBeanValidation": "true" + } +} diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh index 6eed10ebe38b..05b50835c99d 100755 --- a/bin/java-petstore-all.sh +++ b/bin/java-petstore-all.sh @@ -12,6 +12,7 @@ ./bin/java-petstore-okhttp-gson-parcelable.sh ./bin/java-petstore-okhttp-gson.sh ./bin/java-petstore-rest-assured.sh +./bin/java-petstore-rest-assured-jackson.sh ./bin/java-petstore-resteasy.sh ./bin/java-petstore-resttemplate-withxml.sh ./bin/java-petstore-resttemplate.sh diff --git a/bin/java-petstore-rest-assured-jackson.json b/bin/java-petstore-rest-assured-jackson.json new file mode 100644 index 000000000000..d6e6035df801 --- /dev/null +++ b/bin/java-petstore-rest-assured-jackson.json @@ -0,0 +1,4 @@ +{ + "library": "rest-assured", + "artifactId": "petstore-rest-assured-jackson" +} diff --git a/bin/java-petstore-rest-assured-jackson.sh b/bin/java-petstore-rest-assured-jackson.sh new file mode 100755 index 000000000000..eeffe6aaceed --- /dev/null +++ b/bin/java-petstore-rest-assured-jackson.sh @@ -0,0 +1,36 @@ +#!/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" +target_dir="./samples/client/petstore/java/rest-assured-jackson/" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +args="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-jackson.json -o ${target_dir} --additional-properties hideGenerationTimestamp=true --additional-properties useBeanValidation=true --additional-properties performBeanValidation=true --additional-properties booleanGetterPrefix=is --additional-properties java8=true --additional-properties dateLibrary=java8 --additional-properties serializationLibrary=jackson $@" + +echo "Removing ${target_dir}" +rm -rf "${target_dir}" + +java $JAVA_OPTS -jar $executable $args diff --git a/bin/windows/java-petstore-all.bat b/bin/windows/java-petstore-all.bat index dd357cfd56d1..816919bb8fd1 100644 --- a/bin/windows/java-petstore-all.bat +++ b/bin/windows/java-petstore-all.bat @@ -20,4 +20,5 @@ call .\bin\windows\java-petstore-webclient.bat call .\bin\windows\java-petstore-resteasy.bat call .\bin\windows\java-petstore-google-api-client.bat call .\bin\windows\java-petstore-rest-assured.bat +call .\bin\windows\java-petstore-rest-assured-jackson.bat call .\bin\windows\java-petstore-vertx.bat diff --git a/bin/windows/java-petstore-rest-assured-jackson.bat b/bin/windows/java-petstore-rest-assured-jackson.bat new file mode 100644 index 000000000000..8104df8b771d --- /dev/null +++ b/bin/windows/java-petstore-rest-assured-jackson.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +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-jackson.json -o samples\client\petstore\java\rest-assured-jackson --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,java8=true,dateLibrary=java8,serializationLibrary=jackson,useBeanValidation=true,performBeanValidation=true, + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index 640ad1cd18ca..0868a2aa7c0e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -101,7 +101,10 @@ ext { {{#jackson}} jackson_version = "2.10.3" jackson_databind_version = "2.10.3" - jackson_databind_nullable_version = 0.2.1 + jackson_databind_nullable_version = "0.2.1" + {{#threetenbp}} + jackson_threetenbp_version = "2.10.0" + {{/threetenbp}} {{/jackson}} {{#gson}} gson_version = "2.8.6" @@ -119,13 +122,25 @@ ext { dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.code.findbugs:jsr305:3.0.2" - compile "io.rest-assured:scala-support:$rest_assured_version" + compile "io.rest-assured:rest-assured:$rest_assured_version" {{#jackson}} compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + {{#withXml}} + compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" + {{/withXml}} + {{#joda}} + compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + {{/joda}} + {{#java8}} + compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + {{/java8}} + {{#threetenbp}} + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" + {{/threetenbp}} {{/jackson}} {{#gson}} compile "io.gsonfire:gson-fire:$gson_fire_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache index 77f8af4f436e..955f515fc70f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache @@ -10,11 +10,26 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.21", + "io.rest-assured" % "rest-assured" % "4.3.0", "io.rest-assured" % "scala-support" % "4.3.0", + "com.google.code.findbugs" % "jsr305" % "3.0.2", {{#jackson}} - "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3", + "org.openapitools" % "jackson-databind-nullable" % "0.2.1", + {{#withXml}} + "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.10.3", + {{/withXml}} + {{#joda}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.10.3", + {{/joda}} + {{#java8}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.10.3", + {{/java8}} + {{#threetenbp}} + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.10.0", + {{/threetenbp}} {{/jackson}} {{#gson}} "com.google.code.gson" % "gson" % "2.8.6", @@ -31,7 +46,7 @@ lazy val root = (project in file(".")). "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", {{/useBeanValidation}} {{#performBeanValidation}} - "org.hibernate" % "hibernate-validator" "6.0.19.Final" % "compile", + "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", {{/performBeanValidation}} "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/pom.xml b/pom.xml index 361c55d06232..df4f81ac4e5d 100644 --- a/pom.xml +++ b/pom.xml @@ -1320,6 +1320,7 @@ samples/client/petstore/java/resteasy samples/client/petstore/java/google-api-client samples/client/petstore/java/rest-assured + samples/client/petstore/java/rest-assured-jackson samples/client/petstore/groovy samples/server/petstore/jaxrs-jersey diff --git a/samples/client/petstore/java/rest-assured-jackson/.gitignore b/samples/client/petstore/java/rest-assured-jackson/.gitignore new file mode 100644 index 000000000000..a530464afa1b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator-ignore b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/.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/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION new file mode 100644 index 000000000000..b5d898602c2c --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.travis.yml b/samples/client/petstore/java/rest-assured-jackson/.travis.yml new file mode 100644 index 000000000000..e3bdf2af1bea --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/samples/client/petstore/java/rest-assured-jackson/README.md b/samples/client/petstore/java/rest-assured-jackson/README.md new file mode 100644 index 000000000000..5ddd1aa2147f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/README.md @@ -0,0 +1,43 @@ +# petstore-rest-assured-jackson + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + org.openapitools + petstore-rest-assured-jackson + 1.0.0 + compile + + +``` + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml new file mode 100644 index 000000000000..30aad25824c8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -0,0 +1,2183 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + 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 + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + 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 + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + /store/order/{order_id}: + delete: + 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 + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + 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 + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $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: + - store + x-accepts: application/json + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $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: + - user + x-accepts: application/json + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /fake/test-query-paramters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + 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 + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + 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 + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + securitySchemes: + petstore_auth: + 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: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http + diff --git a/samples/client/petstore/java/rest-assured-jackson/build.gradle b/samples/client/petstore/java/rest-assured-jackson/build.gradle new file mode 100644 index 000000000000..ca4ac63c3ec8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/build.gradle @@ -0,0 +1,121 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'org.openapitools' +version = '1.0.0' + +buildscript { + repositories { + maven { url "https://repo1.maven.org/maven2" } + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + install { + repositories.mavenInstaller { + pom.artifactId = 'petstore-rest-assured-jackson' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.5.21" + rest_assured_version = "4.3.0" + junit_version = "4.13" + jackson_version = "2.10.3" + jackson_databind_version = "2.10.3" + jackson_databind_nullable_version = "0.2.1" + okio_version = "1.17.5" +} + +dependencies { + compile "io.swagger:swagger-annotations:$swagger_annotations_version" + compile "com.google.code.findbugs:jsr305:3.0.2" + compile "io.rest-assured:rest-assured:$rest_assured_version" + compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" + compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + compile "com.squareup.okio:okio:$okio_version" + compile "javax.validation:validation-api:2.0.1.Final" + compile "org.hibernate:hibernate-validator:6.0.19.Final" + testCompile "junit:junit:$junit_version" +} diff --git a/samples/client/petstore/java/rest-assured-jackson/build.sbt b/samples/client/petstore/java/rest-assured-jackson/build.sbt new file mode 100644 index 000000000000..8f167f16a2f3 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/build.sbt @@ -0,0 +1,27 @@ +lazy val root = (project in file(".")). + settings( + organization := "org.openapitools", + name := "petstore-rest-assured-jackson", + version := "1.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.21", + "io.rest-assured" % "rest-assured" % "4.3.0", + "io.rest-assured" % "scala-support" % "4.3.0", + "com.google.code.findbugs" % "jsr305" % "3.0.2", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3", + "org.openapitools" % "jackson-databind-nullable" % "0.2.1", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.10.3", + "com.squareup.okio" % "okio" % "1.17.5" % "compile", + "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", + "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", + "junit" % "junit" % "4.13" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md new file mode 100644 index 000000000000..87b468bb7ca3 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesAnyType.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesAnyType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md new file mode 100644 index 000000000000..cb7fe9b3903d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesArray.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesArray + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md new file mode 100644 index 000000000000..6b53e7ba73a1 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesBoolean.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesBoolean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..36e181620016 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md @@ -0,0 +1,22 @@ + + +# AdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **Map<String, String>** | | [optional] +**mapNumber** | [**Map<String, BigDecimal>**](BigDecimal.md) | | [optional] +**mapInteger** | **Map<String, Integer>** | | [optional] +**mapBoolean** | **Map<String, Boolean>** | | [optional] +**mapArrayInteger** | [**Map<String, List<Integer>>**](List.md) | | [optional] +**mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] +**mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] +**mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**anytype1** | [**Object**](.md) | | [optional] +**anytype2** | [**Object**](.md) | | [optional] +**anytype3** | [**Object**](.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md new file mode 100644 index 000000000000..d2ed7fb1a460 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesInteger.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesInteger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md new file mode 100644 index 000000000000..53f6e81e7176 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesNumber.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md new file mode 100644 index 000000000000..98ac8d2e5fe0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesObject.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md new file mode 100644 index 000000000000..d7970cdfe190 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesString.md @@ -0,0 +1,12 @@ + + +# AdditionalPropertiesString + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md b/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md new file mode 100644 index 000000000000..c8e18ae55e4f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Animal.md @@ -0,0 +1,13 @@ + + +# Animal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md new file mode 100644 index 000000000000..8763b590990a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md @@ -0,0 +1,51 @@ +# AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags + + + +# **call123testSpecialTags** +> Client call123testSpecialTags(body) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +AnotherFakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake(); + +api.call123testSpecialTags() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..a48aa23e78ee --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,12 @@ + + +# ArrayOfArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..fa2909211a07 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayOfNumberOnly.md @@ -0,0 +1,12 @@ + + +# ArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md new file mode 100644 index 000000000000..9ad1c9814a51 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md @@ -0,0 +1,14 @@ + + +# ArrayTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **List<String>** | | [optional] +**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional] +**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md b/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md new file mode 100644 index 000000000000..8a075304abf8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/BigCat.md @@ -0,0 +1,23 @@ + + +# BigCat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kind** | [**KindEnum**](#KindEnum) | | [optional] + + + +## Enum: KindEnum + +Name | Value +---- | ----- +LIONS | "lions" +TIGERS | "tigers" +LEOPARDS | "leopards" +JAGUARS | "jaguars" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md new file mode 100644 index 000000000000..21177dbf089d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md @@ -0,0 +1,23 @@ + + +# BigCatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kind** | [**KindEnum**](#KindEnum) | | [optional] + + + +## Enum: KindEnum + +Name | Value +---- | ----- +LIONS | "lions" +TIGERS | "tigers" +LEOPARDS | "leopards" +JAGUARS | "jaguars" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md b/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md new file mode 100644 index 000000000000..7b73c40b5545 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Capitalization.md @@ -0,0 +1,17 @@ + + +# Capitalization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**scAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured/docs/StringBooleanMap.md b/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md similarity index 68% rename from samples/client/petstore/java/rest-assured/docs/StringBooleanMap.md rename to samples/client/petstore/java/rest-assured-jackson/docs/Cat.md index cac7afc80e07..39c2f864df88 100644 --- a/samples/client/petstore/java/rest-assured/docs/StringBooleanMap.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Cat.md @@ -1,9 +1,12 @@ -# StringBooleanMap + +# Cat ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**declawed** | **Boolean** | | [optional] diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md new file mode 100644 index 000000000000..1098fd900c5d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md @@ -0,0 +1,12 @@ + + +# CatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Boolean** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Category.md b/samples/client/petstore/java/rest-assured-jackson/docs/Category.md new file mode 100644 index 000000000000..613ea9f7ee24 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Category.md @@ -0,0 +1,13 @@ + + +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md b/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md new file mode 100644 index 000000000000..d5453c20133a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ClassModel.md @@ -0,0 +1,13 @@ + + +# ClassModel + +Model for testing model with \"_class\" property +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**propertyClass** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Client.md b/samples/client/petstore/java/rest-assured-jackson/docs/Client.md new file mode 100644 index 000000000000..228df492383f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Client.md @@ -0,0 +1,12 @@ + + +# Client + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured/docs/AnimalFarm.md b/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md similarity index 70% rename from samples/client/petstore/java/rest-assured/docs/AnimalFarm.md rename to samples/client/petstore/java/rest-assured-jackson/docs/Dog.md index c7c7f1ddcce6..73cedf2bc919 100644 --- a/samples/client/petstore/java/rest-assured/docs/AnimalFarm.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Dog.md @@ -1,9 +1,12 @@ -# AnimalFarm + +# Dog ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md new file mode 100644 index 000000000000..cbeb9e9a22df --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md @@ -0,0 +1,12 @@ + + +# DogAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md b/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md new file mode 100644 index 000000000000..869b7a6c066d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/EnumArrays.md @@ -0,0 +1,31 @@ + + +# EnumArrays + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] +**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] + + + +## Enum: JustSymbolEnum + +Name | Value +---- | ----- +GREATER_THAN_OR_EQUAL_TO | ">=" +DOLLAR | "$" + + + +## Enum: List<ArrayEnumEnum> + +Name | Value +---- | ----- +FISH | "fish" +CRAB | "crab" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/EnumClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/EnumClass.md new file mode 100644 index 000000000000..b314590a7591 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/EnumClass.md @@ -0,0 +1,15 @@ + + +# EnumClass + +## Enum + + +* `_ABC` (value: `"_abc"`) + +* `_EFG` (value: `"-efg"`) + +* `_XYZ_` (value: `"(xyz)"`) + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md new file mode 100644 index 000000000000..61eb95f22fe9 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/EnumTest.md @@ -0,0 +1,54 @@ + + +# EnumTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] +**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | +**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] +**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + + + +## Enum: EnumStringEnum + +Name | Value +---- | ----- +UPPER | "UPPER" +LOWER | "lower" +EMPTY | "" + + + +## Enum: EnumStringRequiredEnum + +Name | Value +---- | ----- +UPPER | "UPPER" +LOWER | "lower" +EMPTY | "" + + + +## Enum: EnumIntegerEnum + +Name | Value +---- | ----- +NUMBER_1 | 1 +NUMBER_MINUS_1 | -1 + + + +## Enum: EnumNumberEnum + +Name | Value +---- | ----- +NUMBER_1_DOT_1 | 1.1 +NUMBER_MINUS_1_DOT_2 | -1.2 + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md new file mode 100644 index 000000000000..075077996e76 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md @@ -0,0 +1,641 @@ +# FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters | + + + +# **createXmlItem** +> createXmlItem(xmlItem) + +creates an XmlItem + +this route creates an XmlItem + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.createXmlItem() + .body(xmlItem).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | + +### Return type + +null (empty response body) + +### Authorization + +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 + + +# **fakeOuterBooleanSerialize** +> Boolean fakeOuterBooleanSerialize(body) + + + +Test serialization of outer boolean types + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.fakeOuterBooleanSerialize().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Boolean**| Input boolean as post body | [optional] + +### Return type + +**Boolean** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +# **fakeOuterCompositeSerialize** +> OuterComposite fakeOuterCompositeSerialize(body) + + + +Test serialization of object with outer number type + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.fakeOuterCompositeSerialize().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +# **fakeOuterNumberSerialize** +> BigDecimal fakeOuterNumberSerialize(body) + + + +Test serialization of outer number types + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.fakeOuterNumberSerialize().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **BigDecimal**| Input number as post body | [optional] + +### Return type + +[**BigDecimal**](BigDecimal.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +# **fakeOuterStringSerialize** +> String fakeOuterStringSerialize(body) + + + +Test serialization of outer string types + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.fakeOuterStringSerialize().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +# **testBodyWithFileSchema** +> testBodyWithFileSchema(body) + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testBodyWithFileSchema() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **testBodyWithQueryParams** +> testBodyWithQueryParams(query, body) + + + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testBodyWithQueryParams() + .queryQuery(query) + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **body** | [**User**](User.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **testClientModel** +> Client testClientModel(body) + +To test \"client\" model + +To test \"client\" model + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testClientModel() + .body(body).execute(r -> r.prettyPeek()); +``` + +### 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 + + +# **testEndpointParameters** +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testEndpointParameters() + .numberForm(number) + ._doubleForm(_double) + .patternWithoutDelimiterForm(patternWithoutDelimiter) + ._byteForm(_byte).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **BigDecimal**| None | + **_double** | **Double**| None | + **patternWithoutDelimiter** | **String**| None | + **_byte** | **byte[]**| None | + **integer** | **Integer**| None | [optional] + **int32** | **Integer**| None | [optional] + **int64** | **Long**| None | [optional] + **_float** | **Float**| None | [optional] + **string** | **String**| None | [optional] + **binary** | **File**| None | [optional] + **date** | **LocalDate**| None | [optional] + **dateTime** | **OffsetDateTime**| None | [optional] + **password** | **String**| None | [optional] + **paramCallback** | **String**| None | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **testEnumParameters** +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + +To test enum parameters + +To test enum parameters + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testEnumParameters().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [default to new ArrayList<>()] [enum: >, $] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [default to new ArrayList<>()] [enum: >, $] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] + **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] + **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **testGroupParameters** +> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testGroupParameters() + .requiredStringGroupQuery(requiredStringGroup) + .requiredBooleanGroupHeader(requiredBooleanGroup) + .requiredInt64GroupQuery(requiredInt64Group).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Integer**| Required String in group parameters | + **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | + **requiredInt64Group** | **Long**| Required Integer in group parameters | + **stringGroup** | **Integer**| String in group parameters | [optional] + **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] + **int64Group** | **Long**| Integer in group parameters | [optional] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **testInlineAdditionalProperties** +> testInlineAdditionalProperties(param) + +test inline additionalProperties + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testInlineAdditionalProperties() + .body(param).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**Map<String, String>**](String.md)| request body | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **testJsonFormData** +> testJsonFormData(param, param2) + +test json serialization of form data + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testJsonFormData() + .paramForm(param) + .param2Form(param2).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String**| field1 | + **param2** | **String**| field2 | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **testQueryParameterCollectionFormat** +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) + + + +To test the collection format in query parameters + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testQueryParameterCollectionFormat() + .pipeQuery(pipe) + .ioutilQuery(ioutil) + .httpQuery(http) + .urlQuery(url) + .contextQuery(context).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<String>**](String.md)| | [default to new ArrayList<>()] + **ioutil** | [**List<String>**](String.md)| | [default to new ArrayList<>()] + **http** | [**List<String>**](String.md)| | [default to new ArrayList<>()] + **url** | [**List<String>**](String.md)| | [default to new ArrayList<>()] + **context** | [**List<String>**](String.md)| | [default to new ArrayList<>()] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..7aa78d36b357 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeClassnameTags123Api.md @@ -0,0 +1,51 @@ +# FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case + + + +# **testClassname** +> Client testClassname(body) + +To test class name in snake case + +To test class name in snake case + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeClassnameTags123Api api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fakeClassnameTags123(); + +api.testClassname() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md new file mode 100644 index 000000000000..3a95e27d7c09 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FileSchemaTestClass.md @@ -0,0 +1,13 @@ + + +# FileSchemaTestClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**java.io.File**](java.io.File.md) | | [optional] +**files** | [**List<java.io.File>**](java.io.File.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md new file mode 100644 index 000000000000..d138e921902a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FormatTest.md @@ -0,0 +1,25 @@ + + +# FormatTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | | [optional] +**int32** | **Integer** | | [optional] +**int64** | **Long** | | [optional] +**number** | [**BigDecimal**](BigDecimal.md) | | +**_float** | **Float** | | [optional] +**_double** | **Double** | | [optional] +**string** | **String** | | [optional] +**_byte** | **byte[]** | | +**binary** | [**File**](File.md) | | [optional] +**date** | [**LocalDate**](LocalDate.md) | | +**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**uuid** | [**UUID**](UUID.md) | | [optional] +**password** | **String** | | +**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md new file mode 100644 index 000000000000..4795b40ef65e --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/HasOnlyReadOnly.md @@ -0,0 +1,13 @@ + + +# HasOnlyReadOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md new file mode 100644 index 000000000000..c35c3cf2c0be --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/MapTest.md @@ -0,0 +1,24 @@ + + +# MapTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] +**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] +**directMap** | **Map<String, Boolean>** | | [optional] +**indirectMap** | **Map<String, Boolean>** | | [optional] + + + +## Enum: Map<String, InnerEnum> + +Name | Value +---- | ----- +UPPER | "UPPER" +LOWER | "lower" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..3dc283ae4936 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,14 @@ + + +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | [**UUID**](UUID.md) | | [optional] +**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**map** | [**Map<String, Animal>**](Animal.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md b/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md new file mode 100644 index 000000000000..f9928d70622c --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Model200Response.md @@ -0,0 +1,14 @@ + + +# Model200Response + +Model for testing model name starting with number +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | [optional] +**propertyClass** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md new file mode 100644 index 000000000000..14fb7f1ed27b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelApiResponse.md @@ -0,0 +1,14 @@ + + +# ModelApiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md b/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md new file mode 100644 index 000000000000..5005d4b72392 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ModelReturn.md @@ -0,0 +1,13 @@ + + +# ModelReturn + +Model for testing reserved words +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Name.md b/samples/client/petstore/java/rest-assured-jackson/docs/Name.md new file mode 100644 index 000000000000..b815a0b4c994 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Name.md @@ -0,0 +1,16 @@ + + +# Name + +Model for testing model name same as property name +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | +**snakeCase** | **Integer** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md b/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md new file mode 100644 index 000000000000..1c12b6adf3bd --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/NumberOnly.md @@ -0,0 +1,12 @@ + + +# NumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Order.md b/samples/client/petstore/java/rest-assured-jackson/docs/Order.md new file mode 100644 index 000000000000..409fc4cc9616 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Order.md @@ -0,0 +1,27 @@ + + +# Order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**petId** | **Long** | | [optional] +**quantity** | **Integer** | | [optional] +**shipDate** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] +**complete** | **Boolean** | | [optional] + + + +## Enum: StatusEnum + +Name | Value +---- | ----- +PLACED | "placed" +APPROVED | "approved" +DELIVERED | "delivered" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md b/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md new file mode 100644 index 000000000000..e06292218847 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/OuterComposite.md @@ -0,0 +1,14 @@ + + +# OuterComposite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Boolean** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/OuterEnum.md b/samples/client/petstore/java/rest-assured-jackson/docs/OuterEnum.md new file mode 100644 index 000000000000..1f9b723eb8e7 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/OuterEnum.md @@ -0,0 +1,15 @@ + + +# OuterEnum + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md b/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md new file mode 100644 index 000000000000..37ac007b7931 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Pet.md @@ -0,0 +1,27 @@ + + +# Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **List<String>** | | +**tags** | [**List<Tag>**](Tag.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] + + + +## Enum: StatusEnum + +Name | Value +---- | ----- +AVAILABLE | "available" +PENDING | "pending" +SOLD | "sold" + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md new file mode 100644 index 000000000000..c2aaadd88c76 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/PetApi.md @@ -0,0 +1,391 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.addPet() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.deletePet() + .petIdPath(petId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **findPetsByStatus** +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.findPetsByStatus() + .statusQuery(status).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to new ArrayList<>()] [enum: available, pending, sold] + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByTags** +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.findPetsByTags() + .tagsQuery(tags).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | [default to new ArrayList<>()] + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.getPetById() + .petIdPath(petId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.updatePet() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.updatePetWithForm() + .petIdPath(petId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **uploadFile** +> ModelApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.uploadFile() + .petIdPath(petId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **file** | **File**| file to upload | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + +uploads an image (required) + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.uploadFileWithRequiredFile() + .petIdPath(petId) + .requiredFileMultiPart(requiredFile).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **requiredFile** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md b/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md new file mode 100644 index 000000000000..a692499dc661 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ReadOnlyFirst.md @@ -0,0 +1,13 @@ + + +# ReadOnlyFirst + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md b/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md new file mode 100644 index 000000000000..934b8f0f25d7 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/SpecialModelName.md @@ -0,0 +1,12 @@ + + +# SpecialModelName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**$specialPropertyName** | **Long** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md new file mode 100644 index 000000000000..2fc7a8ebbbf0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md @@ -0,0 +1,174 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +StoreApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); + +api.deleteOrder() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getInventory** +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +StoreApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); + +api.getInventory().execute(r -> r.prettyPeek()); +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +StoreApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); + +api.getOrderById() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +StoreApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); + +api.placeOrder() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md b/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md new file mode 100644 index 000000000000..f24eba7d222e --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/Tag.md @@ -0,0 +1,13 @@ + + +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md new file mode 100644 index 000000000000..a338fc900cb1 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderDefault.md @@ -0,0 +1,16 @@ + + +# TypeHolderDefault + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | [**BigDecimal**](BigDecimal.md) | | +**integerItem** | **Integer** | | +**boolItem** | **Boolean** | | +**arrayItem** | **List<Integer>** | | + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md new file mode 100644 index 000000000000..f8858da60664 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/TypeHolderExample.md @@ -0,0 +1,17 @@ + + +# TypeHolderExample + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | [**BigDecimal**](BigDecimal.md) | | +**floatItem** | **Float** | | +**integerItem** | **Integer** | | +**boolItem** | **Boolean** | | +**arrayItem** | **List<Integer>** | | + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/User.md b/samples/client/petstore/java/rest-assured-jackson/docs/User.md new file mode 100644 index 000000000000..c4ea94b7fc17 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/User.md @@ -0,0 +1,19 @@ + + +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Integer** | User Status | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md new file mode 100644 index 000000000000..5f5a5dbd3627 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md @@ -0,0 +1,342 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.createUser() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.createUsersWithArrayInput() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.createUsersWithListInput() + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.deleteUser() + .usernamePath(username).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.getUserByName() + .usernamePath(username).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.loginUser() + .usernameQuery(username) + .passwordQuery(password).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.logoutUser().execute(r -> r.prettyPeek()); +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +UserApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + +api.updateUser() + .usernamePath(username) + .body(body).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md b/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md new file mode 100644 index 000000000000..6065fd1f4e59 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/docs/XmlItem.md @@ -0,0 +1,40 @@ + + +# XmlItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributeString** | **String** | | [optional] +**attributeNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**attributeInteger** | **Integer** | | [optional] +**attributeBoolean** | **Boolean** | | [optional] +**wrappedArray** | **List<Integer>** | | [optional] +**nameString** | **String** | | [optional] +**nameNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**nameInteger** | **Integer** | | [optional] +**nameBoolean** | **Boolean** | | [optional] +**nameArray** | **List<Integer>** | | [optional] +**nameWrappedArray** | **List<Integer>** | | [optional] +**prefixString** | **String** | | [optional] +**prefixNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**prefixInteger** | **Integer** | | [optional] +**prefixBoolean** | **Boolean** | | [optional] +**prefixArray** | **List<Integer>** | | [optional] +**prefixWrappedArray** | **List<Integer>** | | [optional] +**namespaceString** | **String** | | [optional] +**namespaceNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**namespaceInteger** | **Integer** | | [optional] +**namespaceBoolean** | **Boolean** | | [optional] +**namespaceArray** | **List<Integer>** | | [optional] +**namespaceWrappedArray** | **List<Integer>** | | [optional] +**prefixNsString** | **String** | | [optional] +**prefixNsNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +**prefixNsInteger** | **Integer** | | [optional] +**prefixNsBoolean** | **Boolean** | | [optional] +**prefixNsArray** | **List<Integer>** | | [optional] +**prefixNsWrappedArray** | **List<Integer>** | | [optional] + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/git_push.sh b/samples/client/petstore/java/rest-assured-jackson/git_push.sh new file mode 100644 index 000000000000..ced3be2b0c7b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/java/rest-assured-jackson/gradle.properties b/samples/client/petstore/java/rest-assured-jackson/gradle.properties new file mode 100644 index 000000000000..05644f0754af --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000000..cc4fdc293d0e Binary files /dev/null and b/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..94920145f34e --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/petstore/java/rest-assured-jackson/gradlew b/samples/client/petstore/java/rest-assured-jackson/gradlew new file mode 100644 index 000000000000..2fe81a7d95e4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/gradlew @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# 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 +# +# https://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. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + 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='"-Xmx64m" "-Xms64m"' + +# 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 or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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=`expr $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" + +exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/java/rest-assured-jackson/gradlew.bat b/samples/client/petstore/java/rest-assured-jackson/gradlew.bat new file mode 100644 index 000000000000..9618d8d9607c --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@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="-Xmx64m" "-Xms64m" + +@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 diff --git a/samples/client/petstore/java/rest-assured-jackson/pom.xml b/samples/client/petstore/java/rest-assured-jackson/pom.xml new file mode 100644 index 000000000000..3666b630e03a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/pom.xml @@ -0,0 +1,287 @@ + + 4.0.0 + org.openapitools + petstore-rest-assured-jackson + jar + petstore-rest-assured-jackson + 1.0.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + https://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-maven + + enforce + + + + + 3.0.5 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + false + 1C + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + com.fasterxml.jackson + jackson-bom + ${jackson-version} + pom + import + + + + + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + io.rest-assured + rest-assured + ${rest-assured.version} + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.squareup.okio + okio + ${okio-version} + + + + javax.validation + validation-api + 2.0.1.Final + provided + + + + org.hibernate + hibernate-validator + 6.0.19.Final + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 1.5.21 + 4.3.0 + 2.8.6 + 1.8.4 + 2.10.3 + 0.2.1 + 1.17.5 + 4.13 + + diff --git a/samples/client/petstore/java/rest-assured-jackson/settings.gradle b/samples/client/petstore/java/rest-assured-jackson/settings.gradle new file mode 100644 index 000000000000..646eb0c11ed2 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "petstore-rest-assured-jackson" \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/AndroidManifest.xml b/samples/client/petstore/java/rest-assured-jackson/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..54fbcb3da1e8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 000000000000..2af3090b72d2 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,78 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import org.openapitools.client.api.*; + +import io.restassured.builder.RequestSpecBuilder; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + + +public class ApiClient { + public static final String BASE_URI = "http://petstore.swagger.io:80/v2"; + + private final Config config; + + private ApiClient(Config config) { + this.config = config; + } + + public static ApiClient api(Config config) { + return new ApiClient(config); + } + + public AnotherFakeApi anotherFake() { + return AnotherFakeApi.anotherFake(config.reqSpecSupplier); + } + public FakeApi fake() { + return FakeApi.fake(config.reqSpecSupplier); + } + public FakeClassnameTags123Api fakeClassnameTags123() { + return FakeClassnameTags123Api.fakeClassnameTags123(config.reqSpecSupplier); + } + public PetApi pet() { + return PetApi.pet(config.reqSpecSupplier); + } + public StoreApi store() { + return StoreApi.store(config.reqSpecSupplier); + } + public UserApi user() { + return UserApi.user(config.reqSpecSupplier); + } + + public static class Config { + private Supplier reqSpecSupplier = () -> new RequestSpecBuilder() + .setBaseUri(BASE_URI) + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))); + + /** + * Use common specification for all operations + * @param supplier supplier + * @return configuration + */ + public Config reqSpecSupplier(Supplier supplier) { + this.reqSpecSupplier = supplier; + return this; + } + + public static Config apiConfig() { + return new Config(); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java new file mode 100644 index 000000000000..28b41ac559e5 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java @@ -0,0 +1,27 @@ +package org.openapitools.client; + +import java.util.Set; + +import javax.validation.ConstraintViolation; +import javax.validation.ValidationException; + +public class BeanValidationException extends ValidationException { + /** + * + */ + private static final long serialVersionUID = -5294733947409491364L; + Set> violations; + + public BeanValidationException(Set> violations) { + this.violations = violations; + } + + public Set> getViolations() { + return violations; + } + + public void setViolations(Set> violations) { + this.violations = violations; + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/JacksonObjectMapper.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/JacksonObjectMapper.java new file mode 100644 index 000000000000..f6ea587ad2e0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/JacksonObjectMapper.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; + +import io.restassured.internal.mapping.Jackson2Mapper; +import io.restassured.path.json.mapper.factory.Jackson2ObjectMapperFactory; + + +public class JacksonObjectMapper extends Jackson2Mapper { + + private JacksonObjectMapper() { + super(createFactory()); + } + + private static Jackson2ObjectMapperFactory createFactory() { + return (cls, charset) -> { + ObjectMapper mapper = new ObjectMapper(); + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + return mapper; + }; + } + + public static JacksonObjectMapper jackson() { + return new JacksonObjectMapper(); + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java new file mode 100644 index 000000000000..9509fd089812 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -0,0 +1,32 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.databind.util.ISO8601DateFormat; +import com.fasterxml.jackson.databind.util.ISO8601Utils; + +import java.text.FieldPosition; +import java.util.Date; + + +public class RFC3339DateFormat extends ISO8601DateFormat { + + // Same as ISO8601DateFormat but serializing milliseconds. + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + String value = ISO8601Utils.format(date, true); + toAppendTo.append(value); + return toAppendTo; + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ResponseSpecBuilders.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ResponseSpecBuilders.java new file mode 100644 index 000000000000..412baa1bfaa8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ResponseSpecBuilders.java @@ -0,0 +1,42 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.response.Response; +import io.restassured.specification.ResponseSpecification; + +import java.util.function.Function; + +public class ResponseSpecBuilders { + + private ResponseSpecBuilders() { + } + + public static Function validatedWith(ResponseSpecification respSpec) { + return response -> response.then().spec(respSpec).extract().response(); + } + + public static Function validatedWith(ResponseSpecBuilder respSpec) { + return validatedWith(respSpec.build()); + } + + /** + * @param code expected status code + * @return ResponseSpecBuilder + */ + public static ResponseSpecBuilder shouldBeCode(int code) { + return new ResponseSpecBuilder().expectStatusCode(code); + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 000000000000..a1107a8690e4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A describtion of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replaceAll("\\{" + name + "\\}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 000000000000..c2f13e216662 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java new file mode 100644 index 000000000000..90773790231d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -0,0 +1,157 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Client; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "AnotherFake") +public class AnotherFakeApi { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private AnotherFakeApi(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static AnotherFakeApi anotherFake(Supplier reqSpecSupplier) { + return new AnotherFakeApi(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + call123testSpecialTags() + ); + } + + @ApiOperation(value = "To test special tags", + notes = "To test special tags and operation ID starting with number", + nickname = "call123testSpecialTags", + tags = { "$another-fake?" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public Call123testSpecialTagsOper call123testSpecialTags() { + return new Call123testSpecialTagsOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public AnotherFakeApi reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * To test special tags + * To test special tags and operation ID starting with number + * + * @see #body client model (required) + * return Client + */ + public static class Call123testSpecialTagsOper implements Oper { + + public static final Method REQ_METHOD = PATCH; + public static final String REQ_URI = "/another-fake/dummy"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public Call123testSpecialTagsOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PATCH /another-fake/dummy + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * PATCH /another-fake/dummy + * @param handler handler + * @return Client + */ + public Client executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (Client) client model (required) + * @return operation + */ + public Call123testSpecialTagsOper body(Client body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public Call123testSpecialTagsOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public Call123testSpecialTagsOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java new file mode 100644 index 000000000000..2eaac5a4f4e0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -0,0 +1,1527 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import java.math.BigDecimal; +import org.openapitools.client.model.Client; +import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "Fake") +public class FakeApi { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private FakeApi(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static FakeApi fake(Supplier reqSpecSupplier) { + return new FakeApi(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + createXmlItem(), + fakeOuterBooleanSerialize(), + fakeOuterCompositeSerialize(), + fakeOuterNumberSerialize(), + fakeOuterStringSerialize(), + testBodyWithFileSchema(), + testBodyWithQueryParams(), + testClientModel(), + testEndpointParameters(), + testEnumParameters(), + testGroupParameters(), + testInlineAdditionalProperties(), + testJsonFormData(), + testQueryParameterCollectionFormat() + ); + } + + @ApiOperation(value = "creates an XmlItem", + notes = "this route creates an XmlItem", + nickname = "createXmlItem", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public CreateXmlItemOper createXmlItem() { + return new CreateXmlItemOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "Test serialization of outer boolean types", + nickname = "fakeOuterBooleanSerialize", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean") }) + public FakeOuterBooleanSerializeOper fakeOuterBooleanSerialize() { + return new FakeOuterBooleanSerializeOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "Test serialization of object with outer number type", + nickname = "fakeOuterCompositeSerialize", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite") }) + public FakeOuterCompositeSerializeOper fakeOuterCompositeSerialize() { + return new FakeOuterCompositeSerializeOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "Test serialization of outer number types", + nickname = "fakeOuterNumberSerialize", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number") }) + public FakeOuterNumberSerializeOper fakeOuterNumberSerialize() { + return new FakeOuterNumberSerializeOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "Test serialization of outer string types", + nickname = "fakeOuterStringSerialize", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string") }) + public FakeOuterStringSerializeOper fakeOuterStringSerialize() { + return new FakeOuterStringSerializeOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "For this test, the body for this request much reference a schema named `File`.", + nickname = "testBodyWithFileSchema", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) + public TestBodyWithFileSchemaOper testBodyWithFileSchema() { + return new TestBodyWithFileSchemaOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "", + nickname = "testBodyWithQueryParams", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) + public TestBodyWithQueryParamsOper testBodyWithQueryParams() { + return new TestBodyWithQueryParamsOper(createReqSpec()); + } + + @ApiOperation(value = "To test \"client\" model", + notes = "To test \"client\" model", + nickname = "testClientModel", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public TestClientModelOper testClientModel() { + return new TestClientModelOper(createReqSpec()); + } + + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied") , + @ApiResponse(code = 404, message = "User not found") }) + public TestEndpointParametersOper testEndpointParameters() { + return new TestEndpointParametersOper(createReqSpec()); + } + + @ApiOperation(value = "To test enum parameters", + notes = "To test enum parameters", + nickname = "testEnumParameters", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request") , + @ApiResponse(code = 404, message = "Not found") }) + public TestEnumParametersOper testEnumParameters() { + return new TestEnumParametersOper(createReqSpec()); + } + + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", + notes = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + public TestGroupParametersOper testGroupParameters() { + return new TestGroupParametersOper(createReqSpec()); + } + + @ApiOperation(value = "test inline additionalProperties", + notes = "", + nickname = "testInlineAdditionalProperties", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public TestInlineAdditionalPropertiesOper testInlineAdditionalProperties() { + return new TestInlineAdditionalPropertiesOper(createReqSpec()); + } + + @ApiOperation(value = "test json serialization of form data", + notes = "", + nickname = "testJsonFormData", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public TestJsonFormDataOper testJsonFormData() { + return new TestJsonFormDataOper(createReqSpec()); + } + + @ApiOperation(value = "", + notes = "To test the collection format in query parameters", + nickname = "testQueryParameterCollectionFormat", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) + public TestQueryParameterCollectionFormatOper testQueryParameterCollectionFormat() { + return new TestQueryParameterCollectionFormatOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public FakeApi reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * creates an XmlItem + * this route creates an XmlItem + * + * @see #body XmlItem Body (required) + */ + public static class CreateXmlItemOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/create_xml_item"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public CreateXmlItemOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/xml"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/create_xml_item + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param xmlItem (XmlItem) XmlItem Body (required) + * @return operation + */ + public CreateXmlItemOper body(XmlItem xmlItem) { + reqSpec.setBody(xmlItem); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public CreateXmlItemOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public CreateXmlItemOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * Test serialization of outer boolean types + * + * @see #body Input boolean as post body (optional) + * return Boolean + */ + public static class FakeOuterBooleanSerializeOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/outer/boolean"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FakeOuterBooleanSerializeOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("*/*"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/outer/boolean + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /fake/outer/boolean + * @param handler handler + * @return Boolean + */ + public Boolean executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (Boolean) Input boolean as post body (optional) + * @return operation + */ + public FakeOuterBooleanSerializeOper body(Boolean body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FakeOuterBooleanSerializeOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FakeOuterBooleanSerializeOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * Test serialization of object with outer number type + * + * @see #body Input composite as post body (optional) + * return OuterComposite + */ + public static class FakeOuterCompositeSerializeOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/outer/composite"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FakeOuterCompositeSerializeOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("*/*"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/outer/composite + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /fake/outer/composite + * @param handler handler + * @return OuterComposite + */ + public OuterComposite executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (OuterComposite) Input composite as post body (optional) + * @return operation + */ + public FakeOuterCompositeSerializeOper body(OuterComposite body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FakeOuterCompositeSerializeOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FakeOuterCompositeSerializeOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * Test serialization of outer number types + * + * @see #body Input number as post body (optional) + * return BigDecimal + */ + public static class FakeOuterNumberSerializeOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/outer/number"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FakeOuterNumberSerializeOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("*/*"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/outer/number + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /fake/outer/number + * @param handler handler + * @return BigDecimal + */ + public BigDecimal executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (BigDecimal) Input number as post body (optional) + * @return operation + */ + public FakeOuterNumberSerializeOper body(BigDecimal body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FakeOuterNumberSerializeOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FakeOuterNumberSerializeOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * Test serialization of outer string types + * + * @see #body Input string as post body (optional) + * return String + */ + public static class FakeOuterStringSerializeOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/outer/string"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FakeOuterStringSerializeOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("*/*"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/outer/string + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /fake/outer/string + * @param handler handler + * @return String + */ + public String executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (String) Input string as post body (optional) + * @return operation + */ + public FakeOuterStringSerializeOper body(String body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FakeOuterStringSerializeOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FakeOuterStringSerializeOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * For this test, the body for this request much reference a schema named `File`. + * + * @see #body (required) + */ + public static class TestBodyWithFileSchemaOper implements Oper { + + public static final Method REQ_METHOD = PUT; + public static final String REQ_URI = "/fake/body-with-file-schema"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestBodyWithFileSchemaOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PUT /fake/body-with-file-schema + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (FileSchemaTestClass) (required) + * @return operation + */ + public TestBodyWithFileSchemaOper body(FileSchemaTestClass body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestBodyWithFileSchemaOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestBodyWithFileSchemaOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * + * + * @see #queryQuery (required) + * @see #body (required) + */ + public static class TestBodyWithQueryParamsOper implements Oper { + + public static final Method REQ_METHOD = PUT; + public static final String REQ_URI = "/fake/body-with-query-params"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestBodyWithQueryParamsOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PUT /fake/body-with-query-params + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (User) (required) + * @return operation + */ + public TestBodyWithQueryParamsOper body(User body) { + reqSpec.setBody(body); + return this; + } + + public static final String QUERY_QUERY = "query"; + + /** + * @param query (String) (required) + * @return operation + */ + public TestBodyWithQueryParamsOper queryQuery(Object... query) { + reqSpec.addQueryParam(QUERY_QUERY, query); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestBodyWithQueryParamsOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestBodyWithQueryParamsOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * To test \"client\" model + * To test \"client\" model + * + * @see #body client model (required) + * return Client + */ + public static class TestClientModelOper implements Oper { + + public static final Method REQ_METHOD = PATCH; + public static final String REQ_URI = "/fake"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestClientModelOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PATCH /fake + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * PATCH /fake + * @param handler handler + * @return Client + */ + public Client executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (Client) client model (required) + * @return operation + */ + public TestClientModelOper body(Client body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestClientModelOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestClientModelOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @see #numberForm None (required) + * @see #_doubleForm None (required) + * @see #patternWithoutDelimiterForm None (required) + * @see #_byteForm None (required) + * @see #integerForm None (optional) + * @see #int32Form None (optional) + * @see #int64Form None (optional) + * @see #_floatForm None (optional) + * @see #stringForm None (optional) + * @see #binaryMultiPart None (optional) + * @see #dateForm None (optional) + * @see #dateTimeForm None (optional) + * @see #passwordForm None (optional) + * @see #paramCallbackForm None (optional) + */ + public static class TestEndpointParametersOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestEndpointParametersOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/x-www-form-urlencoded"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String INTEGER_FORM = "integer"; + + /** + * @param integer (Integer) None (optional) + * @return operation + */ + public TestEndpointParametersOper integerForm(Object... integer) { + reqSpec.addFormParam(INTEGER_FORM, integer); + return this; + } + + public static final String INT32_FORM = "int32"; + + /** + * @param int32 (Integer) None (optional) + * @return operation + */ + public TestEndpointParametersOper int32Form(Object... int32) { + reqSpec.addFormParam(INT32_FORM, int32); + return this; + } + + public static final String INT64_FORM = "int64"; + + /** + * @param int64 (Long) None (optional) + * @return operation + */ + public TestEndpointParametersOper int64Form(Object... int64) { + reqSpec.addFormParam(INT64_FORM, int64); + return this; + } + + public static final String NUMBER_FORM = "number"; + + /** + * @param number (BigDecimal) None (required) + * @return operation + */ + public TestEndpointParametersOper numberForm(Object... number) { + reqSpec.addFormParam(NUMBER_FORM, number); + return this; + } + + public static final String _FLOAT_FORM = "float"; + + /** + * @param _float (Float) None (optional) + * @return operation + */ + public TestEndpointParametersOper _floatForm(Object... _float) { + reqSpec.addFormParam(_FLOAT_FORM, _float); + return this; + } + + public static final String _DOUBLE_FORM = "double"; + + /** + * @param _double (Double) None (required) + * @return operation + */ + public TestEndpointParametersOper _doubleForm(Object... _double) { + reqSpec.addFormParam(_DOUBLE_FORM, _double); + return this; + } + + public static final String STRING_FORM = "string"; + + /** + * @param string (String) None (optional) + * @return operation + */ + public TestEndpointParametersOper stringForm(Object... string) { + reqSpec.addFormParam(STRING_FORM, string); + return this; + } + + public static final String PATTERN_WITHOUT_DELIMITER_FORM = "pattern_without_delimiter"; + + /** + * @param patternWithoutDelimiter (String) None (required) + * @return operation + */ + public TestEndpointParametersOper patternWithoutDelimiterForm(Object... patternWithoutDelimiter) { + reqSpec.addFormParam(PATTERN_WITHOUT_DELIMITER_FORM, patternWithoutDelimiter); + return this; + } + + public static final String _BYTE_FORM = "byte"; + + /** + * @param _byte (byte[]) None (required) + * @return operation + */ + public TestEndpointParametersOper _byteForm(Object... _byte) { + reqSpec.addFormParam(_BYTE_FORM, _byte); + return this; + } + + public static final String DATE_FORM = "date"; + + /** + * @param date (LocalDate) None (optional) + * @return operation + */ + public TestEndpointParametersOper dateForm(Object... date) { + reqSpec.addFormParam(DATE_FORM, date); + return this; + } + + public static final String DATE_TIME_FORM = "dateTime"; + + /** + * @param dateTime (OffsetDateTime) None (optional) + * @return operation + */ + public TestEndpointParametersOper dateTimeForm(Object... dateTime) { + reqSpec.addFormParam(DATE_TIME_FORM, dateTime); + return this; + } + + public static final String PASSWORD_FORM = "password"; + + /** + * @param password (String) None (optional) + * @return operation + */ + public TestEndpointParametersOper passwordForm(Object... password) { + reqSpec.addFormParam(PASSWORD_FORM, password); + return this; + } + + public static final String PARAM_CALLBACK_FORM = "callback"; + + /** + * @param paramCallback (String) None (optional) + * @return operation + */ + public TestEndpointParametersOper paramCallbackForm(Object... paramCallback) { + reqSpec.addFormParam(PARAM_CALLBACK_FORM, paramCallback); + return this; + } + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param binary (File) None (optional) + * @return operation + */ + public TestEndpointParametersOper binaryMultiPart(File binary) { + reqSpec.addMultiPart(binary); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestEndpointParametersOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestEndpointParametersOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * To test enum parameters + * To test enum parameters + * + * @see #enumHeaderStringArrayHeader Header parameter enum test (string array) (optional, default to new ArrayList<>()) + * @see #enumHeaderStringHeader Header parameter enum test (string) (optional, default to -efg) + * @see #enumQueryStringArrayQuery Query parameter enum test (string array) (optional, default to new ArrayList<>()) + * @see #enumQueryStringQuery Query parameter enum test (string) (optional, default to -efg) + * @see #enumQueryIntegerQuery Query parameter enum test (double) (optional) + * @see #enumQueryDoubleQuery Query parameter enum test (double) (optional) + * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to $) + * @see #enumFormStringForm Form parameter enum test (string) (optional, default to -efg) + */ + public static class TestEnumParametersOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/fake"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestEnumParametersOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/x-www-form-urlencoded"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /fake + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String ENUM_HEADER_STRING_ARRAY_HEADER = "enum_header_string_array"; + + /** + * @param enumHeaderStringArray (List<String>) Header parameter enum test (string array) (optional, default to new ArrayList<>()) + * @return operation + */ + public TestEnumParametersOper enumHeaderStringArrayHeader(String enumHeaderStringArray) { + reqSpec.addHeader(ENUM_HEADER_STRING_ARRAY_HEADER, enumHeaderStringArray); + return this; + } + + public static final String ENUM_HEADER_STRING_HEADER = "enum_header_string"; + + /** + * @param enumHeaderString (String) Header parameter enum test (string) (optional, default to -efg) + * @return operation + */ + public TestEnumParametersOper enumHeaderStringHeader(String enumHeaderString) { + reqSpec.addHeader(ENUM_HEADER_STRING_HEADER, enumHeaderString); + return this; + } + + public static final String ENUM_QUERY_STRING_ARRAY_QUERY = "enum_query_string_array"; + + /** + * @param enumQueryStringArray (List<String>) Query parameter enum test (string array) (optional, default to new ArrayList<>()) + * @return operation + */ + public TestEnumParametersOper enumQueryStringArrayQuery(Object... enumQueryStringArray) { + reqSpec.addQueryParam(ENUM_QUERY_STRING_ARRAY_QUERY, enumQueryStringArray); + return this; + } + + public static final String ENUM_QUERY_STRING_QUERY = "enum_query_string"; + + /** + * @param enumQueryString (String) Query parameter enum test (string) (optional, default to -efg) + * @return operation + */ + public TestEnumParametersOper enumQueryStringQuery(Object... enumQueryString) { + reqSpec.addQueryParam(ENUM_QUERY_STRING_QUERY, enumQueryString); + return this; + } + + public static final String ENUM_QUERY_INTEGER_QUERY = "enum_query_integer"; + + /** + * @param enumQueryInteger (Integer) Query parameter enum test (double) (optional) + * @return operation + */ + public TestEnumParametersOper enumQueryIntegerQuery(Object... enumQueryInteger) { + reqSpec.addQueryParam(ENUM_QUERY_INTEGER_QUERY, enumQueryInteger); + return this; + } + + public static final String ENUM_QUERY_DOUBLE_QUERY = "enum_query_double"; + + /** + * @param enumQueryDouble (Double) Query parameter enum test (double) (optional) + * @return operation + */ + public TestEnumParametersOper enumQueryDoubleQuery(Object... enumQueryDouble) { + reqSpec.addQueryParam(ENUM_QUERY_DOUBLE_QUERY, enumQueryDouble); + return this; + } + + public static final String ENUM_FORM_STRING_ARRAY_FORM = "enum_form_string_array"; + + /** + * @param enumFormStringArray (List<String>) Form parameter enum test (string array) (optional, default to $) + * @return operation + */ + public TestEnumParametersOper enumFormStringArrayForm(Object... enumFormStringArray) { + reqSpec.addFormParam(ENUM_FORM_STRING_ARRAY_FORM, enumFormStringArray); + return this; + } + + public static final String ENUM_FORM_STRING_FORM = "enum_form_string"; + + /** + * @param enumFormString (String) Form parameter enum test (string) (optional, default to -efg) + * @return operation + */ + public TestEnumParametersOper enumFormStringForm(Object... enumFormString) { + reqSpec.addFormParam(ENUM_FORM_STRING_FORM, enumFormString); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestEnumParametersOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestEnumParametersOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @see #requiredStringGroupQuery Required String in group parameters (required) + * @see #requiredBooleanGroupHeader Required Boolean in group parameters (required) + * @see #requiredInt64GroupQuery Required Integer in group parameters (required) + * @see #stringGroupQuery String in group parameters (optional) + * @see #booleanGroupHeader Boolean in group parameters (optional) + * @see #int64GroupQuery Integer in group parameters (optional) + */ + public static class TestGroupParametersOper implements Oper { + + public static final Method REQ_METHOD = DELETE; + public static final String REQ_URI = "/fake"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestGroupParametersOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * DELETE /fake + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String REQUIRED_BOOLEAN_GROUP_HEADER = "required_boolean_group"; + + /** + * @param requiredBooleanGroup (Boolean) Required Boolean in group parameters (required) + * @return operation + */ + public TestGroupParametersOper requiredBooleanGroupHeader(String requiredBooleanGroup) { + reqSpec.addHeader(REQUIRED_BOOLEAN_GROUP_HEADER, requiredBooleanGroup); + return this; + } + + public static final String BOOLEAN_GROUP_HEADER = "boolean_group"; + + /** + * @param booleanGroup (Boolean) Boolean in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper booleanGroupHeader(String booleanGroup) { + reqSpec.addHeader(BOOLEAN_GROUP_HEADER, booleanGroup); + return this; + } + + public static final String REQUIRED_STRING_GROUP_QUERY = "required_string_group"; + + /** + * @param requiredStringGroup (Integer) Required String in group parameters (required) + * @return operation + */ + public TestGroupParametersOper requiredStringGroupQuery(Object... requiredStringGroup) { + reqSpec.addQueryParam(REQUIRED_STRING_GROUP_QUERY, requiredStringGroup); + return this; + } + + public static final String REQUIRED_INT64_GROUP_QUERY = "required_int64_group"; + + /** + * @param requiredInt64Group (Long) Required Integer in group parameters (required) + * @return operation + */ + public TestGroupParametersOper requiredInt64GroupQuery(Object... requiredInt64Group) { + reqSpec.addQueryParam(REQUIRED_INT64_GROUP_QUERY, requiredInt64Group); + return this; + } + + public static final String STRING_GROUP_QUERY = "string_group"; + + /** + * @param stringGroup (Integer) String in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper stringGroupQuery(Object... stringGroup) { + reqSpec.addQueryParam(STRING_GROUP_QUERY, stringGroup); + return this; + } + + public static final String INT64_GROUP_QUERY = "int64_group"; + + /** + * @param int64Group (Long) Integer in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper int64GroupQuery(Object... int64Group) { + reqSpec.addQueryParam(INT64_GROUP_QUERY, int64Group); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestGroupParametersOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestGroupParametersOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * test inline additionalProperties + * + * + * @see #body request body (required) + */ + public static class TestInlineAdditionalPropertiesOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/inline-additionalProperties"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestInlineAdditionalPropertiesOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/inline-additionalProperties + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param param (Map<String, String>) request body (required) + * @return operation + */ + public TestInlineAdditionalPropertiesOper body(Map param) { + reqSpec.setBody(param); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestInlineAdditionalPropertiesOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestInlineAdditionalPropertiesOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * test json serialization of form data + * + * + * @see #paramForm field1 (required) + * @see #param2Form field2 (required) + */ + public static class TestJsonFormDataOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/fake/jsonFormData"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestJsonFormDataOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/x-www-form-urlencoded"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /fake/jsonFormData + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String PARAM_FORM = "param"; + + /** + * @param param (String) field1 (required) + * @return operation + */ + public TestJsonFormDataOper paramForm(Object... param) { + reqSpec.addFormParam(PARAM_FORM, param); + return this; + } + + public static final String PARAM2_FORM = "param2"; + + /** + * @param param2 (String) field2 (required) + * @return operation + */ + public TestJsonFormDataOper param2Form(Object... param2) { + reqSpec.addFormParam(PARAM2_FORM, param2); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestJsonFormDataOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestJsonFormDataOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * + * To test the collection format in query parameters + * + * @see #pipeQuery (required) + * @see #ioutilQuery (required) + * @see #httpQuery (required) + * @see #urlQuery (required) + * @see #contextQuery (required) + */ + public static class TestQueryParameterCollectionFormatOper implements Oper { + + public static final Method REQ_METHOD = PUT; + public static final String REQ_URI = "/fake/test-query-paramters"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestQueryParameterCollectionFormatOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PUT /fake/test-query-paramters + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String PIPE_QUERY = "pipe"; + + /** + * @param pipe (List<String>) (required) + * @return operation + */ + public TestQueryParameterCollectionFormatOper pipeQuery(Object... pipe) { + reqSpec.addQueryParam(PIPE_QUERY, pipe); + return this; + } + + public static final String IOUTIL_QUERY = "ioutil"; + + /** + * @param ioutil (List<String>) (required) + * @return operation + */ + public TestQueryParameterCollectionFormatOper ioutilQuery(Object... ioutil) { + reqSpec.addQueryParam(IOUTIL_QUERY, ioutil); + return this; + } + + public static final String HTTP_QUERY = "http"; + + /** + * @param http (List<String>) (required) + * @return operation + */ + public TestQueryParameterCollectionFormatOper httpQuery(Object... http) { + reqSpec.addQueryParam(HTTP_QUERY, http); + return this; + } + + public static final String URL_QUERY = "url"; + + /** + * @param url (List<String>) (required) + * @return operation + */ + public TestQueryParameterCollectionFormatOper urlQuery(Object... url) { + reqSpec.addQueryParam(URL_QUERY, url); + return this; + } + + public static final String CONTEXT_QUERY = "context"; + + /** + * @param context (List<String>) (required) + * @return operation + */ + public TestQueryParameterCollectionFormatOper contextQuery(Object... context) { + reqSpec.addQueryParam(CONTEXT_QUERY, context); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestQueryParameterCollectionFormatOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestQueryParameterCollectionFormatOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..34cb3f7ab593 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -0,0 +1,157 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Client; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "FakeClassnameTags123") +public class FakeClassnameTags123Api { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private FakeClassnameTags123Api(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static FakeClassnameTags123Api fakeClassnameTags123(Supplier reqSpecSupplier) { + return new FakeClassnameTags123Api(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + testClassname() + ); + } + + @ApiOperation(value = "To test class name in snake case", + notes = "To test class name in snake case", + nickname = "testClassname", + tags = { "fake_classname_tags 123#$%^" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public TestClassnameOper testClassname() { + return new TestClassnameOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public FakeClassnameTags123Api reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * To test class name in snake case + * To test class name in snake case + * + * @see #body client model (required) + * return Client + */ + public static class TestClassnameOper implements Oper { + + public static final Method REQ_METHOD = PATCH; + public static final String REQ_URI = "/fake_classname_test"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestClassnameOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PATCH /fake_classname_test + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * PATCH /fake_classname_test + * @param handler handler + * @return Client + */ + public Client executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (Client) client model (required) + * @return operation + */ + public TestClassnameOper body(Client body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public TestClassnameOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public TestClassnameOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/Oper.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/Oper.java new file mode 100644 index 000000000000..d9a11e714666 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/Oper.java @@ -0,0 +1,24 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import io.restassured.response.Response; + +import java.util.function.Function; + +public interface Oper { + + T execute(Function handler); + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 000000000000..b6508c0b98e5 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,885 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "Pet") +public class PetApi { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private PetApi(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static PetApi pet(Supplier reqSpecSupplier) { + return new PetApi(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + addPet(), + deletePet(), + findPetsByStatus(), + findPetsByTags(), + getPetById(), + updatePet(), + updatePetWithForm(), + uploadFile(), + uploadFileWithRequiredFile() + ); + } + + @ApiOperation(value = "Add a new pet to the store", + notes = "", + nickname = "addPet", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 405, message = "Invalid input") }) + public AddPetOper addPet() { + return new AddPetOper(createReqSpec()); + } + + @ApiOperation(value = "Deletes a pet", + notes = "", + nickname = "deletePet", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid pet value") }) + public DeletePetOper deletePet() { + return new DeletePetOper(createReqSpec()); + } + + @ApiOperation(value = "Finds Pets by status", + notes = "Multiple status values can be provided with comma separated strings", + nickname = "findPetsByStatus", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid status value") }) + public FindPetsByStatusOper findPetsByStatus() { + return new FindPetsByStatusOper(createReqSpec()); + } + + @ApiOperation(value = "Finds Pets by tags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + nickname = "findPetsByTags", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid tag value") }) + @Deprecated + public FindPetsByTagsOper findPetsByTags() { + return new FindPetsByTagsOper(createReqSpec()); + } + + @ApiOperation(value = "Find pet by ID", + notes = "Returns a single pet", + nickname = "getPetById", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid ID supplied") , + @ApiResponse(code = 404, message = "Pet not found") }) + public GetPetByIdOper getPetById() { + return new GetPetByIdOper(createReqSpec()); + } + + @ApiOperation(value = "Update an existing pet", + notes = "", + nickname = "updatePet", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid ID supplied") , + @ApiResponse(code = 404, message = "Pet not found") , + @ApiResponse(code = 405, message = "Validation exception") }) + public UpdatePetOper updatePet() { + return new UpdatePetOper(createReqSpec()); + } + + @ApiOperation(value = "Updates a pet in the store with form data", + notes = "", + nickname = "updatePetWithForm", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) + public UpdatePetWithFormOper updatePetWithForm() { + return new UpdatePetWithFormOper(createReqSpec()); + } + + @ApiOperation(value = "uploads an image", + notes = "", + nickname = "uploadFile", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public UploadFileOper uploadFile() { + return new UploadFileOper(createReqSpec()); + } + + @ApiOperation(value = "uploads an image (required)", + notes = "", + nickname = "uploadFileWithRequiredFile", + tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public UploadFileWithRequiredFileOper uploadFileWithRequiredFile() { + return new UploadFileWithRequiredFileOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public PetApi reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * Add a new pet to the store + * + * + * @see #body Pet object that needs to be added to the store (required) + */ + public static class AddPetOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/pet"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public AddPetOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /pet + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (Pet) Pet object that needs to be added to the store (required) + * @return operation + */ + public AddPetOper body(Pet body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public AddPetOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public AddPetOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Deletes a pet + * + * + * @see #petIdPath Pet id to delete (required) + * @see #apiKeyHeader (optional) + */ + public static class DeletePetOper implements Oper { + + public static final Method REQ_METHOD = DELETE; + public static final String REQ_URI = "/pet/{petId}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public DeletePetOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * DELETE /pet/{petId} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String API_KEY_HEADER = "api_key"; + + /** + * @param apiKey (String) (optional) + * @return operation + */ + public DeletePetOper apiKeyHeader(String apiKey) { + reqSpec.addHeader(API_KEY_HEADER, apiKey); + return this; + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) Pet id to delete (required) + * @return operation + */ + public DeletePetOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public DeletePetOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public DeletePetOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @see #statusQuery Status values that need to be considered for filter (required) + * return List<Pet> + */ + public static class FindPetsByStatusOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/pet/findByStatus"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FindPetsByStatusOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /pet/findByStatus + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /pet/findByStatus + * @param handler handler + * @return List<Pet> + */ + public List executeAs(Function handler) { + TypeRef> type = new TypeRef>(){}; + return execute(handler).as(type); + } + + public static final String STATUS_QUERY = "status"; + + /** + * @param status (List<String>) Status values that need to be considered for filter (required) + * @return operation + */ + public FindPetsByStatusOper statusQuery(Object... status) { + reqSpec.addQueryParam(STATUS_QUERY, status); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FindPetsByStatusOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FindPetsByStatusOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @see #tagsQuery Tags to filter by (required) + * return List<Pet> + * @deprecated + */ + @Deprecated + public static class FindPetsByTagsOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/pet/findByTags"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public FindPetsByTagsOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /pet/findByTags + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /pet/findByTags + * @param handler handler + * @return List<Pet> + */ + public List executeAs(Function handler) { + TypeRef> type = new TypeRef>(){}; + return execute(handler).as(type); + } + + public static final String TAGS_QUERY = "tags"; + + /** + * @param tags (List<String>) Tags to filter by (required) + * @return operation + */ + public FindPetsByTagsOper tagsQuery(Object... tags) { + reqSpec.addQueryParam(TAGS_QUERY, tags); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public FindPetsByTagsOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public FindPetsByTagsOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Find pet by ID + * Returns a single pet + * + * @see #petIdPath ID of pet to return (required) + * return Pet + */ + public static class GetPetByIdOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/pet/{petId}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public GetPetByIdOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /pet/{petId} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /pet/{petId} + * @param handler handler + * @return Pet + */ + public Pet executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet to return (required) + * @return operation + */ + public GetPetByIdOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public GetPetByIdOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public GetPetByIdOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Update an existing pet + * + * + * @see #body Pet object that needs to be added to the store (required) + */ + public static class UpdatePetOper implements Oper { + + public static final Method REQ_METHOD = PUT; + public static final String REQ_URI = "/pet"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public UpdatePetOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/json"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PUT /pet + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (Pet) Pet object that needs to be added to the store (required) + * @return operation + */ + public UpdatePetOper body(Pet body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public UpdatePetOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public UpdatePetOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Updates a pet in the store with form data + * + * + * @see #petIdPath ID of pet that needs to be updated (required) + * @see #nameForm Updated name of the pet (optional) + * @see #statusForm Updated status of the pet (optional) + */ + public static class UpdatePetWithFormOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/pet/{petId}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public UpdatePetWithFormOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("application/x-www-form-urlencoded"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /pet/{petId} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet that needs to be updated (required) + * @return operation + */ + public UpdatePetWithFormOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + public static final String NAME_FORM = "name"; + + /** + * @param name (String) Updated name of the pet (optional) + * @return operation + */ + public UpdatePetWithFormOper nameForm(Object... name) { + reqSpec.addFormParam(NAME_FORM, name); + return this; + } + + public static final String STATUS_FORM = "status"; + + /** + * @param status (String) Updated status of the pet (optional) + * @return operation + */ + public UpdatePetWithFormOper statusForm(Object... status) { + reqSpec.addFormParam(STATUS_FORM, status); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public UpdatePetWithFormOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public UpdatePetWithFormOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * uploads an image + * + * + * @see #petIdPath ID of pet to update (required) + * @see #additionalMetadataForm Additional data to pass to server (optional) + * @see #fileMultiPart file to upload (optional) + * return ModelApiResponse + */ + public static class UploadFileOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/pet/{petId}/uploadImage"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public UploadFileOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /pet/{petId}/uploadImage + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /pet/{petId}/uploadImage + * @param handler handler + * @return ModelApiResponse + */ + public ModelApiResponse executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet to update (required) + * @return operation + */ + public UploadFileOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + public static final String ADDITIONAL_METADATA_FORM = "additionalMetadata"; + + /** + * @param additionalMetadata (String) Additional data to pass to server (optional) + * @return operation + */ + public UploadFileOper additionalMetadataForm(Object... additionalMetadata) { + reqSpec.addFormParam(ADDITIONAL_METADATA_FORM, additionalMetadata); + return this; + } + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param file (File) file to upload (optional) + * @return operation + */ + public UploadFileOper fileMultiPart(File file) { + reqSpec.addMultiPart(file); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public UploadFileOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public UploadFileOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * uploads an image (required) + * + * + * @see #petIdPath ID of pet to update (required) + * @see #requiredFileMultiPart file to upload (required) + * @see #additionalMetadataForm Additional data to pass to server (optional) + * return ModelApiResponse + */ + public static class UploadFileWithRequiredFileOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/fake/{petId}/uploadImageWithRequiredFile"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public UploadFileWithRequiredFileOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @return ModelApiResponse + */ + public ModelApiResponse executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet to update (required) + * @return operation + */ + public UploadFileWithRequiredFileOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + public static final String ADDITIONAL_METADATA_FORM = "additionalMetadata"; + + /** + * @param additionalMetadata (String) Additional data to pass to server (optional) + * @return operation + */ + public UploadFileWithRequiredFileOper additionalMetadataForm(Object... additionalMetadata) { + reqSpec.addFormParam(ADDITIONAL_METADATA_FORM, additionalMetadata); + return this; + } + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param requiredFile (File) file to upload (required) + * @return operation + */ + public UploadFileWithRequiredFileOper requiredFileMultiPart(File requiredFile) { + reqSpec.addMultiPart(requiredFile); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public UploadFileWithRequiredFileOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public UploadFileWithRequiredFileOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 000000000000..9a2875c303f4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,390 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Order; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "Store") +public class StoreApi { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private StoreApi(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static StoreApi store(Supplier reqSpecSupplier) { + return new StoreApi(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + deleteOrder(), + getInventory(), + getOrderById(), + placeOrder() + ); + } + + @ApiOperation(value = "Delete purchase order by ID", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + nickname = "deleteOrder", + tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied") , + @ApiResponse(code = 404, message = "Order not found") }) + public DeleteOrderOper deleteOrder() { + return new DeleteOrderOper(createReqSpec()); + } + + @ApiOperation(value = "Returns pet inventories by status", + notes = "Returns a map of status codes to quantities", + nickname = "getInventory", + tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) + public GetInventoryOper getInventory() { + return new GetInventoryOper(createReqSpec()); + } + + @ApiOperation(value = "Find purchase order by ID", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + nickname = "getOrderById", + tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid ID supplied") , + @ApiResponse(code = 404, message = "Order not found") }) + public GetOrderByIdOper getOrderById() { + return new GetOrderByIdOper(createReqSpec()); + } + + @ApiOperation(value = "Place an order for a pet", + notes = "", + nickname = "placeOrder", + tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid Order") }) + public PlaceOrderOper placeOrder() { + return new PlaceOrderOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public StoreApi reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @see #orderIdPath ID of the order that needs to be deleted (required) + */ + public static class DeleteOrderOper implements Oper { + + public static final Method REQ_METHOD = DELETE; + public static final String REQ_URI = "/store/order/{order_id}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public DeleteOrderOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * DELETE /store/order/{order_id} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String ORDER_ID_PATH = "order_id"; + + /** + * @param orderId (String) ID of the order that needs to be deleted (required) + * @return operation + */ + public DeleteOrderOper orderIdPath(Object orderId) { + reqSpec.addPathParam(ORDER_ID_PATH, orderId); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public DeleteOrderOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public DeleteOrderOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * + * return Map<String, Integer> + */ + public static class GetInventoryOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/store/inventory"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public GetInventoryOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /store/inventory + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /store/inventory + * @param handler handler + * @return Map<String, Integer> + */ + public Map executeAs(Function handler) { + TypeRef> type = new TypeRef>(){}; + return execute(handler).as(type); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public GetInventoryOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public GetInventoryOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @see #orderIdPath ID of pet that needs to be fetched (required) + * return Order + */ + public static class GetOrderByIdOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/store/order/{order_id}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public GetOrderByIdOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /store/order/{order_id} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /store/order/{order_id} + * @param handler handler + * @return Order + */ + public Order executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String ORDER_ID_PATH = "order_id"; + + /** + * @param orderId (Long) ID of pet that needs to be fetched (required) + * @return operation + */ + public GetOrderByIdOper orderIdPath(Object orderId) { + reqSpec.addPathParam(ORDER_ID_PATH, orderId); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public GetOrderByIdOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public GetOrderByIdOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Place an order for a pet + * + * + * @see #body order placed for purchasing the pet (required) + * return Order + */ + public static class PlaceOrderOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/store/order"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public PlaceOrderOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /store/order + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * POST /store/order + * @param handler handler + * @return Order + */ + public Order executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + /** + * @param body (Order) order placed for purchasing the pet (required) + * @return operation + */ + public PlaceOrderOper body(Order body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public PlaceOrderOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public PlaceOrderOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 000000000000..4caf52a8d5f8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,693 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.User; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import io.restassured.RestAssured; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.common.mapper.TypeRef; +import io.restassured.http.Method; +import io.restassured.response.Response; +import io.swagger.annotations.*; + +import java.lang.reflect.Type; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import static io.restassured.http.Method.*; + +@Api(value = "User") +public class UserApi { + + private Supplier reqSpecSupplier; + private Consumer reqSpecCustomizer; + + private UserApi(Supplier reqSpecSupplier) { + this.reqSpecSupplier = reqSpecSupplier; + } + + public static UserApi user(Supplier reqSpecSupplier) { + return new UserApi(reqSpecSupplier); + } + + private RequestSpecBuilder createReqSpec() { + RequestSpecBuilder reqSpec = reqSpecSupplier.get(); + if(reqSpecCustomizer != null) { + reqSpecCustomizer.accept(reqSpec); + } + return reqSpec; + } + + public List getAllOperations() { + return Arrays.asList( + createUser(), + createUsersWithArrayInput(), + createUsersWithListInput(), + deleteUser(), + getUserByName(), + loginUser(), + logoutUser(), + updateUser() + ); + } + + @ApiOperation(value = "Create user", + notes = "This can only be done by the logged in user.", + nickname = "createUser", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + public CreateUserOper createUser() { + return new CreateUserOper(createReqSpec()); + } + + @ApiOperation(value = "Creates list of users with given input array", + notes = "", + nickname = "createUsersWithArrayInput", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + public CreateUsersWithArrayInputOper createUsersWithArrayInput() { + return new CreateUsersWithArrayInputOper(createReqSpec()); + } + + @ApiOperation(value = "Creates list of users with given input array", + notes = "", + nickname = "createUsersWithListInput", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + public CreateUsersWithListInputOper createUsersWithListInput() { + return new CreateUsersWithListInputOper(createReqSpec()); + } + + @ApiOperation(value = "Delete user", + notes = "This can only be done by the logged in user.", + nickname = "deleteUser", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied") , + @ApiResponse(code = 404, message = "User not found") }) + public DeleteUserOper deleteUser() { + return new DeleteUserOper(createReqSpec()); + } + + @ApiOperation(value = "Get user by user name", + notes = "", + nickname = "getUserByName", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid username supplied") , + @ApiResponse(code = 404, message = "User not found") }) + public GetUserByNameOper getUserByName() { + return new GetUserByNameOper(createReqSpec()); + } + + @ApiOperation(value = "Logs user into the system", + notes = "", + nickname = "loginUser", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") , + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + public LoginUserOper loginUser() { + return new LoginUserOper(createReqSpec()); + } + + @ApiOperation(value = "Logs out current logged in user session", + notes = "", + nickname = "logoutUser", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + public LogoutUserOper logoutUser() { + return new LogoutUserOper(createReqSpec()); + } + + @ApiOperation(value = "Updated user", + notes = "This can only be done by the logged in user.", + nickname = "updateUser", + tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied") , + @ApiResponse(code = 404, message = "User not found") }) + public UpdateUserOper updateUser() { + return new UpdateUserOper(createReqSpec()); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return api + */ + public UserApi reqSpec(Consumer reqSpecCustomizer) { + this.reqSpecCustomizer = reqSpecCustomizer; + return this; + } + + /** + * Create user + * This can only be done by the logged in user. + * + * @see #body Created user object (required) + */ + public static class CreateUserOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/user"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public CreateUserOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /user + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (User) Created user object (required) + * @return operation + */ + public CreateUserOper body(User body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public CreateUserOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public CreateUserOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Creates list of users with given input array + * + * + * @see #body List of user object (required) + */ + public static class CreateUsersWithArrayInputOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/user/createWithArray"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public CreateUsersWithArrayInputOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /user/createWithArray + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (List<User>) List of user object (required) + * @return operation + */ + public CreateUsersWithArrayInputOper body(List body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public CreateUsersWithArrayInputOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public CreateUsersWithArrayInputOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Creates list of users with given input array + * + * + * @see #body List of user object (required) + */ + public static class CreateUsersWithListInputOper implements Oper { + + public static final Method REQ_METHOD = POST; + public static final String REQ_URI = "/user/createWithList"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public CreateUsersWithListInputOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /user/createWithList + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (List<User>) List of user object (required) + * @return operation + */ + public CreateUsersWithListInputOper body(List body) { + reqSpec.setBody(body); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public CreateUsersWithListInputOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public CreateUsersWithListInputOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Delete user + * This can only be done by the logged in user. + * + * @see #usernamePath The name that needs to be deleted (required) + */ + public static class DeleteUserOper implements Oper { + + public static final Method REQ_METHOD = DELETE; + public static final String REQ_URI = "/user/{username}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public DeleteUserOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * DELETE /user/{username} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String USERNAME_PATH = "username"; + + /** + * @param username (String) The name that needs to be deleted (required) + * @return operation + */ + public DeleteUserOper usernamePath(Object username) { + reqSpec.addPathParam(USERNAME_PATH, username); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public DeleteUserOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public DeleteUserOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Get user by user name + * + * + * @see #usernamePath The name that needs to be fetched. Use user1 for testing. (required) + * return User + */ + public static class GetUserByNameOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/user/{username}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public GetUserByNameOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /user/{username} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /user/{username} + * @param handler handler + * @return User + */ + public User executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String USERNAME_PATH = "username"; + + /** + * @param username (String) The name that needs to be fetched. Use user1 for testing. (required) + * @return operation + */ + public GetUserByNameOper usernamePath(Object username) { + reqSpec.addPathParam(USERNAME_PATH, username); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public GetUserByNameOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public GetUserByNameOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Logs user into the system + * + * + * @see #usernameQuery The user name for login (required) + * @see #passwordQuery The password for login in clear text (required) + * return String + */ + public static class LoginUserOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/user/login"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public LoginUserOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /user/login + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * GET /user/login + * @param handler handler + * @return String + */ + public String executeAs(Function handler) { + TypeRef type = new TypeRef(){}; + return execute(handler).as(type); + } + + public static final String USERNAME_QUERY = "username"; + + /** + * @param username (String) The user name for login (required) + * @return operation + */ + public LoginUserOper usernameQuery(Object... username) { + reqSpec.addQueryParam(USERNAME_QUERY, username); + return this; + } + + public static final String PASSWORD_QUERY = "password"; + + /** + * @param password (String) The password for login in clear text (required) + * @return operation + */ + public LoginUserOper passwordQuery(Object... password) { + reqSpec.addQueryParam(PASSWORD_QUERY, password); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public LoginUserOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public LoginUserOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Logs out current logged in user session + * + * + */ + public static class LogoutUserOper implements Oper { + + public static final Method REQ_METHOD = GET; + public static final String REQ_URI = "/user/logout"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public LogoutUserOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * GET /user/logout + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public LogoutUserOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public LogoutUserOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } + /** + * Updated user + * This can only be done by the logged in user. + * + * @see #usernamePath name that need to be deleted (required) + * @see #body Updated user object (required) + */ + public static class UpdateUserOper implements Oper { + + public static final Method REQ_METHOD = PUT; + public static final String REQ_URI = "/user/{username}"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public UpdateUserOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("*/*"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * PUT /user/{username} + * @param handler handler + * @param type + * @return type + */ + @Override + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + /** + * @param body (User) Updated user object (required) + * @return operation + */ + public UpdateUserOper body(User body) { + reqSpec.setBody(body); + return this; + } + + public static final String USERNAME_PATH = "username"; + + /** + * @param username (String) name that need to be deleted (required) + * @return operation + */ + public UpdateUserOper usernamePath(Object username) { + reqSpec.addPathParam(USERNAME_PATH, username); + return this; + } + + /** + * Customize request specification + * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder + * @return operation + */ + public UpdateUserOper reqSpec(Consumer reqSpecCustomizer) { + reqSpecCustomizer.accept(reqSpec); + return this; + } + + /** + * Customize response specification + * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder + * @return operation + */ + public UpdateUserOper respSpec(Consumer respSpecCustomizer) { + respSpecCustomizer.accept(respSpec); + return this; + } + } +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..b91c7f4883bf --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesAnyType + */ +@JsonPropertyOrder({ + AdditionalPropertiesAnyType.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesAnyType extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesAnyType name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..ad5c7d888d6b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -0,0 +1,110 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesArray + */ +@JsonPropertyOrder({ + AdditionalPropertiesArray.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesArray extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesArray name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..9c451e212ef7 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesBoolean + */ +@JsonPropertyOrder({ + AdditionalPropertiesBoolean.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesBoolean extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesBoolean name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..3129d81e5204 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -0,0 +1,491 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesClass + */ +@JsonPropertyOrder({ + AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, + AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, + AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 +}) + +public class AdditionalPropertiesClass { + public static final String JSON_PROPERTY_MAP_STRING = "map_string"; + private Map mapString = null; + + public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; + private Map mapNumber = null; + + public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; + private Map mapInteger = null; + + public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; + private Map mapBoolean = null; + + public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; + private Map> mapArrayInteger = null; + + public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; + private Map> mapArrayAnytype = null; + + public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; + private Map> mapMapString = null; + + public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; + private Map> mapMapAnytype = null; + + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; + private Object anytype1; + + public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; + private Object anytype2; + + public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; + private Object anytype3; + + + public AdditionalPropertiesClass mapString(Map mapString) { + + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapString() { + return mapString; + } + + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapNumber() { + return mapNumber; + } + + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapInteger() { + return mapInteger; + } + + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapBoolean() { + return mapBoolean; + } + + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapMapString() { + return mapMapString; + } + + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + + public AdditionalPropertiesClass anytype1(Object anytype1) { + + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANYTYPE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAnytype1() { + return anytype1; + } + + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + + public AdditionalPropertiesClass anytype2(Object anytype2) { + + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANYTYPE2) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAnytype2() { + return anytype2; + } + + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + + public AdditionalPropertiesClass anytype3(Object anytype3) { + + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANYTYPE3) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAnytype3() { + return anytype3; + } + + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5eb0c6ca44e1 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesInteger + */ +@JsonPropertyOrder({ + AdditionalPropertiesInteger.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesInteger extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesInteger name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..7718b35dd3c9 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -0,0 +1,110 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesNumber + */ +@JsonPropertyOrder({ + AdditionalPropertiesNumber.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesNumber extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesNumber name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..1e084af46792 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesObject + */ +@JsonPropertyOrder({ + AdditionalPropertiesObject.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesObject extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..0b6ba05845b5 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * AdditionalPropertiesString + */ +@JsonPropertyOrder({ + AdditionalPropertiesString.JSON_PROPERTY_NAME +}) + +public class AdditionalPropertiesString extends HashMap { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public AdditionalPropertiesString name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java new file mode 100644 index 000000000000..57dad620ef0a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java @@ -0,0 +1,145 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Animal + */ +@JsonPropertyOrder({ + Animal.JSON_PROPERTY_CLASS_NAME, + Animal.JSON_PROPERTY_COLOR +}) + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), +}) + +public class Animal { + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private String className; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color = "red"; + + + public Animal className(String className) { + + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + public void setClassName(String className) { + this.className = className; + } + + + public Animal color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..96271e5a2fc4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,117 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER +}) + +public class ArrayOfArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; + private List> arrayArrayNumber = null; + + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..3a2e55170eea --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -0,0 +1,117 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * ArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER +}) + +public class ArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; + private List arrayNumber = null; + + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayNumber() { + return arrayNumber; + } + + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java new file mode 100644 index 000000000000..efe1b01d6b1f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -0,0 +1,196 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ReadOnlyFirst; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * ArrayTest + */ +@JsonPropertyOrder({ + ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, + ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, + ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL +}) + +public class ArrayTest { + public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; + private List arrayOfString = null; + + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; + private List> arrayArrayOfInteger = null; + + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; + private List> arrayArrayOfModel = null; + + + public ArrayTest arrayOfString(List arrayOfString) { + + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayOfString() { + return arrayOfString; + } + + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java new file mode 100644 index 000000000000..9cce67d5e056 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java @@ -0,0 +1,148 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BigCatAllOf; +import org.openapitools.client.model.Cat; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * BigCat + */ +@JsonPropertyOrder({ + BigCat.JSON_PROPERTY_KIND +}) + +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_KIND = "kind"; + private KindEnum kind; + + + public BigCat kind(KindEnum kind) { + + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KindEnum getKind() { + return kind; + } + + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java new file mode 100644 index 000000000000..d9cac42b3c78 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -0,0 +1,144 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * BigCatAllOf + */ +@JsonPropertyOrder({ + BigCatAllOf.JSON_PROPERTY_KIND +}) + +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_KIND = "kind"; + private KindEnum kind; + + + public BigCatAllOf kind(KindEnum kind) { + + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KindEnum getKind() { + return kind; + } + + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java new file mode 100644 index 000000000000..0ecd3a8f024d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -0,0 +1,260 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Capitalization + */ +@JsonPropertyOrder({ + Capitalization.JSON_PROPERTY_SMALL_CAMEL, + Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, + Capitalization.JSON_PROPERTY_SMALL_SNAKE, + Capitalization.JSON_PROPERTY_CAPITAL_SNAKE, + Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, + Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E +}) + +public class Capitalization { + public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; + private String smallCamel; + + public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; + private String capitalCamel; + + public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; + private String smallSnake; + + public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; + private String capitalSnake; + + public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; + private String scAETHFlowPoints; + + public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; + private String ATT_NAME; + + + public Capitalization smallCamel(String smallCamel) { + + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSmallCamel() { + return smallCamel; + } + + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + + public Capitalization capitalCamel(String capitalCamel) { + + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCapitalCamel() { + return capitalCamel; + } + + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + + public Capitalization smallSnake(String smallSnake) { + + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSmallSnake() { + return smallSnake; + } + + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + + public Capitalization capitalSnake(String capitalSnake) { + + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCapitalSnake() { + return capitalSnake; + } + + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + + public Capitalization ATT_NAME(String ATT_NAME) { + + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the pet ") + @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getATTNAME() { + return ATT_NAME; + } + + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java new file mode 100644 index 000000000000..4e42f62237da --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Cat + */ +@JsonPropertyOrder({ + Cat.JSON_PROPERTY_DECLAWED +}) + +public class Cat extends Animal { + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; + + + public Cat declawed(Boolean declawed) { + + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isDeclawed() { + return declawed; + } + + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java new file mode 100644 index 000000000000..da2d6fdf3596 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * CatAllOf + */ +@JsonPropertyOrder({ + CatAllOf.JSON_PROPERTY_DECLAWED +}) + +public class CatAllOf { + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; + + + public CatAllOf declawed(Boolean declawed) { + + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isDeclawed() { + return declawed; + } + + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 000000000000..9b6db321395e --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,136 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Category + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) + +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name = "default-name"; + + + public Category id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java new file mode 100644 index 000000000000..e7765bbe8de0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -0,0 +1,106 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Model for testing model with \"_class\" property + */ +@ApiModel(description = "Model for testing model with \"_class\" property") +@JsonPropertyOrder({ + ClassModel.JSON_PROPERTY_PROPERTY_CLASS +}) + +public class ClassModel { + public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; + private String propertyClass; + + + public ClassModel propertyClass(String propertyClass) { + + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPropertyClass() { + return propertyClass; + } + + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java new file mode 100644 index 000000000000..d730df42e2c2 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Client + */ +@JsonPropertyOrder({ + Client.JSON_PROPERTY_CLIENT +}) + +public class Client { + public static final String JSON_PROPERTY_CLIENT = "client"; + private String client; + + + public Client client(String client) { + + this.client = client; + return this; + } + + /** + * Get client + * @return client + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CLIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getClient() { + return client; + } + + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java new file mode 100644 index 000000000000..3fba33d179af --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java @@ -0,0 +1,109 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Dog + */ +@JsonPropertyOrder({ + Dog.JSON_PROPERTY_BREED +}) + +public class Dog extends Animal { + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; + + + public Dog breed(String breed) { + + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBreed() { + return breed; + } + + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java new file mode 100644 index 000000000000..e916e73f4a72 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * DogAllOf + */ +@JsonPropertyOrder({ + DogAllOf.JSON_PROPERTY_BREED +}) + +public class DogAllOf { + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; + + + public DogAllOf breed(String breed) { + + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBreed() { + return breed; + } + + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java new file mode 100644 index 000000000000..a3e3abfd2cb3 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -0,0 +1,216 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * EnumArrays + */ +@JsonPropertyOrder({ + EnumArrays.JSON_PROPERTY_JUST_SYMBOL, + EnumArrays.JSON_PROPERTY_ARRAY_ENUM +}) + +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; + private List arrayEnum = null; + + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + + public EnumArrays arrayEnum(List arrayEnum) { + + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayEnum() { + return arrayEnum; + } + + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java new file mode 100644 index 000000000000..d015b74e06a1 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java @@ -0,0 +1,63 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java new file mode 100644 index 000000000000..6294398ba8c2 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -0,0 +1,375 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.OuterEnum; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * EnumTest + */ +@JsonPropertyOrder({ + EnumTest.JSON_PROPERTY_ENUM_STRING, + EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, + EnumTest.JSON_PROPERTY_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_ENUM_NUMBER, + EnumTest.JSON_PROPERTY_OUTER_ENUM +}) + +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; + private EnumNumberEnum enumNumber; + + public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; + private OuterEnum outerEnum; + + + public EnumTest enumString(EnumStringEnum enumString) { + + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumStringEnum getEnumString() { + return enumString; + } + + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + + public EnumTest outerEnum(OuterEnum outerEnum) { + + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..7a00e4c6f72e --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -0,0 +1,148 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * FileSchemaTestClass + */ +@JsonPropertyOrder({ + FileSchemaTestClass.JSON_PROPERTY_FILE, + FileSchemaTestClass.JSON_PROPERTY_FILES +}) + +public class FileSchemaTestClass { + public static final String JSON_PROPERTY_FILE = "file"; + private java.io.File file; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + + public FileSchemaTestClass file(java.io.File file) { + + this.file = file; + return this; + } + + /** + * Get file + * @return file + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public java.io.File getFile() { + return file; + } + + + public void setFile(java.io.File file) { + this.file = file; + } + + + public FileSchemaTestClass files(List files) { + + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFiles() { + return files; + } + + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java new file mode 100644 index 000000000000..ea151142c168 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -0,0 +1,529 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * FormatTest + */ +@JsonPropertyOrder({ + FormatTest.JSON_PROPERTY_INTEGER, + FormatTest.JSON_PROPERTY_INT32, + FormatTest.JSON_PROPERTY_INT64, + FormatTest.JSON_PROPERTY_NUMBER, + FormatTest.JSON_PROPERTY_FLOAT, + FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_STRING, + FormatTest.JSON_PROPERTY_BYTE, + FormatTest.JSON_PROPERTY_BINARY, + FormatTest.JSON_PROPERTY_DATE, + FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_UUID, + FormatTest.JSON_PROPERTY_PASSWORD, + FormatTest.JSON_PROPERTY_BIG_DECIMAL +}) + +public class FormatTest { + public static final String JSON_PROPERTY_INTEGER = "integer"; + private Integer integer; + + public static final String JSON_PROPERTY_INT32 = "int32"; + private Integer int32; + + public static final String JSON_PROPERTY_INT64 = "int64"; + private Long int64; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public static final String JSON_PROPERTY_STRING = "string"; + private String string; + + public static final String JSON_PROPERTY_BYTE = "byte"; + private byte[] _byte; + + public static final String JSON_PROPERTY_BINARY = "binary"; + private File binary; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; + private BigDecimal bigDecimal; + + + public FormatTest integer(Integer integer) { + + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + **/ + @javax.annotation.Nullable + @Min(10) @Max(100) @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInteger() { + return integer; + } + + + public void setInteger(Integer integer) { + this.integer = integer; + } + + + public FormatTest int32(Integer int32) { + + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + **/ + @javax.annotation.Nullable + @Min(20) @Max(200) @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getInt32() { + return int32; + } + + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + + public FormatTest int64(Long int64) { + + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getInt64() { + return int64; + } + + + public void setInt64(Long int64) { + this.int64 = int64; + } + + + public FormatTest number(BigDecimal number) { + + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + **/ + @NotNull + @Valid + @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getNumber() { + return number; + } + + + public void setNumber(BigDecimal number) { + this.number = number; + } + + + public FormatTest _float(Float _float) { + + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + **/ + @javax.annotation.Nullable + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Float getFloat() { + return _float; + } + + + public void setFloat(Float _float) { + this._float = _float; + } + + + public FormatTest _double(Double _double) { + + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + **/ + @javax.annotation.Nullable + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getDouble() { + return _double; + } + + + public void setDouble(Double _double) { + this._double = _double; + } + + + public FormatTest string(String string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @Pattern(regexp="/[a-z]/i") @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getString() { + return string; + } + + + public void setString(String string) { + this.string = string; + } + + + public FormatTest _byte(byte[] _byte) { + + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + **/ + @NotNull + @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public byte[] getByte() { + return _byte; + } + + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + + public FormatTest binary(File binary) { + + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public File getBinary() { + return binary; + } + + + public void setBinary(File binary) { + this.binary = binary; + } + + + public FormatTest date(LocalDate date) { + + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @NotNull + @Valid + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDate() { + return date; + } + + + public void setDate(LocalDate date) { + this.date = date; + } + + + public FormatTest dateTime(OffsetDateTime dateTime) { + + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDateTime() { + return dateTime; + } + + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + public FormatTest uuid(UUID uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getUuid() { + return uuid; + } + + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + + public FormatTest password(String password) { + + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @NotNull + @Size(min=10,max=64) @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..2dfd47631254 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -0,0 +1,118 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * HasOnlyReadOnly + */ +@JsonPropertyOrder({ + HasOnlyReadOnly.JSON_PROPERTY_BAR, + HasOnlyReadOnly.JSON_PROPERTY_FOO +}) + +public class HasOnlyReadOnly { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; + + public static final String JSON_PROPERTY_FOO = "foo"; + private String foo; + + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + + + /** + * Get foo + * @return foo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FOO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFoo() { + return foo; + } + + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java new file mode 100644 index 000000000000..91db4d7aec98 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java @@ -0,0 +1,269 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * MapTest + */ +@JsonPropertyOrder({ + MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, + MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, + MapTest.JSON_PROPERTY_DIRECT_MAP, + MapTest.JSON_PROPERTY_INDIRECT_MAP +}) + +public class MapTest { + public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; + private Map mapOfEnumString = null; + + public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; + private Map directMap = null; + + public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; + private Map indirectMap = null; + + + public MapTest mapMapOfString(Map> mapMapOfString) { + + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + + public MapTest mapOfEnumString(Map mapOfEnumString) { + + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + + public MapTest directMap(Map directMap) { + + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getDirectMap() { + return directMap; + } + + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + + public MapTest indirectMap(Map indirectMap) { + + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getIndirectMap() { + return indirectMap; + } + + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..a13f416e3526 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,184 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.client.model.Animal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@JsonPropertyOrder({ + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, + MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP +}) + +public class MixedPropertiesAndAdditionalPropertiesClass { + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime; + + public static final String JSON_PROPERTY_MAP = "map"; + private Map map = null; + + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getUuid() { + return uuid; + } + + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDateTime() { + return dateTime; + } + + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMap() { + return map; + } + + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java new file mode 100644 index 000000000000..e45ce82249c8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -0,0 +1,137 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Model for testing model name starting with number + */ +@ApiModel(description = "Model for testing model name starting with number") +@JsonPropertyOrder({ + Model200Response.JSON_PROPERTY_NAME, + Model200Response.JSON_PROPERTY_PROPERTY_CLASS +}) + +public class Model200Response { + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; + private String propertyClass; + + + public Model200Response name(Integer name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getName() { + return name; + } + + + public void setName(Integer name) { + this.name = name; + } + + + public Model200Response propertyClass(String propertyClass) { + + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPropertyClass() { + return propertyClass; + } + + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 000000000000..0ef2a65b14f4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -0,0 +1,167 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * ModelApiResponse + */ +@JsonPropertyOrder({ + ModelApiResponse.JSON_PROPERTY_CODE, + ModelApiResponse.JSON_PROPERTY_TYPE, + ModelApiResponse.JSON_PROPERTY_MESSAGE +}) + +public class ModelApiResponse { + public static final String JSON_PROPERTY_CODE = "code"; + private Integer code; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + + public ModelApiResponse code(Integer code) { + + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCode() { + return code; + } + + + public void setCode(Integer code) { + this.code = code; + } + + + public ModelApiResponse type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ModelApiResponse message(String message) { + + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java new file mode 100644 index 000000000000..f8114f259c8a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -0,0 +1,106 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Model for testing reserved words + */ +@ApiModel(description = "Model for testing reserved words") +@JsonPropertyOrder({ + ModelReturn.JSON_PROPERTY_RETURN +}) + +public class ModelReturn { + public static final String JSON_PROPERTY_RETURN = "return"; + private Integer _return; + + + public ModelReturn _return(Integer _return) { + + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RETURN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getReturn() { + return _return; + } + + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java new file mode 100644 index 000000000000..bd6824582a09 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java @@ -0,0 +1,181 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Model for testing model name same as property name + */ +@ApiModel(description = "Model for testing model name same as property name") +@JsonPropertyOrder({ + Name.JSON_PROPERTY_NAME, + Name.JSON_PROPERTY_SNAKE_CASE, + Name.JSON_PROPERTY_PROPERTY, + Name.JSON_PROPERTY_123NUMBER +}) + +public class Name { + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; + private Integer snakeCase; + + public static final String JSON_PROPERTY_PROPERTY = "property"; + private String property; + + public static final String JSON_PROPERTY_123NUMBER = "123Number"; + private Integer _123number; + + + public Name name(Integer name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getName() { + return name; + } + + + public void setName(Integer name) { + this.name = name; + } + + + /** + * Get snakeCase + * @return snakeCase + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SNAKE_CASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getSnakeCase() { + return snakeCase; + } + + + + + public Name property(String property) { + + this.property = property; + return this; + } + + /** + * Get property + * @return property + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProperty() { + return property; + } + + + public void setProperty(String property) { + this.property = property; + } + + + /** + * Get _123number + * @return _123number + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_123NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer get123number() { + return _123number; + } + + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java new file mode 100644 index 000000000000..762257cc27f0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -0,0 +1,107 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * NumberOnly + */ +@JsonPropertyOrder({ + NumberOnly.JSON_PROPERTY_JUST_NUMBER +}) + +public class NumberOnly { + public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; + private BigDecimal justNumber; + + + public NumberOnly justNumber(BigDecimal justNumber) { + + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getJustNumber() { + return justNumber; + } + + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 000000000000..ba36ae033451 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,299 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Order + */ +@JsonPropertyOrder({ + Order.JSON_PROPERTY_ID, + Order.JSON_PROPERTY_PET_ID, + Order.JSON_PROPERTY_QUANTITY, + Order.JSON_PROPERTY_SHIP_DATE, + Order.JSON_PROPERTY_STATUS, + Order.JSON_PROPERTY_COMPLETE +}) + +public class Order { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_PET_ID = "petId"; + private Long petId; + + public static final String JSON_PROPERTY_QUANTITY = "quantity"; + private Integer quantity; + + public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_COMPLETE = "complete"; + private Boolean complete = false; + + + public Order id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Order petId(Long petId) { + + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getPetId() { + return petId; + } + + + public void setPetId(Long petId) { + this.petId = petId; + } + + + public Order quantity(Integer quantity) { + + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getQuantity() { + return quantity; + } + + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public Order shipDate(OffsetDateTime shipDate) { + + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getShipDate() { + return shipDate; + } + + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + + public Order status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Order Status") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public Order complete(Boolean complete) { + + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isComplete() { + return complete; + } + + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java new file mode 100644 index 000000000000..cc608363ef1b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -0,0 +1,169 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * OuterComposite + */ +@JsonPropertyOrder({ + OuterComposite.JSON_PROPERTY_MY_NUMBER, + OuterComposite.JSON_PROPERTY_MY_STRING, + OuterComposite.JSON_PROPERTY_MY_BOOLEAN +}) + +public class OuterComposite { + public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; + private BigDecimal myNumber; + + public static final String JSON_PROPERTY_MY_STRING = "my_string"; + private String myString; + + public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; + private Boolean myBoolean; + + + public OuterComposite myNumber(BigDecimal myNumber) { + + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMyNumber() { + return myNumber; + } + + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + + public OuterComposite myString(String myString) { + + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMyString() { + return myString; + } + + + public void setMyString(String myString) { + this.myString = myString; + } + + + public OuterComposite myBoolean(Boolean myBoolean) { + + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isMyBoolean() { + return myBoolean; + } + + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java new file mode 100644 index 000000000000..537a046fbed0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -0,0 +1,63 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 000000000000..6a05dd150328 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,316 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Pet + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) + +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private List photoUrls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + + public Pet id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Pet category(Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + public void setCategory(Category category) { + this.category = category; + } + + + public Pet name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Pet photoUrls(List photoUrls) { + + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "pet status in the store") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..e09c5fb1779f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -0,0 +1,127 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * ReadOnlyFirst + */ +@JsonPropertyOrder({ + ReadOnlyFirst.JSON_PROPERTY_BAR, + ReadOnlyFirst.JSON_PROPERTY_BAZ +}) + +public class ReadOnlyFirst { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; + + public static final String JSON_PROPERTY_BAZ = "baz"; + private String baz; + + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + + + public ReadOnlyFirst baz(String baz) { + + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAZ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBaz() { + return baz; + } + + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java new file mode 100644 index 000000000000..b52f4293aa9a --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * SpecialModelName + */ +@JsonPropertyOrder({ + SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME +}) + +public class SpecialModelName { + public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; + private Long $specialPropertyName; + + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 000000000000..5ee4236adb10 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,136 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) + +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + + public Tag id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java new file mode 100644 index 000000000000..4a024c4ae814 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -0,0 +1,238 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * TypeHolderDefault + */ +@JsonPropertyOrder({ + TypeHolderDefault.JSON_PROPERTY_STRING_ITEM, + TypeHolderDefault.JSON_PROPERTY_NUMBER_ITEM, + TypeHolderDefault.JSON_PROPERTY_INTEGER_ITEM, + TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM, + TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM +}) + +public class TypeHolderDefault { + public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + private String stringItem = "what"; + + public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + private BigDecimal numberItem; + + public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + private Integer integerItem; + + public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + private Boolean boolItem = true; + + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; + private List arrayItem = new ArrayList<>(); + + + public TypeHolderDefault stringItem(String stringItem) { + + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStringItem() { + return stringItem; + } + + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + **/ + @NotNull + @Valid + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getNumberItem() { + return numberItem; + } + + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + + public TypeHolderDefault integerItem(Integer integerItem) { + + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getIntegerItem() { + return integerItem; + } + + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + + public TypeHolderDefault boolItem(Boolean boolItem) { + + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean isBoolItem() { + return boolItem; + } + + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + + public TypeHolderDefault arrayItem(List arrayItem) { + + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getArrayItem() { + return arrayItem; + } + + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java new file mode 100644 index 000000000000..bd0ba57eac0d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -0,0 +1,269 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * TypeHolderExample + */ +@JsonPropertyOrder({ + TypeHolderExample.JSON_PROPERTY_STRING_ITEM, + TypeHolderExample.JSON_PROPERTY_NUMBER_ITEM, + TypeHolderExample.JSON_PROPERTY_FLOAT_ITEM, + TypeHolderExample.JSON_PROPERTY_INTEGER_ITEM, + TypeHolderExample.JSON_PROPERTY_BOOL_ITEM, + TypeHolderExample.JSON_PROPERTY_ARRAY_ITEM +}) + +public class TypeHolderExample { + public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + private String stringItem; + + public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + private BigDecimal numberItem; + + public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; + private Float floatItem; + + public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + private Integer integerItem; + + public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + private Boolean boolItem; + + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; + private List arrayItem = new ArrayList<>(); + + + public TypeHolderExample stringItem(String stringItem) { + + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + **/ + @NotNull + @ApiModelProperty(example = "what", required = true, value = "") + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStringItem() { + return stringItem; + } + + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + + public TypeHolderExample numberItem(BigDecimal numberItem) { + + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + **/ + @NotNull + @Valid + @ApiModelProperty(example = "1.234", required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getNumberItem() { + return numberItem; + } + + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + + public TypeHolderExample floatItem(Float floatItem) { + + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + **/ + @NotNull + @ApiModelProperty(example = "1.234", required = true, value = "") + @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Float getFloatItem() { + return floatItem; + } + + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + + public TypeHolderExample integerItem(Integer integerItem) { + + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + **/ + @NotNull + @ApiModelProperty(example = "-2", required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getIntegerItem() { + return integerItem; + } + + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + + public TypeHolderExample boolItem(Boolean boolItem) { + + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + **/ + @NotNull + @ApiModelProperty(example = "true", required = true, value = "") + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean isBoolItem() { + return boolItem; + } + + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + + public TypeHolderExample arrayItem(List arrayItem) { + + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + **/ + @NotNull + @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getArrayItem() { + return arrayItem; + } + + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 000000000000..33ed7c7c3ab7 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,322 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * User + */ +@JsonPropertyOrder({ + User.JSON_PROPERTY_ID, + User.JSON_PROPERTY_USERNAME, + User.JSON_PROPERTY_FIRST_NAME, + User.JSON_PROPERTY_LAST_NAME, + User.JSON_PROPERTY_EMAIL, + User.JSON_PROPERTY_PASSWORD, + User.JSON_PROPERTY_PHONE, + User.JSON_PROPERTY_USER_STATUS +}) + +public class User { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private String phone; + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + private Integer userStatus; + + + public User id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public User username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + + public User firstName(String firstName) { + + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFirstName() { + return firstName; + } + + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public User lastName(String lastName) { + + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLastName() { + return lastName; + } + + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public User email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public User password(String password) { + + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public User phone(String phone) { + + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhone() { + return phone; + } + + + public void setPhone(String phone) { + this.phone = phone; + } + + + public User userStatus(Integer userStatus) { + + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "User Status") + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getUserStatus() { + return userStatus; + } + + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java new file mode 100644 index 000000000000..64aeb37138a4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java @@ -0,0 +1,1053 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; +import org.hibernate.validator.constraints.*; + +/** + * XmlItem + */ +@JsonPropertyOrder({ + XmlItem.JSON_PROPERTY_ATTRIBUTE_STRING, + XmlItem.JSON_PROPERTY_ATTRIBUTE_NUMBER, + XmlItem.JSON_PROPERTY_ATTRIBUTE_INTEGER, + XmlItem.JSON_PROPERTY_ATTRIBUTE_BOOLEAN, + XmlItem.JSON_PROPERTY_WRAPPED_ARRAY, + XmlItem.JSON_PROPERTY_NAME_STRING, + XmlItem.JSON_PROPERTY_NAME_NUMBER, + XmlItem.JSON_PROPERTY_NAME_INTEGER, + XmlItem.JSON_PROPERTY_NAME_BOOLEAN, + XmlItem.JSON_PROPERTY_NAME_ARRAY, + XmlItem.JSON_PROPERTY_NAME_WRAPPED_ARRAY, + XmlItem.JSON_PROPERTY_PREFIX_STRING, + XmlItem.JSON_PROPERTY_PREFIX_NUMBER, + XmlItem.JSON_PROPERTY_PREFIX_INTEGER, + XmlItem.JSON_PROPERTY_PREFIX_BOOLEAN, + XmlItem.JSON_PROPERTY_PREFIX_ARRAY, + XmlItem.JSON_PROPERTY_PREFIX_WRAPPED_ARRAY, + XmlItem.JSON_PROPERTY_NAMESPACE_STRING, + XmlItem.JSON_PROPERTY_NAMESPACE_NUMBER, + XmlItem.JSON_PROPERTY_NAMESPACE_INTEGER, + XmlItem.JSON_PROPERTY_NAMESPACE_BOOLEAN, + XmlItem.JSON_PROPERTY_NAMESPACE_ARRAY, + XmlItem.JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY, + XmlItem.JSON_PROPERTY_PREFIX_NS_STRING, + XmlItem.JSON_PROPERTY_PREFIX_NS_NUMBER, + XmlItem.JSON_PROPERTY_PREFIX_NS_INTEGER, + XmlItem.JSON_PROPERTY_PREFIX_NS_BOOLEAN, + XmlItem.JSON_PROPERTY_PREFIX_NS_ARRAY, + XmlItem.JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY +}) + +public class XmlItem { + public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; + private String attributeString; + + public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; + private BigDecimal attributeNumber; + + public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; + private Integer attributeInteger; + + public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; + private Boolean attributeBoolean; + + public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; + private List wrappedArray = null; + + public static final String JSON_PROPERTY_NAME_STRING = "name_string"; + private String nameString; + + public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; + private BigDecimal nameNumber; + + public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; + private Integer nameInteger; + + public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; + private Boolean nameBoolean; + + public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; + private List nameArray = null; + + public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; + private List nameWrappedArray = null; + + public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; + private String prefixString; + + public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; + private BigDecimal prefixNumber; + + public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; + private Integer prefixInteger; + + public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; + private Boolean prefixBoolean; + + public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; + private List prefixArray = null; + + public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; + private List prefixWrappedArray = null; + + public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; + private String namespaceString; + + public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; + private BigDecimal namespaceNumber; + + public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; + private Integer namespaceInteger; + + public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; + private Boolean namespaceBoolean; + + public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; + private List namespaceArray = null; + + public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; + private List namespaceWrappedArray = null; + + public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; + private String prefixNsString; + + public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; + private BigDecimal prefixNsNumber; + + public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; + private Integer prefixNsInteger; + + public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; + private Boolean prefixNsBoolean; + + public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; + private List prefixNsArray = null; + + public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; + private List prefixNsWrappedArray = null; + + + public XmlItem attributeString(String attributeString) { + + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAttributeString() { + return attributeString; + } + + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + + public XmlItem attributeInteger(Integer attributeInteger) { + + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getAttributeInteger() { + return attributeInteger; + } + + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isAttributeBoolean() { + return attributeBoolean; + } + + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + + public XmlItem wrappedArray(List wrappedArray) { + + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getWrappedArray() { + return wrappedArray; + } + + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + + public XmlItem nameString(String nameString) { + + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_NAME_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNameString() { + return nameString; + } + + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + + public XmlItem nameNumber(BigDecimal nameNumber) { + + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_NAME_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getNameNumber() { + return nameNumber; + } + + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + + public XmlItem nameInteger(Integer nameInteger) { + + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_NAME_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getNameInteger() { + return nameInteger; + } + + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + + public XmlItem nameBoolean(Boolean nameBoolean) { + + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isNameBoolean() { + return nameBoolean; + } + + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + + public XmlItem nameArray(List nameArray) { + + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getNameArray() { + return nameArray; + } + + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + + public XmlItem nameWrappedArray(List nameWrappedArray) { + + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + + public XmlItem prefixString(String prefixString) { + + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrefixString() { + return prefixString; + } + + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + + public XmlItem prefixInteger(Integer prefixInteger) { + + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPrefixInteger() { + return prefixInteger; + } + + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isPrefixBoolean() { + return prefixBoolean; + } + + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + + public XmlItem prefixArray(List prefixArray) { + + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPrefixArray() { + return prefixArray; + } + + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + + public XmlItem namespaceString(String namespaceString) { + + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNamespaceString() { + return namespaceString; + } + + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + + public XmlItem namespaceInteger(Integer namespaceInteger) { + + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isNamespaceBoolean() { + return namespaceBoolean; + } + + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + + public XmlItem namespaceArray(List namespaceArray) { + + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getNamespaceArray() { + return namespaceArray; + } + + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + + public XmlItem prefixNsString(String prefixNsString) { + + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrefixNsString() { + return prefixNsString; + } + + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + **/ + @javax.annotation.Nullable + @Valid + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean isPrefixNsBoolean() { + return prefixNsBoolean; + } + + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + + public XmlItem prefixNsArray(List prefixNsArray) { + + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPrefixNsArray() { + return prefixNsArray; + } + + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java new file mode 100644 index 000000000000..d1efa43a3087 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -0,0 +1,61 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Client; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.AnotherFakeApi; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for AnotherFakeApi + */ +@Ignore +public class AnotherFakeApiTest { + + private AnotherFakeApi api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake(); + } + + /** + * successful operation + */ + @Test + public void shouldSee200AfterCall123testSpecialTags() { + Client body = null; + api.call123testSpecialTags() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java new file mode 100644 index 000000000000..d014aee7cd52 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -0,0 +1,306 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import java.math.BigDecimal; +import org.openapitools.client.model.Client; +import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.FakeApi; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for FakeApi + */ +@Ignore +public class FakeApiTest { + + private FakeApi api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + } + + /** + * successful operation + */ + @Test + public void shouldSee200AfterCreateXmlItem() { + XmlItem xmlItem = null; + api.createXmlItem() + .body(xmlItem).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Output boolean + */ + @Test + public void shouldSee200AfterFakeOuterBooleanSerialize() { + Boolean body = null; + api.fakeOuterBooleanSerialize().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Output composite + */ + @Test + public void shouldSee200AfterFakeOuterCompositeSerialize() { + OuterComposite body = null; + api.fakeOuterCompositeSerialize().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Output number + */ + @Test + public void shouldSee200AfterFakeOuterNumberSerialize() { + BigDecimal body = null; + api.fakeOuterNumberSerialize().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Output string + */ + @Test + public void shouldSee200AfterFakeOuterStringSerialize() { + String body = null; + api.fakeOuterStringSerialize().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Success + */ + @Test + public void shouldSee200AfterTestBodyWithFileSchema() { + FileSchemaTestClass body = null; + api.testBodyWithFileSchema() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Success + */ + @Test + public void shouldSee200AfterTestBodyWithQueryParams() { + String query = null; + User body = null; + api.testBodyWithQueryParams() + .queryQuery(query) + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterTestClientModel() { + Client body = null; + api.testClientModel() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Invalid username supplied + */ + @Test + public void shouldSee400AfterTestEndpointParameters() { + BigDecimal number = null; + Double _double = null; + String patternWithoutDelimiter = null; + byte[] _byte = null; + Integer integer = null; + Integer int32 = null; + Long int64 = null; + Float _float = null; + String string = null; + File binary = null; + LocalDate date = null; + OffsetDateTime dateTime = null; + String password = null; + String paramCallback = null; + api.testEndpointParameters() + .numberForm(number) + ._doubleForm(_double) + .patternWithoutDelimiterForm(patternWithoutDelimiter) + ._byteForm(_byte).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * User not found + */ + @Test + public void shouldSee404AfterTestEndpointParameters() { + BigDecimal number = null; + Double _double = null; + String patternWithoutDelimiter = null; + byte[] _byte = null; + Integer integer = null; + Integer int32 = null; + Long int64 = null; + Float _float = null; + String string = null; + File binary = null; + LocalDate date = null; + OffsetDateTime dateTime = null; + String password = null; + String paramCallback = null; + api.testEndpointParameters() + .numberForm(number) + ._doubleForm(_double) + .patternWithoutDelimiterForm(patternWithoutDelimiter) + ._byteForm(_byte).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Invalid request + */ + @Test + public void shouldSee400AfterTestEnumParameters() { + String enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + List enumFormStringArray = null; + String enumFormString = null; + api.testEnumParameters().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Not found + */ + @Test + public void shouldSee404AfterTestEnumParameters() { + String enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + List enumFormStringArray = null; + String enumFormString = null; + api.testEnumParameters().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Someting wrong + */ + @Test + public void shouldSee400AfterTestGroupParameters() { + Integer requiredStringGroup = null; + String requiredBooleanGroup = null; + Long requiredInt64Group = null; + Integer stringGroup = null; + String booleanGroup = null; + Long int64Group = null; + api.testGroupParameters() + .requiredStringGroupQuery(requiredStringGroup) + .requiredBooleanGroupHeader(requiredBooleanGroup) + .requiredInt64GroupQuery(requiredInt64Group).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterTestInlineAdditionalProperties() { + Map param = null; + api.testInlineAdditionalProperties() + .body(param).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterTestJsonFormData() { + String param = null; + String param2 = null; + api.testJsonFormData() + .paramForm(param) + .param2Form(param2).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Success + */ + @Test + public void shouldSee200AfterTestQueryParameterCollectionFormat() { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat() + .pipeQuery(pipe) + .ioutilQuery(ioutil) + .httpQuery(http) + .urlQuery(url) + .contextQuery(context).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java new file mode 100644 index 000000000000..3d2b74185bac --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -0,0 +1,61 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Client; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.FakeClassnameTags123Api; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for FakeClassnameTags123Api + */ +@Ignore +public class FakeClassnameTags123ApiTest { + + private FakeClassnameTags123Api api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).fakeClassnameTags123(); + } + + /** + * successful operation + */ + @Test + public void shouldSee200AfterTestClassname() { + Client body = null; + api.testClassname() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 000000000000..46355ce2a520 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,267 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.PetApi; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for PetApi + */ +@Ignore +public class PetApiTest { + + private PetApi api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + } + + /** + * successful operation + */ + @Test + public void shouldSee200AfterAddPet() { + Pet body = null; + api.addPet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid input + */ + @Test + public void shouldSee405AfterAddPet() { + Pet body = null; + api.addPet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterDeletePet() { + Long petId = null; + String apiKey = null; + api.deletePet() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid pet value + */ + @Test + public void shouldSee400AfterDeletePet() { + Long petId = null; + String apiKey = null; + api.deletePet() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterFindPetsByStatus() { + List status = null; + api.findPetsByStatus() + .statusQuery(status).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid status value + */ + @Test + public void shouldSee400AfterFindPetsByStatus() { + List status = null; + api.findPetsByStatus() + .statusQuery(status).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterFindPetsByTags() { + List tags = null; + api.findPetsByTags() + .tagsQuery(tags).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid tag value + */ + @Test + public void shouldSee400AfterFindPetsByTags() { + List tags = null; + api.findPetsByTags() + .tagsQuery(tags).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterGetPetById() { + Long petId = null; + api.getPetById() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid ID supplied + */ + @Test + public void shouldSee400AfterGetPetById() { + Long petId = null; + api.getPetById() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Pet not found + */ + @Test + public void shouldSee404AfterGetPetById() { + Long petId = null; + api.getPetById() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterUpdatePet() { + Pet body = null; + api.updatePet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid ID supplied + */ + @Test + public void shouldSee400AfterUpdatePet() { + Pet body = null; + api.updatePet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Pet not found + */ + @Test + public void shouldSee404AfterUpdatePet() { + Pet body = null; + api.updatePet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Validation exception + */ + @Test + public void shouldSee405AfterUpdatePet() { + Pet body = null; + api.updatePet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Invalid input + */ + @Test + public void shouldSee405AfterUpdatePetWithForm() { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterUploadFile() { + Long petId = null; + String additionalMetadata = null; + File file = null; + api.uploadFile() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterUploadFileWithRequiredFile() { + Long petId = null; + File requiredFile = null; + String additionalMetadata = null; + api.uploadFileWithRequiredFile() + .petIdPath(petId) + .requiredFileMultiPart(requiredFile).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 000000000000..88b10b312b06 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,139 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.Order; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.StoreApi; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for StoreApi + */ +@Ignore +public class StoreApiTest { + + private StoreApi api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); + } + + /** + * Invalid ID supplied + */ + @Test + public void shouldSee400AfterDeleteOrder() { + String orderId = null; + api.deleteOrder() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Order not found + */ + @Test + public void shouldSee404AfterDeleteOrder() { + String orderId = null; + api.deleteOrder() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterGetInventory() { + api.getInventory().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterGetOrderById() { + Long orderId = null; + api.getOrderById() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid ID supplied + */ + @Test + public void shouldSee400AfterGetOrderById() { + Long orderId = null; + api.getOrderById() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Order not found + */ + @Test + public void shouldSee404AfterGetOrderById() { + Long orderId = null; + api.getOrderById() + .orderIdPath(orderId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterPlaceOrder() { + Order body = null; + api.placeOrder() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid Order + */ + @Test + public void shouldSee400AfterPlaceOrder() { + Order body = null; + api.placeOrder() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 000000000000..8b224223bdb4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,206 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.User; +import org.openapitools.client.ApiClient; +import org.openapitools.client.api.UserApi; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.filter.log.ErrorLoggingFilter; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.JacksonObjectMapper.jackson; + +/** + * API tests for UserApi + */ +@Ignore +public class UserApiTest { + + private UserApi api; + + @Before + public void createApi() { + api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(jackson()))) + .addFilter(new ErrorLoggingFilter()) + .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); + } + + /** + * successful operation + */ + @Test + public void shouldSee0AfterCreateUser() { + User body = null; + api.createUser() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee0AfterCreateUsersWithArrayInput() { + List body = null; + api.createUsersWithArrayInput() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee0AfterCreateUsersWithListInput() { + List body = null; + api.createUsersWithListInput() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Invalid username supplied + */ + @Test + public void shouldSee400AfterDeleteUser() { + String username = null; + api.deleteUser() + .usernamePath(username).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * User not found + */ + @Test + public void shouldSee404AfterDeleteUser() { + String username = null; + api.deleteUser() + .usernamePath(username).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterGetUserByName() { + String username = null; + api.getUserByName() + .usernamePath(username).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid username supplied + */ + @Test + public void shouldSee400AfterGetUserByName() { + String username = null; + api.getUserByName() + .usernamePath(username).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * User not found + */ + @Test + public void shouldSee404AfterGetUserByName() { + String username = null; + api.getUserByName() + .usernamePath(username).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee200AfterLoginUser() { + String username = null; + String password = null; + api.loginUser() + .usernameQuery(username) + .passwordQuery(password).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * Invalid username/password supplied + */ + @Test + public void shouldSee400AfterLoginUser() { + String username = null; + String password = null; + api.loginUser() + .usernameQuery(username) + .passwordQuery(password).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * successful operation + */ + @Test + public void shouldSee0AfterLogoutUser() { + api.logoutUser().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + + /** + * Invalid user supplied + */ + @Test + public void shouldSee400AfterUpdateUser() { + String username = null; + User body = null; + api.updateUser() + .usernamePath(username) + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** + * User not found + */ + @Test + public void shouldSee404AfterUpdateUser() { + String username = null; + User body = null; + api.updateUser() + .usernamePath(username) + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java new file mode 100644 index 000000000000..ec44af783873 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesAnyType + */ +public class AdditionalPropertiesAnyTypeTest { + private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); + + /** + * Model tests for AdditionalPropertiesAnyType + */ + @Test + public void testAdditionalPropertiesAnyType() { + // TODO: test AdditionalPropertiesAnyType + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java new file mode 100644 index 000000000000..ceb024c5620b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesArray + */ +public class AdditionalPropertiesArrayTest { + private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); + + /** + * Model tests for AdditionalPropertiesArray + */ + @Test + public void testAdditionalPropertiesArray() { + // TODO: test AdditionalPropertiesArray + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java new file mode 100644 index 000000000000..517e5a10ae43 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesBoolean + */ +public class AdditionalPropertiesBooleanTest { + private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); + + /** + * Model tests for AdditionalPropertiesBoolean + */ + @Test + public void testAdditionalPropertiesBoolean() { + // TODO: test AdditionalPropertiesBoolean + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 000000000000..2e3844ba9756 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,133 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesClass + */ +public class AdditionalPropertiesClassTest { + private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); + + /** + * Model tests for AdditionalPropertiesClass + */ + @Test + public void testAdditionalPropertiesClass() { + // TODO: test AdditionalPropertiesClass + } + + /** + * Test the property 'mapString' + */ + @Test + public void mapStringTest() { + // TODO: test mapString + } + + /** + * Test the property 'mapNumber' + */ + @Test + public void mapNumberTest() { + // TODO: test mapNumber + } + + /** + * Test the property 'mapInteger' + */ + @Test + public void mapIntegerTest() { + // TODO: test mapInteger + } + + /** + * Test the property 'mapBoolean' + */ + @Test + public void mapBooleanTest() { + // TODO: test mapBoolean + } + + /** + * Test the property 'mapArrayInteger' + */ + @Test + public void mapArrayIntegerTest() { + // TODO: test mapArrayInteger + } + + /** + * Test the property 'mapArrayAnytype' + */ + @Test + public void mapArrayAnytypeTest() { + // TODO: test mapArrayAnytype + } + + /** + * Test the property 'mapMapString' + */ + @Test + public void mapMapStringTest() { + // TODO: test mapMapString + } + + /** + * Test the property 'mapMapAnytype' + */ + @Test + public void mapMapAnytypeTest() { + // TODO: test mapMapAnytype + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'anytype2' + */ + @Test + public void anytype2Test() { + // TODO: test anytype2 + } + + /** + * Test the property 'anytype3' + */ + @Test + public void anytype3Test() { + // TODO: test anytype3 + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java new file mode 100644 index 000000000000..66a7b85623e3 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesInteger + */ +public class AdditionalPropertiesIntegerTest { + private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); + + /** + * Model tests for AdditionalPropertiesInteger + */ + @Test + public void testAdditionalPropertiesInteger() { + // TODO: test AdditionalPropertiesInteger + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java new file mode 100644 index 000000000000..4e03485a4484 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesNumber + */ +public class AdditionalPropertiesNumberTest { + private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); + + /** + * Model tests for AdditionalPropertiesNumber + */ + @Test + public void testAdditionalPropertiesNumber() { + // TODO: test AdditionalPropertiesNumber + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java new file mode 100644 index 000000000000..e0c72c586347 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesObject + */ +public class AdditionalPropertiesObjectTest { + private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); + + /** + * Model tests for AdditionalPropertiesObject + */ + @Test + public void testAdditionalPropertiesObject() { + // TODO: test AdditionalPropertiesObject + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java new file mode 100644 index 000000000000..c84d987e7640 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdditionalPropertiesString + */ +public class AdditionalPropertiesStringTest { + private final AdditionalPropertiesString model = new AdditionalPropertiesString(); + + /** + * Model tests for AdditionalPropertiesString + */ + @Test + public void testAdditionalPropertiesString() { + // TODO: test AdditionalPropertiesString + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AnimalTest.java new file mode 100644 index 000000000000..c0d10ec5a3d8 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -0,0 +1,59 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Animal + */ +public class AnimalTest { + private final Animal model = new Animal(); + + /** + * Model tests for Animal + */ + @Test + public void testAnimal() { + // TODO: test Animal + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 000000000000..e25187a3b608 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ArrayOfArrayOfNumberOnly + */ +public class ArrayOfArrayOfNumberOnlyTest { + private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); + + /** + * Model tests for ArrayOfArrayOfNumberOnly + */ + @Test + public void testArrayOfArrayOfNumberOnly() { + // TODO: test ArrayOfArrayOfNumberOnly + } + + /** + * Test the property 'arrayArrayNumber' + */ + @Test + public void arrayArrayNumberTest() { + // TODO: test arrayArrayNumber + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 000000000000..ae1061823991 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ArrayOfNumberOnly + */ +public class ArrayOfNumberOnlyTest { + private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); + + /** + * Model tests for ArrayOfNumberOnly + */ + @Test + public void testArrayOfNumberOnly() { + // TODO: test ArrayOfNumberOnly + } + + /** + * Test the property 'arrayNumber' + */ + @Test + public void arrayNumberTest() { + // TODO: test arrayNumber + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayTestTest.java new file mode 100644 index 000000000000..36bd9951cf60 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -0,0 +1,68 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.ReadOnlyFirst; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ArrayTest + */ +public class ArrayTestTest { + private final ArrayTest model = new ArrayTest(); + + /** + * Model tests for ArrayTest + */ + @Test + public void testArrayTest() { + // TODO: test ArrayTest + } + + /** + * Test the property 'arrayOfString' + */ + @Test + public void arrayOfStringTest() { + // TODO: test arrayOfString + } + + /** + * Test the property 'arrayArrayOfInteger' + */ + @Test + public void arrayArrayOfIntegerTest() { + // TODO: test arrayArrayOfInteger + } + + /** + * Test the property 'arrayArrayOfModel' + */ + @Test + public void arrayArrayOfModelTest() { + // TODO: test arrayArrayOfModel + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java new file mode 100644 index 000000000000..a9b13011f001 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for BigCatAllOf + */ +public class BigCatAllOfTest { + private final BigCatAllOf model = new BigCatAllOf(); + + /** + * Model tests for BigCatAllOf + */ + @Test + public void testBigCatAllOf() { + // TODO: test BigCatAllOf + } + + /** + * Test the property 'kind' + */ + @Test + public void kindTest() { + // TODO: test kind + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java new file mode 100644 index 000000000000..006c80707427 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -0,0 +1,75 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BigCatAllOf; +import org.openapitools.client.model.Cat; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for BigCat + */ +public class BigCatTest { + private final BigCat model = new BigCat(); + + /** + * Model tests for BigCat + */ + @Test + public void testBigCat() { + // TODO: test BigCat + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'declawed' + */ + @Test + public void declawedTest() { + // TODO: test declawed + } + + /** + * Test the property 'kind' + */ + @Test + public void kindTest() { + // TODO: test kind + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CapitalizationTest.java new file mode 100644 index 000000000000..a701b341fc59 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -0,0 +1,89 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Capitalization + */ +public class CapitalizationTest { + private final Capitalization model = new Capitalization(); + + /** + * Model tests for Capitalization + */ + @Test + public void testCapitalization() { + // TODO: test Capitalization + } + + /** + * Test the property 'smallCamel' + */ + @Test + public void smallCamelTest() { + // TODO: test smallCamel + } + + /** + * Test the property 'capitalCamel' + */ + @Test + public void capitalCamelTest() { + // TODO: test capitalCamel + } + + /** + * Test the property 'smallSnake' + */ + @Test + public void smallSnakeTest() { + // TODO: test smallSnake + } + + /** + * Test the property 'capitalSnake' + */ + @Test + public void capitalSnakeTest() { + // TODO: test capitalSnake + } + + /** + * Test the property 'scAETHFlowPoints' + */ + @Test + public void scAETHFlowPointsTest() { + // TODO: test scAETHFlowPoints + } + + /** + * Test the property 'ATT_NAME' + */ + @Test + public void ATT_NAMETest() { + // TODO: test ATT_NAME + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java new file mode 100644 index 000000000000..1d85a0447253 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CatAllOf + */ +public class CatAllOfTest { + private final CatAllOf model = new CatAllOf(); + + /** + * Model tests for CatAllOf + */ + @Test + public void testCatAllOf() { + // TODO: test CatAllOf + } + + /** + * Test the property 'declawed' + */ + @Test + public void declawedTest() { + // TODO: test declawed + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatTest.java new file mode 100644 index 000000000000..dbf40678a2d0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatTest.java @@ -0,0 +1,67 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Cat + */ +public class CatTest { + private final Cat model = new Cat(); + + /** + * Model tests for Cat + */ + @Test + public void testCat() { + // TODO: test Cat + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'declawed' + */ + @Test + public void declawedTest() { + // TODO: test declawed + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 000000000000..6027994a2ac3 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClassModelTest.java new file mode 100644 index 000000000000..8914c9cad43d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ClassModel + */ +public class ClassModelTest { + private final ClassModel model = new ClassModel(); + + /** + * Model tests for ClassModel + */ + @Test + public void testClassModel() { + // TODO: test ClassModel + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClientTest.java new file mode 100644 index 000000000000..c21b346272d7 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ClientTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Client + */ +public class ClientTest { + private final Client model = new Client(); + + /** + * Model tests for Client + */ + @Test + public void testClient() { + // TODO: test Client + } + + /** + * Test the property 'client' + */ + @Test + public void clientTest() { + // TODO: test client + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java new file mode 100644 index 000000000000..6e4b49108098 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for DogAllOf + */ +public class DogAllOfTest { + private final DogAllOf model = new DogAllOf(); + + /** + * Model tests for DogAllOf + */ + @Test + public void testDogAllOf() { + // TODO: test DogAllOf + } + + /** + * Test the property 'breed' + */ + @Test + public void breedTest() { + // TODO: test breed + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogTest.java new file mode 100644 index 000000000000..a46bc508d48c --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogTest.java @@ -0,0 +1,67 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Dog + */ +public class DogTest { + private final Dog model = new Dog(); + + /** + * Model tests for Dog + */ + @Test + public void testDog() { + // TODO: test Dog + } + + /** + * Test the property 'className' + */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'breed' + */ + @Test + public void breedTest() { + // TODO: test breed + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumArraysTest.java new file mode 100644 index 000000000000..45b8fbbd8220 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -0,0 +1,59 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for EnumArrays + */ +public class EnumArraysTest { + private final EnumArrays model = new EnumArrays(); + + /** + * Model tests for EnumArrays + */ + @Test + public void testEnumArrays() { + // TODO: test EnumArrays + } + + /** + * Test the property 'justSymbol' + */ + @Test + public void justSymbolTest() { + // TODO: test justSymbol + } + + /** + * Test the property 'arrayEnum' + */ + @Test + public void arrayEnumTest() { + // TODO: test arrayEnum + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumClassTest.java new file mode 100644 index 000000000000..9e45543facd2 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -0,0 +1,33 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for EnumClass + */ +public class EnumClassTest { + /** + * Model tests for EnumClass + */ + @Test + public void testEnumClass() { + // TODO: test EnumClass + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumTestTest.java new file mode 100644 index 000000000000..04e7afb19784 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -0,0 +1,82 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.OuterEnum; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for EnumTest + */ +public class EnumTestTest { + private final EnumTest model = new EnumTest(); + + /** + * Model tests for EnumTest + */ + @Test + public void testEnumTest() { + // TODO: test EnumTest + } + + /** + * Test the property 'enumString' + */ + @Test + public void enumStringTest() { + // TODO: test enumString + } + + /** + * Test the property 'enumStringRequired' + */ + @Test + public void enumStringRequiredTest() { + // TODO: test enumStringRequired + } + + /** + * Test the property 'enumInteger' + */ + @Test + public void enumIntegerTest() { + // TODO: test enumInteger + } + + /** + * Test the property 'enumNumber' + */ + @Test + public void enumNumberTest() { + // TODO: test enumNumber + } + + /** + * Test the property 'outerEnum' + */ + @Test + public void outerEnumTest() { + // TODO: test outerEnum + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java new file mode 100644 index 000000000000..ef37e666be39 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -0,0 +1,59 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FileSchemaTestClass + */ +public class FileSchemaTestClassTest { + private final FileSchemaTestClass model = new FileSchemaTestClass(); + + /** + * Model tests for FileSchemaTestClass + */ + @Test + public void testFileSchemaTestClass() { + // TODO: test FileSchemaTestClass + } + + /** + * Test the property 'file' + */ + @Test + public void fileTest() { + // TODO: test file + } + + /** + * Test the property 'files' + */ + @Test + public void filesTest() { + // TODO: test files + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FormatTestTest.java new file mode 100644 index 000000000000..73a1f737503f --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -0,0 +1,158 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FormatTest + */ +public class FormatTestTest { + private final FormatTest model = new FormatTest(); + + /** + * Model tests for FormatTest + */ + @Test + public void testFormatTest() { + // TODO: test FormatTest + } + + /** + * Test the property 'integer' + */ + @Test + public void integerTest() { + // TODO: test integer + } + + /** + * Test the property 'int32' + */ + @Test + public void int32Test() { + // TODO: test int32 + } + + /** + * Test the property 'int64' + */ + @Test + public void int64Test() { + // TODO: test int64 + } + + /** + * Test the property 'number' + */ + @Test + public void numberTest() { + // TODO: test number + } + + /** + * Test the property '_float' + */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** + * Test the property '_double' + */ + @Test + public void _doubleTest() { + // TODO: test _double + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + + /** + * Test the property '_byte' + */ + @Test + public void _byteTest() { + // TODO: test _byte + } + + /** + * Test the property 'binary' + */ + @Test + public void binaryTest() { + // TODO: test binary + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + + /** + * Test the property 'dateTime' + */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** + * Test the property 'uuid' + */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 000000000000..e902c100383b --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HasOnlyReadOnly + */ +public class HasOnlyReadOnlyTest { + private final HasOnlyReadOnly model = new HasOnlyReadOnly(); + + /** + * Model tests for HasOnlyReadOnly + */ + @Test + public void testHasOnlyReadOnly() { + // TODO: test HasOnlyReadOnly + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + + /** + * Test the property 'foo' + */ + @Test + public void fooTest() { + // TODO: test foo + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MapTestTest.java new file mode 100644 index 000000000000..a0c991bb7588 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -0,0 +1,76 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MapTest + */ +public class MapTestTest { + private final MapTest model = new MapTest(); + + /** + * Model tests for MapTest + */ + @Test + public void testMapTest() { + // TODO: test MapTest + } + + /** + * Test the property 'mapMapOfString' + */ + @Test + public void mapMapOfStringTest() { + // TODO: test mapMapOfString + } + + /** + * Test the property 'mapOfEnumString' + */ + @Test + public void mapOfEnumStringTest() { + // TODO: test mapOfEnumString + } + + /** + * Test the property 'directMap' + */ + @Test + public void directMapTest() { + // TODO: test directMap + } + + /** + * Test the property 'indirectMap' + */ + @Test + public void indirectMapTest() { + // TODO: test indirectMap + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 000000000000..630b566f54db --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,71 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.client.model.Animal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MixedPropertiesAndAdditionalPropertiesClass + */ +public class MixedPropertiesAndAdditionalPropertiesClassTest { + private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); + + /** + * Model tests for MixedPropertiesAndAdditionalPropertiesClass + */ + @Test + public void testMixedPropertiesAndAdditionalPropertiesClass() { + // TODO: test MixedPropertiesAndAdditionalPropertiesClass + } + + /** + * Test the property 'uuid' + */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** + * Test the property 'dateTime' + */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** + * Test the property 'map' + */ + @Test + public void mapTest() { + // TODO: test map + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java new file mode 100644 index 000000000000..82c7208079db --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Model200Response + */ +public class Model200ResponseTest { + private final Model200Response model = new Model200Response(); + + /** + * Model tests for Model200Response + */ + @Test + public void testModel200Response() { + // TODO: test Model200Response + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 000000000000..97a1287aa413 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,65 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ModelApiResponse + */ +public class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + public void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelReturnTest.java new file mode 100644 index 000000000000..f884519ebc86 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ModelReturn + */ +public class ModelReturnTest { + private final ModelReturn model = new ModelReturn(); + + /** + * Model tests for ModelReturn + */ + @Test + public void testModelReturn() { + // TODO: test ModelReturn + } + + /** + * Test the property '_return' + */ + @Test + public void _returnTest() { + // TODO: test _return + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NameTest.java new file mode 100644 index 000000000000..cb3a94cf74ab --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NameTest.java @@ -0,0 +1,73 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Name + */ +public class NameTest { + private final Name model = new Name(); + + /** + * Model tests for Name + */ + @Test + public void testName() { + // TODO: test Name + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'snakeCase' + */ + @Test + public void snakeCaseTest() { + // TODO: test snakeCase + } + + /** + * Test the property 'property' + */ + @Test + public void propertyTest() { + // TODO: test property + } + + /** + * Test the property '_123number' + */ + @Test + public void _123numberTest() { + // TODO: test _123number + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java new file mode 100644 index 000000000000..f4fbd5ee8b42 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for NumberOnly + */ +public class NumberOnlyTest { + private final NumberOnly model = new NumberOnly(); + + /** + * Model tests for NumberOnly + */ + @Test + public void testNumberOnly() { + // TODO: test NumberOnly + } + + /** + * Test the property 'justNumber' + */ + @Test + public void justNumberTest() { + // TODO: test justNumber + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 000000000000..da63441c6597 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,90 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Order + */ +public class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + public void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + public void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + public void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java new file mode 100644 index 000000000000..ebea3ca304c0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -0,0 +1,66 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterComposite + */ +public class OuterCompositeTest { + private final OuterComposite model = new OuterComposite(); + + /** + * Model tests for OuterComposite + */ + @Test + public void testOuterComposite() { + // TODO: test OuterComposite + } + + /** + * Test the property 'myNumber' + */ + @Test + public void myNumberTest() { + // TODO: test myNumber + } + + /** + * Test the property 'myString' + */ + @Test + public void myStringTest() { + // TODO: test myString + } + + /** + * Test the property 'myBoolean' + */ + @Test + public void myBooleanTest() { + // TODO: test myBoolean + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterEnumTest.java new file mode 100644 index 000000000000..cf0ebae0faf0 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -0,0 +1,33 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnum + */ +public class OuterEnumTest { + /** + * Model tests for OuterEnum + */ + @Test + public void testOuterEnum() { + // TODO: test OuterEnum + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 000000000000..c3c0d4cc35dd --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,93 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java new file mode 100644 index 000000000000..b82a7d0ef561 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ReadOnlyFirst + */ +public class ReadOnlyFirstTest { + private final ReadOnlyFirst model = new ReadOnlyFirst(); + + /** + * Model tests for ReadOnlyFirst + */ + @Test + public void testReadOnlyFirst() { + // TODO: test ReadOnlyFirst + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + + /** + * Test the property 'baz' + */ + @Test + public void bazTest() { + // TODO: test baz + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java new file mode 100644 index 000000000000..d5a19c371e68 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SpecialModelName + */ +public class SpecialModelNameTest { + private final SpecialModelName model = new SpecialModelName(); + + /** + * Model tests for SpecialModelName + */ + @Test + public void testSpecialModelName() { + // TODO: test SpecialModelName + } + + /** + * Test the property '$specialPropertyName' + */ + @Test + public void $specialPropertyNameTest() { + // TODO: test $specialPropertyName + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 000000000000..5c2cc6f49e05 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java new file mode 100644 index 000000000000..e96ac744439d --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -0,0 +1,84 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TypeHolderDefault + */ +public class TypeHolderDefaultTest { + private final TypeHolderDefault model = new TypeHolderDefault(); + + /** + * Model tests for TypeHolderDefault + */ + @Test + public void testTypeHolderDefault() { + // TODO: test TypeHolderDefault + } + + /** + * Test the property 'stringItem' + */ + @Test + public void stringItemTest() { + // TODO: test stringItem + } + + /** + * Test the property 'numberItem' + */ + @Test + public void numberItemTest() { + // TODO: test numberItem + } + + /** + * Test the property 'integerItem' + */ + @Test + public void integerItemTest() { + // TODO: test integerItem + } + + /** + * Test the property 'boolItem' + */ + @Test + public void boolItemTest() { + // TODO: test boolItem + } + + /** + * Test the property 'arrayItem' + */ + @Test + public void arrayItemTest() { + // TODO: test arrayItem + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java new file mode 100644 index 000000000000..56641d163a50 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -0,0 +1,92 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TypeHolderExample + */ +public class TypeHolderExampleTest { + private final TypeHolderExample model = new TypeHolderExample(); + + /** + * Model tests for TypeHolderExample + */ + @Test + public void testTypeHolderExample() { + // TODO: test TypeHolderExample + } + + /** + * Test the property 'stringItem' + */ + @Test + public void stringItemTest() { + // TODO: test stringItem + } + + /** + * Test the property 'numberItem' + */ + @Test + public void numberItemTest() { + // TODO: test numberItem + } + + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + + /** + * Test the property 'integerItem' + */ + @Test + public void integerItemTest() { + // TODO: test integerItem + } + + /** + * Test the property 'boolItem' + */ + @Test + public void boolItemTest() { + // TODO: test boolItem + } + + /** + * Test the property 'arrayItem' + */ + @Test + public void arrayItemTest() { + // TODO: test arrayItem + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 000000000000..ce40d3a2a637 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for User + */ +public class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + public void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + public void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + public void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + public void userStatusTest() { + // TODO: test userStatus + } + +} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/XmlItemTest.java new file mode 100644 index 000000000000..501c414555f4 --- /dev/null +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -0,0 +1,276 @@ +/* + * 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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for XmlItem + */ +public class XmlItemTest { + private final XmlItem model = new XmlItem(); + + /** + * Model tests for XmlItem + */ + @Test + public void testXmlItem() { + // TODO: test XmlItem + } + + /** + * Test the property 'attributeString' + */ + @Test + public void attributeStringTest() { + // TODO: test attributeString + } + + /** + * Test the property 'attributeNumber' + */ + @Test + public void attributeNumberTest() { + // TODO: test attributeNumber + } + + /** + * Test the property 'attributeInteger' + */ + @Test + public void attributeIntegerTest() { + // TODO: test attributeInteger + } + + /** + * Test the property 'attributeBoolean' + */ + @Test + public void attributeBooleanTest() { + // TODO: test attributeBoolean + } + + /** + * Test the property 'wrappedArray' + */ + @Test + public void wrappedArrayTest() { + // TODO: test wrappedArray + } + + /** + * Test the property 'nameString' + */ + @Test + public void nameStringTest() { + // TODO: test nameString + } + + /** + * Test the property 'nameNumber' + */ + @Test + public void nameNumberTest() { + // TODO: test nameNumber + } + + /** + * Test the property 'nameInteger' + */ + @Test + public void nameIntegerTest() { + // TODO: test nameInteger + } + + /** + * Test the property 'nameBoolean' + */ + @Test + public void nameBooleanTest() { + // TODO: test nameBoolean + } + + /** + * Test the property 'nameArray' + */ + @Test + public void nameArrayTest() { + // TODO: test nameArray + } + + /** + * Test the property 'nameWrappedArray' + */ + @Test + public void nameWrappedArrayTest() { + // TODO: test nameWrappedArray + } + + /** + * Test the property 'prefixString' + */ + @Test + public void prefixStringTest() { + // TODO: test prefixString + } + + /** + * Test the property 'prefixNumber' + */ + @Test + public void prefixNumberTest() { + // TODO: test prefixNumber + } + + /** + * Test the property 'prefixInteger' + */ + @Test + public void prefixIntegerTest() { + // TODO: test prefixInteger + } + + /** + * Test the property 'prefixBoolean' + */ + @Test + public void prefixBooleanTest() { + // TODO: test prefixBoolean + } + + /** + * Test the property 'prefixArray' + */ + @Test + public void prefixArrayTest() { + // TODO: test prefixArray + } + + /** + * Test the property 'prefixWrappedArray' + */ + @Test + public void prefixWrappedArrayTest() { + // TODO: test prefixWrappedArray + } + + /** + * Test the property 'namespaceString' + */ + @Test + public void namespaceStringTest() { + // TODO: test namespaceString + } + + /** + * Test the property 'namespaceNumber' + */ + @Test + public void namespaceNumberTest() { + // TODO: test namespaceNumber + } + + /** + * Test the property 'namespaceInteger' + */ + @Test + public void namespaceIntegerTest() { + // TODO: test namespaceInteger + } + + /** + * Test the property 'namespaceBoolean' + */ + @Test + public void namespaceBooleanTest() { + // TODO: test namespaceBoolean + } + + /** + * Test the property 'namespaceArray' + */ + @Test + public void namespaceArrayTest() { + // TODO: test namespaceArray + } + + /** + * Test the property 'namespaceWrappedArray' + */ + @Test + public void namespaceWrappedArrayTest() { + // TODO: test namespaceWrappedArray + } + + /** + * Test the property 'prefixNsString' + */ + @Test + public void prefixNsStringTest() { + // TODO: test prefixNsString + } + + /** + * Test the property 'prefixNsNumber' + */ + @Test + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber + } + + /** + * Test the property 'prefixNsInteger' + */ + @Test + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger + } + + /** + * Test the property 'prefixNsBoolean' + */ + @Test + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean + } + + /** + * Test the property 'prefixNsArray' + */ + @Test + public void prefixNsArrayTest() { + // TODO: test prefixNsArray + } + + /** + * Test the property 'prefixNsWrappedArray' + */ + @Test + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray + } + +} diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index 015b0b676a84..44bbfcbb5722 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -107,7 +107,7 @@ ext { dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.code.findbugs:jsr305:3.0.2" - compile "io.rest-assured:scala-support:$rest_assured_version" + compile "io.rest-assured:rest-assured:$rest_assured_version" compile "io.gsonfire:gson-fire:$gson_fire_version" compile 'com.google.code.gson:gson:$gson_version' compile "org.threeten:threetenbp:$threetenbp_version" diff --git a/samples/client/petstore/java/rest-assured/build.sbt b/samples/client/petstore/java/rest-assured/build.sbt index 980585522a9b..e56cbf759bf8 100644 --- a/samples/client/petstore/java/rest-assured/build.sbt +++ b/samples/client/petstore/java/rest-assured/build.sbt @@ -10,13 +10,15 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.21", + "io.rest-assured" % "rest-assured" % "4.3.0", "io.rest-assured" % "scala-support" % "4.3.0", + "com.google.code.findbugs" % "jsr305" % "3.0.2", "com.google.code.gson" % "gson" % "2.8.6", "io.gsonfire" % "gson-fire" % "1.8.4" % "compile", "org.threeten" % "threetenbp" % "1.4.3" % "compile", "com.squareup.okio" % "okio" % "1.17.5" % "compile", "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", - "org.hibernate" % "hibernate-validator" "6.0.19.Final" % "compile", + "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 742dbac32502..11417e240fcf 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,8 @@ public class AnotherFakeApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake(); } @@ -51,9 +52,9 @@ public void createApi() { */ @Test public void shouldSee200AfterCall123testSpecialTags() { - Client client = null; + Client body = null; api.call123testSpecialTags() - .body(client).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java index f8746ac3c958..57aba781775f 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; import org.openapitools.client.ApiClient; import org.openapitools.client.api.FakeApi; import io.restassured.builder.RequestSpecBuilder; @@ -48,11 +49,24 @@ public class FakeApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); } + /** + * successful operation + */ + @Test + public void shouldSee200AfterCreateXmlItem() { + XmlItem xmlItem = null; + api.createXmlItem() + .body(xmlItem).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** * Output boolean */ @@ -69,7 +83,7 @@ public void shouldSee200AfterFakeOuterBooleanSerialize() { */ @Test public void shouldSee200AfterFakeOuterCompositeSerialize() { - OuterComposite outerComposite = null; + OuterComposite body = null; api.fakeOuterCompositeSerialize().execute(r -> r.prettyPeek()); // TODO: test validations } @@ -102,9 +116,9 @@ public void shouldSee200AfterFakeOuterStringSerialize() { */ @Test public void shouldSee200AfterTestBodyWithFileSchema() { - FileSchemaTestClass fileSchemaTestClass = null; + FileSchemaTestClass body = null; api.testBodyWithFileSchema() - .body(fileSchemaTestClass).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -115,10 +129,10 @@ public void shouldSee200AfterTestBodyWithFileSchema() { @Test public void shouldSee200AfterTestBodyWithQueryParams() { String query = null; - User user = null; + User body = null; api.testBodyWithQueryParams() .queryQuery(query) - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -128,9 +142,9 @@ public void shouldSee200AfterTestBodyWithQueryParams() { */ @Test public void shouldSee200AfterTestClientModel() { - Client client = null; + Client body = null; api.testClientModel() - .body(client).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -249,9 +263,9 @@ public void shouldSee400AfterTestGroupParameters() { */ @Test public void shouldSee200AfterTestInlineAdditionalProperties() { - Map requestBody = null; + Map param = null; api.testInlineAdditionalProperties() - .body(requestBody).execute(r -> r.prettyPeek()); + .body(param).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -269,4 +283,24 @@ public void shouldSee200AfterTestJsonFormData() { // TODO: test validations } + + /** + * Success + */ + @Test + public void shouldSee200AfterTestQueryParameterCollectionFormat() { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat() + .pipeQuery(pipe) + .ioutilQuery(ioutil) + .httpQuery(http) + .urlQuery(url) + .contextQuery(context).execute(r -> r.prettyPeek()); + // TODO: test validations + } + } \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 97875006e5ad..d8fbcab91234 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,8 @@ public class FakeClassnameTags123ApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).fakeClassnameTags123(); } @@ -51,9 +52,9 @@ public void createApi() { */ @Test public void shouldSee200AfterTestClassname() { - Client client = null; + Client body = null; api.testClassname() - .body(client).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/PetApiTest.java index 0373a272f6b5..4bcccd56c791 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,8 +14,6 @@ package org.openapitools.client.api; import java.io.File; - -import io.restassured.response.ResponseBody; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import org.openapitools.client.ApiClient; @@ -45,23 +43,47 @@ public class PetApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); } + /** + * successful operation + */ + @Test + public void shouldSee200AfterAddPet() { + Pet body = null; + api.addPet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + /** * Invalid input */ @Test public void shouldSee405AfterAddPet() { - Pet pet = null; + Pet body = null; api.addPet() - .body(pet).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } + /** + * successful operation + */ + @Test + public void shouldSee200AfterDeletePet() { + Long petId = null; + String apiKey = null; + api.deletePet() + .petIdPath(petId).execute(r -> r.prettyPeek()); + // TODO: test validations + } + /** * Invalid pet value */ @@ -155,14 +177,25 @@ public void shouldSee404AfterGetPetById() { } + /** + * successful operation + */ + @Test + public void shouldSee200AfterUpdatePet() { + Pet body = null; + api.updatePet() + .body(body).execute(r -> r.prettyPeek()); + // TODO: test validations + } + /** * Invalid ID supplied */ @Test public void shouldSee400AfterUpdatePet() { - Pet pet = null; + Pet body = null; api.updatePet() - .body(pet).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -171,9 +204,9 @@ public void shouldSee400AfterUpdatePet() { */ @Test public void shouldSee404AfterUpdatePet() { - Pet pet = null; + Pet body = null; api.updatePet() - .body(pet).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -182,9 +215,9 @@ public void shouldSee404AfterUpdatePet() { */ @Test public void shouldSee405AfterUpdatePet() { - Pet pet = null; + Pet body = null; api.updatePet() - .body(pet).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -216,4 +249,19 @@ public void shouldSee200AfterUploadFile() { // TODO: test validations } + + /** + * successful operation + */ + @Test + public void shouldSee200AfterUploadFileWithRequiredFile() { + Long petId = null; + File requiredFile = null; + String additionalMetadata = null; + api.uploadFileWithRequiredFile() + .petIdPath(petId) + .requiredFileMultiPart(requiredFile).execute(r -> r.prettyPeek()); + // TODO: test validations + } + } \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/StoreApiTest.java index 3b3231c9f406..b4ca1cc5d743 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,8 @@ public class StoreApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).store(); } @@ -118,9 +119,9 @@ public void shouldSee404AfterGetOrderById() { */ @Test public void shouldSee200AfterPlaceOrder() { - Order order = null; + Order body = null; api.placeOrder() - .body(order).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -129,9 +130,9 @@ public void shouldSee200AfterPlaceOrder() { */ @Test public void shouldSee400AfterPlaceOrder() { - Order order = null; + Order body = null; api.placeOrder() - .body(order).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/UserApiTest.java index 3078f45b6bfa..b64674d7bf4d 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,8 @@ public class UserApiTest { @Before public void createApi() { api = ApiClient.api(ApiClient.Config.apiConfig().reqSpecSupplier( - () -> new RequestSpecBuilder().setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) + () -> new RequestSpecBuilder() + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))) .addFilter(new ErrorLoggingFilter()) .setBaseUri("http://petstore.swagger.io:80/v2"))).user(); } @@ -51,9 +52,9 @@ public void createApi() { */ @Test public void shouldSee0AfterCreateUser() { - User user = null; + User body = null; api.createUser() - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -63,9 +64,9 @@ public void shouldSee0AfterCreateUser() { */ @Test public void shouldSee0AfterCreateUsersWithArrayInput() { - List user = null; + List body = null; api.createUsersWithArrayInput() - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -75,9 +76,9 @@ public void shouldSee0AfterCreateUsersWithArrayInput() { */ @Test public void shouldSee0AfterCreateUsersWithListInput() { - List user = null; + List body = null; api.createUsersWithListInput() - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -182,10 +183,10 @@ public void shouldSee0AfterLogoutUser() { @Test public void shouldSee400AfterUpdateUser() { String username = null; - User user = null; + User body = null; api.updateUser() .usernamePath(username) - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } @@ -195,10 +196,10 @@ public void shouldSee400AfterUpdateUser() { @Test public void shouldSee404AfterUpdateUser() { String username = null; - User user = null; + User body = null; api.updateUser() .usernamePath(username) - .body(user).execute(r -> r.prettyPeek()); + .body(body).execute(r -> r.prettyPeek()); // TODO: test validations } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 656f05771615..5507437bbe46 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index 4c5bdc4ffad6..d770842e2c32 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index de976999c633..17ad4aa94d87 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 3c18ad38c7e3..19f1a8fe7aab 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -44,19 +45,91 @@ public void testAdditionalPropertiesClass() { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + public void mapNumberTest() { + // TODO: test mapNumber + } + + /** + * Test the property 'mapInteger' + */ + @Test + public void mapIntegerTest() { + // TODO: test mapInteger + } + + /** + * Test the property 'mapBoolean' + */ + @Test + public void mapBooleanTest() { + // TODO: test mapBoolean + } + + /** + * Test the property 'mapArrayInteger' + */ + @Test + public void mapArrayIntegerTest() { + // TODO: test mapArrayInteger + } + + /** + * Test the property 'mapArrayAnytype' + */ + @Test + public void mapArrayAnytypeTest() { + // TODO: test mapArrayAnytype + } + + /** + * Test the property 'mapMapString' + */ + @Test + public void mapMapStringTest() { + // TODO: test mapMapString + } + + /** + * Test the property 'mapMapAnytype' + */ + @Test + public void mapMapAnytypeTest() { + // TODO: test mapMapAnytype + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'anytype2' + */ + @Test + public void anytype2Test() { + // TODO: test anytype2 + } + + /** + * Test the property 'anytype3' + */ + @Test + public void anytype3Test() { + // TODO: test anytype3 } } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 712e0c131b12..e6efde8fed97 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index a2039fa83a55..01433159e0f0 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3c9fe9323b85..a307b7604d81 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 3a3942ab84d6..6a66b95c7b46 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AnimalTest.java index 30ed464f5e1d..11a93cce1427 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 709475260505..d0e66d293541 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 2f88d6ad4b9b..9afc3397f46c 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 3182aa654811..fab9a30565f3 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CapitalizationTest.java index 1d029ba7c504..ced4f48eb5f9 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatTest.java index 718bb5b6baf6..b2b3e7e048d9 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CategoryTest.java index 79374c54e6f3..a6efa6e1fbc6 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClassModelTest.java index 4c66db89c4f6..1233feec65ec 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClientTest.java index 1a9f6d6fc9e7..456fab74c4d7 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogTest.java index 8392c1745647..124bc99c1f12 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumArraysTest.java index a116bb028fc8..c25b05e9f0d1 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumClassTest.java index 97855ba723a1..329454658e33 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumTestTest.java index d43e3cace6da..8b76ef556061 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a960673c6169..0ca366212088 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FormatTestTest.java index 4d5b377c0b4f..32dbe0df5c15 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -149,4 +149,12 @@ public void passwordTest() { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index d854c0c9daf2..0272d7b80004 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MapTestTest.java index 9f78d486659f..f86a1303fc88 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 93829ac8d536..808773a5d852 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index dcea58773348..d81fa5a0f669 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 46b8648fdccf..91bd8fada260 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelReturnTest.java index 4135ead56864..f317fef485ea 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NameTest.java index bdc04b000c18..1ed41a0f80c7 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 214a6d4538dc..15b74f7ef8bf 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OrderTest.java index 808e365efb56..b5cc55e4f581 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 710bfedd5805..67ee59963636 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 064f84b3ff60..220d40e83cbb 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/PetTest.java index 4e8e4c65827e..be7f974ab82e 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index c89b608f6096..2dc9cb2ae2cd 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d058c884e493..bcf23eb3cbc8 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TagTest.java index 27acc7ce8e77..83f536d2fa39 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index f120407395a8..ca08c6362ce1 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index 5e99dff0caef..763bccefe43d 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -59,6 +59,14 @@ public void numberItemTest() { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/UserTest.java index da1c9bda4b5d..b3a76f61da53 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/XmlItemTest.java index 5e861e186210..f9790cd7c6bd 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,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 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -228,51 +228,51 @@ public void namespaceWrappedArrayTest() { } /** - * Test the property 'prefixNamespaceString' + * Test the property 'prefixNsString' */ @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString + public void prefixNsStringTest() { + // TODO: test prefixNsString } /** - * Test the property 'prefixNamespaceNumber' + * Test the property 'prefixNsNumber' */ @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber } /** - * Test the property 'prefixNamespaceInteger' + * Test the property 'prefixNsInteger' */ @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger } /** - * Test the property 'prefixNamespaceBoolean' + * Test the property 'prefixNsBoolean' */ @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean } /** - * Test the property 'prefixNamespaceArray' + * Test the property 'prefixNsArray' */ @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray + public void prefixNsArrayTest() { + // TODO: test prefixNsArray } /** - * Test the property 'prefixNamespaceWrappedArray' + * Test the property 'prefixNsWrappedArray' */ @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray } }