[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)

* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
This commit is contained in:
DielN 2024-12-03 05:02:54 +01:00 committed by GitHub
parent 06f0b68eee
commit b9f6fe6b1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
572 changed files with 38137 additions and 525 deletions

View File

@ -1,7 +1,7 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
serializationLibrary: jackson

View File

@ -1,7 +1,7 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: microprofile-rest-client-3

View File

@ -1,7 +1,7 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: microprofile-rest-client

View File

@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -72,7 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -53,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|

View File

@ -53,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.server.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|performBeanValidation|Perform BeanValidation| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -66,7 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -69,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |apimodels|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |null|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.server.api.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |null|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -69,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -62,7 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|loadTestDataFromFile|Load test data from a generated JSON file| |false|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -60,7 +60,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -65,7 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

View File

@ -326,7 +326,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations)"));
cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
cliOptions.add(CliOption.newString(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, "Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable));
cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.", this.openApiNullable));
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders));
cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true"));
cliOptions.add(CliOption.newBoolean(CAMEL_CASE_DOLLAR_SIGN, "Fix camelCase when starting with $ sign. when true : $Value when false : $value"));

View File

@ -628,6 +628,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
forceSerializationLibrary(SERIALIZATION_LIBRARY_JSONB);
}
// currently not supported for Microprofile (neither for Jackson nor JSON-B)
openApiNullable = false;
additionalProperties.put(OPENAPI_NULLABLE, false);
if (microprofileFramework.equals(MICROPROFILE_KUMULUZEE)) {
supportingFiles.add(new SupportingFile("kumuluzee.pom.mustache", "", "pom.xml"));
supportingFiles.add(new SupportingFile("kumuluzee.config.yaml.mustache", "src/main/resources", "config.yaml"));
@ -636,6 +640,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
if ("3.0".equals(microprofileRestClientVersion)) {
additionalProperties.put("microprofile3", true);
if (getSerializationLibrary().equals(SERIALIZATION_LIBRARY_JSONB)) {
additionalProperties.put("jsonbPolymorphism", true);
}
}
} else if (APACHE.equals(getLibrary())) {
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);

View File

@ -37,9 +37,12 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext;
import {{rootJavaEEPackage}}.json.stream.JsonGenerator;
import {{rootJavaEEPackage}}.json.stream.JsonParser;
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty;
{{#vendorExtensions.x-has-readonly-properties}}
{{#jsonbPolymorphism}}
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype;
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient;
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo;
{{/jsonbPolymorphism}}
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jsonb}}
{{#useBeanValidation}}
import {{rootJavaEEPackage}}.validation.constraints.*;

View File

@ -22,7 +22,7 @@
* {{{.}}}
*/
{{/description}}
{{>additionalModelTypeAnnotations}}
{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
*/
{{/description}}
{{^withXml}}
{{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}}
{{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}}
{{/withXml}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}

View File

@ -234,7 +234,7 @@
{{/jackson}}
<jakarta.activation.version>2.1.0</jakarta.activation.version>
<jakarta.annotation.version>2.0.0</jakarta.annotation.version>
<jakarta.json.bind.version>2.0.0</jakarta.json.bind.version>
<jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
<jakarta.json.version>2.0.1</jakarta.json.version>
<jakarta.ws.rs.version>3.0.0</jakarta.ws.rs.version>
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>

View File

@ -15,3 +15,9 @@
{{/-last}}
{{/discriminator.mappedModels}}
{{/jackson}}
{{#jsonbPolymorphism}}
@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = {
{{/-first}}
@JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class),
{{#-last}}
}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}}

View File

@ -163,7 +163,7 @@
<jackson.version>2.17.1</jackson.version>
<jakarta.activation.version>2.1.0</jakarta.activation.version>
<jakarta.annotation.version>2.0.0</jakarta.annotation.version>
<jakarta.json.bind.version>2.0.0</jakarta.json.bind.version>
<jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
<jakarta.json.version>2.0.1</jakarta.json.version>
<jakarta.ws.rs.version>3.0.0</jakarta.ws.rs.version>
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>

View File

@ -1,23 +1,119 @@
README.md
docs/AdditionalPropertiesClass.md
docs/AllOfWithSingleRef.md
docs/Animal.md
docs/AnotherFakeApi.md
docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md
docs/ArrayTest.md
docs/Capitalization.md
docs/Cat.md
docs/Category.md
docs/ChildWithNullable.md
docs/ClassModel.md
docs/Client.md
docs/DefaultApi.md
docs/DeprecatedObject.md
docs/Dog.md
docs/EnumArrays.md
docs/EnumClass.md
docs/EnumTest.md
docs/FakeApi.md
docs/FakeBigDecimalMap200Response.md
docs/FakeClassnameTags123Api.md
docs/FileSchemaTestClass.md
docs/Foo.md
docs/FooGetDefaultResponse.md
docs/FormatTest.md
docs/HasOnlyReadOnly.md
docs/HealthCheckResult.md
docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelApiResponse.md
docs/ModelFile.md
docs/ModelList.md
docs/ModelReturn.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/ObjectWithDeprecatedFields.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md
docs/OuterObjectWithEnumProperty.md
docs/ParentWithNullable.md
docs/Pet.md
docs/PetApi.md
docs/ReadOnlyFirst.md
docs/SingleRefType.md
docs/SpecialModelName.md
docs/StoreApi.md
docs/Tag.md
docs/TestInlineFreeformAdditionalPropertiesRequest.md
docs/User.md
docs/UserApi.md
pom.xml
src/main/java/org/openapitools/client/RFC3339DateFormat.java
src/main/java/org/openapitools/client/api/AnotherFakeApi.java
src/main/java/org/openapitools/client/api/ApiException.java
src/main/java/org/openapitools/client/api/ApiExceptionMapper.java
src/main/java/org/openapitools/client/api/DefaultApi.java
src/main/java/org/openapitools/client/api/FakeApi.java
src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
src/main/java/org/openapitools/client/api/PetApi.java
src/main/java/org/openapitools/client/api/StoreApi.java
src/main/java/org/openapitools/client/api/UserApi.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java
src/main/java/org/openapitools/client/model/Animal.java
src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayTest.java
src/main/java/org/openapitools/client/model/Capitalization.java
src/main/java/org/openapitools/client/model/Cat.java
src/main/java/org/openapitools/client/model/Category.java
src/main/java/org/openapitools/client/model/ChildWithNullable.java
src/main/java/org/openapitools/client/model/ClassModel.java
src/main/java/org/openapitools/client/model/Client.java
src/main/java/org/openapitools/client/model/DeprecatedObject.java
src/main/java/org/openapitools/client/model/Dog.java
src/main/java/org/openapitools/client/model/EnumArrays.java
src/main/java/org/openapitools/client/model/EnumClass.java
src/main/java/org/openapitools/client/model/EnumTest.java
src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
src/main/java/org/openapitools/client/model/Foo.java
src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java
src/main/java/org/openapitools/client/model/FormatTest.java
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
src/main/java/org/openapitools/client/model/HealthCheckResult.java
src/main/java/org/openapitools/client/model/MapTest.java
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/Model200Response.java
src/main/java/org/openapitools/client/model/ModelApiResponse.java
src/main/java/org/openapitools/client/model/ModelFile.java
src/main/java/org/openapitools/client/model/ModelList.java
src/main/java/org/openapitools/client/model/ModelReturn.java
src/main/java/org/openapitools/client/model/Name.java
src/main/java/org/openapitools/client/model/NullableClass.java
src/main/java/org/openapitools/client/model/NumberOnly.java
src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java
src/main/java/org/openapitools/client/model/Order.java
src/main/java/org/openapitools/client/model/OuterComposite.java
src/main/java/org/openapitools/client/model/OuterEnum.java
src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java
src/main/java/org/openapitools/client/model/OuterEnumInteger.java
src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java
src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java
src/main/java/org/openapitools/client/model/ParentWithNullable.java
src/main/java/org/openapitools/client/model/Pet.java
src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
src/main/java/org/openapitools/client/model/SingleRefType.java
src/main/java/org/openapitools/client/model/SpecialModelName.java
src/main/java/org/openapitools/client/model/Tag.java
src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java
src/main/java/org/openapitools/client/model/User.java

View File

@ -1,6 +1,6 @@
# OpenAPI Petstore - MicroProfile Rest Client & MicroProfile Server
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.

View File

@ -0,0 +1,14 @@
# AdditionalPropertiesClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**mapProperty** | **Map&lt;String, String&gt;** | | [optional] |
|**mapOfMapProperty** | **Map&lt;String, Map&lt;String, String&gt;&gt;** | | [optional] |

View File

@ -0,0 +1,14 @@
# AllOfWithSingleRef
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**username** | **String** | | [optional] |
|**singleRefType** | **SingleRefType** | | [optional] |

View File

@ -0,0 +1,14 @@
# Animal
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**className** | **String** | | |
|**color** | **String** | | [optional] |

View File

@ -0,0 +1,75 @@
# 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(client)
To test special tags
To test special tags and operation ID starting with number
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.AnotherFakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **client** | [**Client**](Client.md)| client model | |
### Return type
[**Client**](Client.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

@ -0,0 +1,13 @@
# ArrayOfArrayOfNumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayArrayNumber** | **List&lt;List&lt;BigDecimal&gt;&gt;** | | [optional] |

View File

@ -0,0 +1,13 @@
# ArrayOfNumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayNumber** | **List&lt;BigDecimal&gt;** | | [optional] |

View File

@ -0,0 +1,15 @@
# ArrayTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayOfString** | **List&lt;String&gt;** | | [optional] |
|**arrayArrayOfInteger** | **List&lt;List&lt;Long&gt;&gt;** | | [optional] |
|**arrayArrayOfModel** | **List&lt;List&lt;ReadOnlyFirst&gt;&gt;** | | [optional] |

View File

@ -0,0 +1,18 @@
# 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] |

View File

@ -0,0 +1,13 @@
# Cat
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**declawed** | **Boolean** | | [optional] |

View File

@ -2,14 +2,13 @@
# Category
A category for a pet
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**name** | **String** | | [optional] |
|**name** | **String** | | |

View File

@ -0,0 +1,13 @@
# ChildWithNullable
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**otherProperty** | **String** | | [optional] |

View File

@ -0,0 +1,14 @@
# ClassModel
Model for testing model with \"_class\" property
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**propertyClass** | **String** | | [optional] |

View File

@ -0,0 +1,13 @@
# Client
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**client** | **String** | | [optional] |

View File

@ -0,0 +1,69 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
## fooGet
> FooGetDefaultResponse fooGet()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
FooGetDefaultResponse result = apiInstance.fooGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | response | - |

View File

@ -0,0 +1,13 @@
# DeprecatedObject
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**name** | **String** | | [optional] |

View File

@ -0,0 +1,13 @@
# Dog
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**breed** | **String** | | [optional] |

View File

@ -0,0 +1,32 @@
# EnumArrays
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] |
|**arrayEnum** | [**List&lt;ArrayEnumEnum&gt;**](#List&lt;ArrayEnumEnum&gt;) | | [optional] |
## Enum: JustSymbolEnum
| Name | Value |
|---- | -----|
| GREATER_THAN_OR_EQUAL_TO | &quot;&gt;&#x3D;&quot; |
| DOLLAR | &quot;$&quot; |
## Enum: List&lt;ArrayEnumEnum&gt;
| Name | Value |
|---- | -----|
| FISH | &quot;fish&quot; |
| CRAB | &quot;crab&quot; |

View File

@ -0,0 +1,15 @@
# EnumClass
## Enum
* `_ABC` (value: `"_abc"`)
* `_EFG` (value: `"-efg"`)
* `_XYZ_` (value: `"(xyz)"`)

View File

@ -0,0 +1,58 @@
# EnumTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] |
|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | |
|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] |
|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] |
|**outerEnum** | **OuterEnum** | | [optional] |
|**outerEnumInteger** | **OuterEnumInteger** | | [optional] |
|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] |
|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] |
## Enum: EnumStringEnum
| Name | Value |
|---- | -----|
| UPPER | &quot;UPPER&quot; |
| LOWER | &quot;lower&quot; |
| EMPTY | &quot;&quot; |
## Enum: EnumStringRequiredEnum
| Name | Value |
|---- | -----|
| UPPER | &quot;UPPER&quot; |
| LOWER | &quot;lower&quot; |
| EMPTY | &quot;&quot; |
## 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 |

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
# FakeBigDecimalMap200Response
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**someId** | **BigDecimal** | | [optional] |
|**someMap** | **Map&lt;String, BigDecimal&gt;** | | [optional] |

View File

@ -0,0 +1,82 @@
# 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(client)
To test class name in snake case
To test class name in snake case
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeClassnameTags123Api;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key_query
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
api_key_query.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **client** | [**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
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

@ -0,0 +1,14 @@
# FileSchemaTestClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**_file** | [**ModelFile**](ModelFile.md) | | [optional] |
|**files** | [**List&lt;ModelFile&gt;**](ModelFile.md) | | [optional] |

View File

@ -0,0 +1,13 @@
# Foo
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bar** | **String** | | [optional] |

View File

@ -0,0 +1,13 @@
# FooGetDefaultResponse
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**string** | [**Foo**](Foo.md) | | [optional] |

View File

@ -0,0 +1,28 @@
# FormatTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**integer** | **Integer** | | [optional] |
|**int32** | **Integer** | | [optional] |
|**int64** | **Long** | | [optional] |
|**number** | **BigDecimal** | | |
|**_float** | **Float** | | [optional] |
|**_double** | **Double** | | [optional] |
|**decimal** | **BigDecimal** | | [optional] |
|**string** | **String** | | [optional] |
|**_byte** | **byte[]** | | |
|**binary** | **File** | | [optional] |
|**date** | **Date** | | |
|**dateTime** | **Date** | | [optional] |
|**uuid** | **UUID** | | [optional] |
|**password** | **String** | | |
|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] |
|**patternWithDigitsAndDelimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional] |

View File

@ -0,0 +1,14 @@
# HasOnlyReadOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bar** | **String** | | [optional] [readonly] |
|**foo** | **String** | | [optional] [readonly] |

View File

@ -0,0 +1,14 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**nullableMessage** | **String** | | [optional] |

View File

@ -0,0 +1,25 @@
# MapTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**mapMapOfString** | **Map&lt;String, Map&lt;String, String&gt;&gt;** | | [optional] |
|**mapOfEnumString** | [**Map&lt;String, InnerEnum&gt;**](#Map&lt;String, InnerEnum&gt;) | | [optional] |
|**directMap** | **Map&lt;String, Boolean&gt;** | | [optional] |
|**indirectMap** | **Map&lt;String, Boolean&gt;** | | [optional] |
## Enum: Map&lt;String, InnerEnum&gt;
| Name | Value |
|---- | -----|
| UPPER | &quot;UPPER&quot; |
| LOWER | &quot;lower&quot; |

View File

@ -0,0 +1,15 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**uuid** | **UUID** | | [optional] |
|**dateTime** | **Date** | | [optional] |
|**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional] |

View File

@ -0,0 +1,15 @@
# Model200Response
Model for testing model name starting with number
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**name** | **Integer** | | [optional] |
|**propertyClass** | **String** | | [optional] |

View File

@ -2,7 +2,6 @@
# ModelApiResponse
Describes the result of uploading an image resource
## Properties

View File

@ -0,0 +1,14 @@
# ModelFile
Must be named `File` for test.
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**sourceURI** | **String** | Test capitalization | [optional] |

View File

@ -0,0 +1,13 @@
# ModelList
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**_123list** | **String** | | [optional] |

View File

@ -0,0 +1,14 @@
# ModelReturn
Model for testing reserved words
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**_return** | **Integer** | | [optional] |

View File

@ -0,0 +1,17 @@
# 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] |

View File

@ -0,0 +1,24 @@
# NullableClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**integerProp** | **Integer** | | [optional] |
|**numberProp** | **BigDecimal** | | [optional] |
|**booleanProp** | **Boolean** | | [optional] |
|**stringProp** | **String** | | [optional] |
|**dateProp** | **Date** | | [optional] |
|**datetimeProp** | **Date** | | [optional] |
|**arrayNullableProp** | **List&lt;Object&gt;** | | [optional] |
|**arrayAndItemsNullableProp** | **List&lt;Object&gt;** | | [optional] |
|**arrayItemsNullable** | **List&lt;Object&gt;** | | [optional] |
|**objectNullableProp** | **Map&lt;String, Object&gt;** | | [optional] |
|**objectAndItemsNullableProp** | **Map&lt;String, Object&gt;** | | [optional] |
|**objectItemsNullable** | **Map&lt;String, Object&gt;** | | [optional] |

View File

@ -0,0 +1,13 @@
# NumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**justNumber** | **BigDecimal** | | [optional] |

View File

@ -0,0 +1,16 @@
# ObjectWithDeprecatedFields
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**uuid** | **String** | | [optional] |
|**id** | **BigDecimal** | | [optional] |
|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] |
|**bars** | **List&lt;String&gt;** | | [optional] |

View File

@ -2,7 +2,6 @@
# Order
An order for a pets from the pet store
## Properties

View File

@ -0,0 +1,15 @@
# OuterComposite
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**myNumber** | **BigDecimal** | | [optional] |
|**myString** | **String** | | [optional] |
|**myBoolean** | **Boolean** | | [optional] |

View File

@ -0,0 +1,15 @@
# OuterEnum
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@ -0,0 +1,15 @@
# OuterEnumDefaultValue
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@ -0,0 +1,15 @@
# OuterEnumInteger
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@ -0,0 +1,15 @@
# OuterEnumIntegerDefaultValue
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@ -0,0 +1,13 @@
# OuterObjectWithEnumProperty
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**value** | **OuterEnumInteger** | | |

View File

@ -0,0 +1,22 @@
# ParentWithNullable
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**type** | [**TypeEnum**](#TypeEnum) | | [optional] |
|**nullableProperty** | **String** | | [optional] |
## Enum: TypeEnum
| Name | Value |
|---- | -----|
| CHILD_WITH_NULLABLE | &quot;ChildWithNullable&quot; |

View File

@ -2,7 +2,6 @@
# Pet
A pet for sale in the pet store
## Properties
@ -11,7 +10,7 @@ A pet for sale in the pet store
|**id** | **Long** | | [optional] |
|**category** | [**Category**](Category.md) | | [optional] |
|**name** | **String** | | |
|**photoUrls** | **List&lt;String&gt;** | | |
|**photoUrls** | **Set&lt;String&gt;** | | |
|**tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] |

View File

@ -1,6 +1,6 @@
# PetApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
@ -12,12 +12,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
| [**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
> Pet addPet(pet)
> void addPet(pet)
Add a new pet to the store
@ -37,7 +38,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -46,7 +47,7 @@ public class Example {
PetApi apiInstance = new PetApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
Pet result = apiInstance.addPet(pet);
void result = apiInstance.addPet(pet);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
@ -68,7 +69,7 @@ public class Example {
### Return type
[**Pet**](Pet.md)
[**void**](Void.md)
### Authorization
@ -77,13 +78,13 @@ public class Example {
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@ -109,7 +110,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -157,6 +158,7 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@ -182,7 +184,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -234,7 +236,7 @@ public class Example {
## findPetsByTags
> List&lt;Pet&gt; findPetsByTags(tags)
> Set&lt;Pet&gt; findPetsByTags(tags)
Finds Pets by tags
@ -254,16 +256,16 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
List<String> tags = Arrays.asList(); // List<String> | Tags to filter by
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
try {
List<Pet> result = apiInstance.findPetsByTags(tags);
Set<Pet> result = apiInstance.findPetsByTags(tags);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#findPetsByTags");
@ -281,11 +283,11 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | |
| **tags** | [**Set&lt;String&gt;**](String.md)| Tags to filter by | |
### Return type
[**List&lt;Pet&gt;**](Pet.md)
[**Set&lt;Pet&gt;**](Pet.md)
### Authorization
@ -326,7 +328,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
@ -381,7 +383,7 @@ public class Example {
## updatePet
> Pet updatePet(pet)
> void updatePet(pet)
Update an existing pet
@ -401,7 +403,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -410,7 +412,7 @@ public class Example {
PetApi apiInstance = new PetApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
Pet result = apiInstance.updatePet(pet);
void result = apiInstance.updatePet(pet);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
@ -432,7 +434,7 @@ public class Example {
### Return type
[**Pet**](Pet.md)
[**void**](Void.md)
### Authorization
@ -441,13 +443,13 @@ public class Example {
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |
@ -475,7 +477,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -525,6 +527,7 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@ -550,7 +553,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@ -602,3 +605,78 @@ public class Example {
|-------------|-------------|------------------|
| **200** | successful operation | - |
## uploadFileWithRequiredFile
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
uploads an image (required)
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Long petId = 56L; // Long | ID of pet to update
File requiredFile = new File("/path/to/file"); // File | file to upload
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
try {
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### 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
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

@ -0,0 +1,14 @@
# ReadOnlyFirst
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bar** | **String** | | [optional] [readonly] |
|**baz** | **String** | | [optional] |

View File

@ -0,0 +1,13 @@
# SingleRefType
## Enum
* `ADMIN` (value: `"admin"`)
* `USER` (value: `"user"`)

View File

@ -0,0 +1,13 @@
# SpecialModelName
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**$specialPropertyName** | **Long** | | [optional] |

View File

@ -1,12 +1,12 @@
# StoreApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| [**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/{orderId} | Find purchase order by ID |
| [**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 |
@ -32,7 +32,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
@ -100,7 +100,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
@ -168,7 +168,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Long orderId = 56L; // Long | ID of pet that needs to be fetched
@ -236,7 +236,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order order = new Order(); // Order | order placed for purchasing the pet

View File

@ -2,7 +2,6 @@
# Tag
A tag for a pet
## Properties

View File

@ -0,0 +1,13 @@
# TestInlineFreeformAdditionalPropertiesRequest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**someProperty** | **String** | | [optional] |

View File

@ -2,7 +2,6 @@
# User
A User who is purchasing from the pet store
## Properties

View File

@ -1,6 +1,6 @@
# UserApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
@ -30,20 +30,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User user = new User(); // User | Created user object
@ -74,7 +67,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@ -103,20 +96,13 @@ Creates list of users with given input array
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> user = Arrays.asList(); // List<User> | List of user object
@ -147,7 +133,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@ -176,20 +162,13 @@ Creates list of users with given input array
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> user = Arrays.asList(); // List<User> | List of user object
@ -220,7 +199,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@ -249,20 +228,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The name that needs to be deleted
@ -293,7 +265,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@ -329,7 +301,7 @@ import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
@ -397,7 +369,7 @@ import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The user name for login
@ -441,7 +413,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the &#x60;api_key&#x60; apiKey authentication. <br> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
| **400** | Invalid username/password supplied | - |
@ -460,20 +432,13 @@ Logs out current logged in user session
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
try {
@ -500,7 +465,7 @@ This endpoint does not need any parameter.
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@ -529,20 +494,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
@ -575,7 +533,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers

View File

@ -4,7 +4,7 @@
<artifactId>microprofile-rest-client-3-jackson</artifactId>
<packaging>jar</packaging>
<name>microprofile-rest-client-3-jackson</name>
<description>This is a sample server Petstore server. For this sample, you can use the api key &#x60;special-key&#x60; to test the authorization filters.</description>
<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: \&quot; \\</description>
<version>1.0.0</version>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
@ -158,7 +158,7 @@
<jackson.version>2.17.1</jackson.version>
<jakarta.activation.version>2.1.0</jakarta.activation.version>
<jakarta.annotation.version>2.0.0</jakarta.annotation.version>
<jakarta.json.bind.version>2.0.0</jakarta.json.bind.version>
<jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
<jakarta.json.version>2.0.1</jakarta.json.version>
<jakarta.ws.rs.version>3.0.0</jakarta.ws.rs.version>
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>

View File

@ -1,6 +1,6 @@
/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* 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
*

View File

@ -0,0 +1,54 @@
/**
* OpenAPI Petstore
* 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.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
/**
* OpenAPI Petstore
*
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
*/
@RegisterRestClient(configKey="petstore")
@RegisterProvider(ApiExceptionMapper.class)
@Path("/another-fake/dummy")
public interface AnotherFakeApi {
/**
* To test special tags
*
* To test special tags and operation ID starting with number
*
*/
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
Client call123testSpecialTags(Client client) throws ApiException, ProcessingException;
}

View File

@ -1,6 +1,6 @@
/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* 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
*

View File

@ -1,6 +1,6 @@
/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* 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
*

View File

@ -0,0 +1,47 @@
/**
* OpenAPI Petstore
* 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.FooGetDefaultResponse;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
/**
* OpenAPI Petstore
*
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
*/
@RegisterRestClient(configKey="petstore")
@RegisterProvider(ApiExceptionMapper.class)
@Path("/foo")
public interface DefaultApi {
@GET
@Produces({ "application/json" })
FooGetDefaultResponse fooGet() throws ApiException, ProcessingException;
}

Some files were not shown because too many files have changed in this diff Show More