forked from loafle/openapi-generator-original
Prepare 3.1.0-SNAPSHOT (#408)
This commit is contained in:
commit
9b909df543
@ -9,7 +9,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<url>https://github.com/openapi-tools/openapi-generator</url>
|
<url>https://github.com/openapi-tools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
|
15
README.md
15
README.md
@ -2,16 +2,11 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.0.3`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.1.0`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||||
|
|
||||||
[`3.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/3.1.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
|
||||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
|
||||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
|
||||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
|
||||||
|
|
||||||
[`4.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
[`4.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||||
@ -87,8 +82,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
|||||||
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
||||||
---------------------------- | ------------ | -------------------------- | -----
|
---------------------------- | ------------ | -------------------------- | -----
|
||||||
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
||||||
3.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
3.1.0 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
||||||
3.0.3 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.3/)| TBD | 1.0, 1.1, 1.2,
|
[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0) | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
|
[3.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0) | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
|
||||||
@ -147,12 +142,12 @@ JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generato
|
|||||||
|
|
||||||
For **Mac/Linux** users:
|
For **Mac/Linux** users:
|
||||||
```sh
|
```sh
|
||||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.2/openapi-generator-cli-3.0.2.jar -O openapi-generator-cli.jar
|
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.3/openapi-generator-cli-3.0.3.jar -O openapi-generator-cli.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||||
```
|
```
|
||||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.2/openapi-generator-cli-3.0.2.jar
|
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.3/openapi-generator-cli-3.0.3.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -34,7 +34,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.2"
|
classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
openApiGeneratorVersion=3.0.3
|
openApiGeneratorVersion=3.1.0-SNAPSHOT
|
||||||
|
|
||||||
# BEGIN placeholders
|
# BEGIN placeholders
|
||||||
# these are just placeholders to allow contributors to build directly
|
# these are just placeholders to allow contributors to build directly
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -16,5 +16,5 @@ gradle buildGoSdk
|
|||||||
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gradle -PopenApiGeneratorVersion=3.0.2 openApiValidate
|
gradle -PopenApiGeneratorVersion=3.0.3 openApiValidate
|
||||||
```
|
```
|
||||||
|
@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.0.3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
|
@ -2,7 +2,7 @@ FROM openjdk:8-jre-alpine
|
|||||||
|
|
||||||
WORKDIR /generator
|
WORKDIR /generator
|
||||||
|
|
||||||
COPY target/openapi-generator-online-3.0.3.jar /generator/openapi-generator-online.jar
|
COPY target/openapi-generator-online-3.1.0-SNAPSHOT.jar /generator/openapi-generator-online.jar
|
||||||
|
|
||||||
ENV GENERATOR_HOST=http://localhost
|
ENV GENERATOR_HOST=http://localhost
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>openapi-generator-online</artifactId>
|
<artifactId>openapi-generator-online</artifactId>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -44,6 +44,7 @@ public class CodegenModel {
|
|||||||
public String defaultValue;
|
public String defaultValue;
|
||||||
public String arrayModelType;
|
public String arrayModelType;
|
||||||
public boolean isAlias; // Is this effectively an alias of another simple type
|
public boolean isAlias; // Is this effectively an alias of another simple type
|
||||||
|
public boolean isString, isInteger;
|
||||||
public List<CodegenProperty> vars = new ArrayList<CodegenProperty>();
|
public List<CodegenProperty> vars = new ArrayList<CodegenProperty>();
|
||||||
public List<CodegenProperty> requiredVars = new ArrayList<CodegenProperty>(); // a list of required properties
|
public List<CodegenProperty> requiredVars = new ArrayList<CodegenProperty>(); // a list of required properties
|
||||||
public List<CodegenProperty> optionalVars = new ArrayList<CodegenProperty>(); // a list of optional properties
|
public List<CodegenProperty> optionalVars = new ArrayList<CodegenProperty>(); // a list of optional properties
|
||||||
|
@ -250,11 +250,11 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) {
|
if (Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null) {
|
||||||
Map<String, Object> allowableValues = cm.allowableValues;
|
Map<String, Object> allowableValues = cm.allowableValues;
|
||||||
List<Object> values = (List<Object>) allowableValues.get("values");
|
List<Object> values = (List<Object>) allowableValues.get("values");
|
||||||
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
List<Map<String, Object>> enumVars = new ArrayList<Map<String, Object>>();
|
||||||
String commonPrefix = findCommonPrefixOfVars(values);
|
String commonPrefix = findCommonPrefixOfVars(values);
|
||||||
int truncateIdx = commonPrefix.length();
|
int truncateIdx = commonPrefix.length();
|
||||||
for (Object value : values) {
|
for (Object value : values) {
|
||||||
Map<String, String> enumVar = new HashMap<String, String>();
|
Map<String, Object> enumVar = new HashMap<String, Object>();
|
||||||
String enumName;
|
String enumName;
|
||||||
if (truncateIdx == 0) {
|
if (truncateIdx == 0) {
|
||||||
enumName = value.toString();
|
enumName = value.toString();
|
||||||
@ -266,6 +266,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
enumVar.put("name", toEnumVarName(enumName, cm.dataType));
|
enumVar.put("name", toEnumVarName(enumName, cm.dataType));
|
||||||
enumVar.put("value", toEnumValue(value.toString(), cm.dataType));
|
enumVar.put("value", toEnumValue(value.toString(), cm.dataType));
|
||||||
|
enumVar.put("isString", isDataTypeString(cm.dataType));
|
||||||
enumVars.add(enumVar);
|
enumVars.add(enumVar);
|
||||||
}
|
}
|
||||||
cm.allowableValues.put("enumVars", enumVars);
|
cm.allowableValues.put("enumVars", enumVars);
|
||||||
@ -1167,7 +1168,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// TODO better logic to handle compose schema
|
// TODO better logic to handle compose schema
|
||||||
if (schema instanceof ComposedSchema) { // composed schema
|
if (schema instanceof ComposedSchema) { // composed schema
|
||||||
ComposedSchema cs = (ComposedSchema) schema;
|
ComposedSchema cs = (ComposedSchema) schema;
|
||||||
if(cs.getAllOf() != null) {
|
if (cs.getAllOf() != null) {
|
||||||
for (Schema s : cs.getAllOf()) {
|
for (Schema s : cs.getAllOf()) {
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
// using the first schema defined in allOf
|
// using the first schema defined in allOf
|
||||||
@ -1383,6 +1384,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
typeAliases = getAllAliases(allDefinitions);
|
typeAliases = getAllAliases(allDefinitions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unalias schema
|
||||||
|
schema = ModelUtils.unaliasSchema(allDefinitions, schema);
|
||||||
|
|
||||||
CodegenModel m = CodegenModelFactory.newInstance(CodegenModelType.MODEL);
|
CodegenModel m = CodegenModelFactory.newInstance(CodegenModelType.MODEL);
|
||||||
|
|
||||||
if (reservedWords.contains(name)) {
|
if (reservedWords.contains(name)) {
|
||||||
@ -1508,9 +1512,8 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
addProperties(allProperties, allRequired, child, allDefinitions);
|
addProperties(allProperties, allRequired, child, allDefinitions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addVars(m, properties, required, allProperties, allRequired);
|
addVars(m, unaliasPropertySchema(allDefinitions, properties), required, allProperties, allRequired);
|
||||||
// TODO
|
|
||||||
//} else if (schema instanceof RefModel) {
|
|
||||||
} else {
|
} else {
|
||||||
m.dataType = getSchemaType(schema);
|
m.dataType = getSchemaType(schema);
|
||||||
if (schema.getEnum() != null && !schema.getEnum().isEmpty()) {
|
if (schema.getEnum() != null && !schema.getEnum().isEmpty()) {
|
||||||
@ -1523,7 +1526,16 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
addAdditionPropertiesToCodeGenModel(m, schema);
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
m.isMapModel = true;
|
m.isMapModel = true;
|
||||||
}
|
}
|
||||||
addVars(m, schema.getProperties(), schema.getRequired());
|
if (ModelUtils.isIntegerSchema(schema)) { // integer type
|
||||||
|
if (!ModelUtils.isLongSchema(schema)) { // long type is not integer
|
||||||
|
m.isInteger = Boolean.TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ModelUtils.isStringSchema(schema)){
|
||||||
|
m.isString = Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
addVars(m, unaliasPropertySchema(allDefinitions, schema.getProperties()), schema.getRequired());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.vars != null) {
|
if (m.vars != null) {
|
||||||
@ -1592,7 +1604,6 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
LOGGER.debug("debugging fromProperty for " + name + " : " + p);
|
LOGGER.debug("debugging fromProperty for " + name + " : " + p);
|
||||||
|
|
||||||
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
|
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
|
||||||
property.name = toVarName(name);
|
property.name = toVarName(name);
|
||||||
property.baseName = name;
|
property.baseName = name;
|
||||||
@ -1833,7 +1844,6 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// property.baseType = getSimpleRef(p.get$ref());
|
// property.baseType = getSimpleRef(p.get$ref());
|
||||||
//}
|
//}
|
||||||
// --END of revision
|
// --END of revision
|
||||||
|
|
||||||
setNonArrayMapProperty(property, type);
|
setNonArrayMapProperty(property, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3048,6 +3058,24 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loop through propertiies and unalias the reference if $ref (reference) is defined
|
||||||
|
*
|
||||||
|
* @param allSchemas all schemas defined in the spec
|
||||||
|
* @param properties model properties (schemas)
|
||||||
|
* @return model properties with direct reference to schemas
|
||||||
|
*/
|
||||||
|
private Map<String, Schema> unaliasPropertySchema(Map<String, Schema> allSchemas, Map<String, Schema> properties) {
|
||||||
|
if (properties != null) {
|
||||||
|
for (String key : properties.keySet()) {
|
||||||
|
properties.put(key, ModelUtils.unaliasSchema(allSchemas, properties.get(key)));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
private void addVars(CodegenModel model, Map<String, Schema> properties, List<String> required) {
|
private void addVars(CodegenModel model, Map<String, Schema> properties, List<String> required) {
|
||||||
addVars(model, properties, required, null, null);
|
addVars(model, properties, required, null, null);
|
||||||
}
|
}
|
||||||
@ -3161,9 +3189,11 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
String oasName = entry.getKey();
|
String oasName = entry.getKey();
|
||||||
Schema schema = entry.getValue();
|
Schema schema = entry.getValue();
|
||||||
String schemaType = getPrimitiveType(schema);
|
String schemaType = getPrimitiveType(schema);
|
||||||
if (schemaType != null && !schemaType.equals("object") && !schemaType.equals("array") && schema.getEnum() == null) {
|
if (schemaType != null && !schemaType.equals("object") && !schemaType.equals("array")
|
||||||
|
&& schema.getEnum() == null && !ModelUtils.isMapSchema(schema)) {
|
||||||
aliases.put(oasName, schemaType);
|
aliases.put(oasName, schemaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return aliases;
|
return aliases;
|
||||||
@ -3659,11 +3689,11 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// put "enumVars" map into `allowableValues", including `name` and `value`
|
// put "enumVars" map into `allowableValues", including `name` and `value`
|
||||||
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
List<Map<String, Object>> enumVars = new ArrayList<>();
|
||||||
String commonPrefix = findCommonPrefixOfVars(values);
|
String commonPrefix = findCommonPrefixOfVars(values);
|
||||||
int truncateIdx = commonPrefix.length();
|
int truncateIdx = commonPrefix.length();
|
||||||
for (Object value : values) {
|
for (Object value : values) {
|
||||||
Map<String, String> enumVar = new HashMap<String, String>();
|
Map<String, Object> enumVar = new HashMap<>();
|
||||||
String enumName;
|
String enumName;
|
||||||
if (truncateIdx == 0) {
|
if (truncateIdx == 0) {
|
||||||
enumName = value.toString();
|
enumName = value.toString();
|
||||||
@ -3673,8 +3703,11 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
enumName = value.toString();
|
enumName = value.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enumVar.put("name", toEnumVarName(enumName, var.dataType));
|
|
||||||
enumVar.put("value", toEnumValue(value.toString(), var.dataType));
|
final String dataType = var.mostInnerItems != null ? var.mostInnerItems.dataType : var.dataType;
|
||||||
|
enumVar.put("name", toEnumVarName(enumName, dataType));
|
||||||
|
enumVar.put("value", toEnumValue(value.toString(), dataType));
|
||||||
|
enumVar.put("isString", isDataTypeString(dataType));
|
||||||
enumVars.add(enumVar);
|
enumVars.add(enumVar);
|
||||||
}
|
}
|
||||||
allowableValues.put("enumVars", enumVars);
|
allowableValues.put("enumVars", enumVars);
|
||||||
@ -3682,9 +3715,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// handle default value for enum, e.g. available => StatusEnum.AVAILABLE
|
// handle default value for enum, e.g. available => StatusEnum.AVAILABLE
|
||||||
if (var.defaultValue != null) {
|
if (var.defaultValue != null) {
|
||||||
String enumName = null;
|
String enumName = null;
|
||||||
for (Map<String, String> enumVar : enumVars) {
|
for (Map<String, Object> enumVar : enumVars) {
|
||||||
if (toEnumValue(var.defaultValue, var.dataType).equals(enumVar.get("value"))) {
|
if (toEnumValue(var.defaultValue, var.dataType).equals(enumVar.get("value"))) {
|
||||||
enumName = enumVar.get("name");
|
enumName = (String) enumVar.get("name");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3897,14 +3930,14 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<String> existingMediaTypes = new HashSet<>();
|
Set<String> existingMediaTypes = new HashSet<>();
|
||||||
for (Map<String, String> mediaType: codegenOperation.produces) {
|
for (Map<String, String> mediaType : codegenOperation.produces) {
|
||||||
existingMediaTypes.add(mediaType.get("mediaType"));
|
existingMediaTypes.add(mediaType.get("mediaType"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (String key : produces) {
|
for (String key : produces) {
|
||||||
// escape quotation to avoid code injection, "*/*" is a special case, do nothing
|
// escape quotation to avoid code injection, "*/*" is a special case, do nothing
|
||||||
String encodedKey = "*/*".equals(key)? key : escapeText(escapeQuotationMark(key));
|
String encodedKey = "*/*".equals(key) ? key : escapeText(escapeQuotationMark(key));
|
||||||
//Only unique media types should be added to "produces"
|
//Only unique media types should be added to "produces"
|
||||||
if (!existingMediaTypes.contains(encodedKey)) {
|
if (!existingMediaTypes.contains(encodedKey)) {
|
||||||
Map<String, String> mediaType = new HashMap<String, String>();
|
Map<String, String> mediaType = new HashMap<String, String>();
|
||||||
@ -3926,7 +3959,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
/**
|
/**
|
||||||
* returns the list of MIME types the APIs can produce
|
* returns the list of MIME types the APIs can produce
|
||||||
*
|
*
|
||||||
* @param openAPI current specification instance
|
* @param openAPI current specification instance
|
||||||
* @param operation Operation
|
* @param operation Operation
|
||||||
* @return a set of MIME types
|
* @return a set of MIME types
|
||||||
*/
|
*/
|
||||||
@ -4025,10 +4058,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
codegenParameter.isListContainer = true;
|
codegenParameter.isListContainer = true;
|
||||||
codegenParameter.description = s.getDescription();
|
codegenParameter.description = s.getDescription();
|
||||||
codegenParameter.dataType = getTypeDeclaration(s);
|
codegenParameter.dataType = getTypeDeclaration(s);
|
||||||
if (codegenParameter.baseType != null && codegenParameter.enumName != null){
|
if (codegenParameter.baseType != null && codegenParameter.enumName != null) {
|
||||||
codegenParameter.datatypeWithEnum = codegenParameter.dataType.replace(codegenParameter.baseType, codegenParameter.enumName);
|
codegenParameter.datatypeWithEnum = codegenParameter.dataType.replace(codegenParameter.baseType, codegenParameter.enumName);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
LOGGER.warn("Could not compute datatypeWithEnum from " + codegenParameter.baseType + ", " + codegenParameter.enumName);
|
LOGGER.warn("Could not compute datatypeWithEnum from " + codegenParameter.baseType + ", " + codegenParameter.enumName);
|
||||||
}
|
}
|
||||||
//TODO fix collectformat for form parameters
|
//TODO fix collectformat for form parameters
|
||||||
@ -4339,9 +4371,12 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
public void generateYAMLSpecFile(Map<String, Object> objs) {
|
public void generateYAMLSpecFile(Map<String, Object> objs) {
|
||||||
OpenAPI openAPI = (OpenAPI) objs.get("openAPI");
|
OpenAPI openAPI = (OpenAPI) objs.get("openAPI");
|
||||||
String yaml = SerializerUtils.toYamlString(openAPI);
|
String yaml = SerializerUtils.toYamlString(openAPI);
|
||||||
if(yaml != null) {
|
if (yaml != null) {
|
||||||
objs.put("openapi-yaml", yaml);
|
objs.put("openapi-yaml", yaml);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDataTypeString(String dataType) {
|
||||||
|
return "String".equals(dataType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -557,4 +557,26 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
|||||||
boolean imports = !type.startsWith("kotlin.") && !type.startsWith("java.") && !defaultIncludes.contains(type) && !languageSpecificPrimitives.contains(type);
|
boolean imports = !type.startsWith("kotlin.") && !type.startsWith("java.") && !defaultIncludes.contains(type) && !languageSpecificPrimitives.contains(type);
|
||||||
return imports;
|
return imports;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toEnumValue(String value, String datatype) {
|
||||||
|
if ("kotlin.Int".equals(datatype) || "kotlin.Long".equals(datatype)) {
|
||||||
|
return value;
|
||||||
|
} else if ("kotlin.Double".equals(datatype)) {
|
||||||
|
if (value.contains(".")) {
|
||||||
|
return value;
|
||||||
|
} else {
|
||||||
|
return value + ".0"; // Float and double must have .0
|
||||||
|
}
|
||||||
|
} else if ("kotlin.Float".equals(datatype)) {
|
||||||
|
return value + "f";
|
||||||
|
} else {
|
||||||
|
return "\"" + escapeText(value) + "\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDataTypeString(final String dataType) {
|
||||||
|
return "String".equals(dataType) || "kotlin.String".equals(dataType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,15 +90,16 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of all schemas in the 'components/schemas' section used in the openAPI specification
|
* Return the list of all schemas in the 'components/schemas' section used in the openAPI specification
|
||||||
|
*
|
||||||
* @param openAPI specification
|
* @param openAPI specification
|
||||||
* @return schemas a list of used schemas
|
* @return schemas a list of used schemas
|
||||||
*/
|
*/
|
||||||
public static List<String> getAllUsedSchemas(OpenAPI openAPI) {
|
public static List<String> getAllUsedSchemas(OpenAPI openAPI) {
|
||||||
List<String> allUsedSchemas = new ArrayList<String>();
|
List<String> allUsedSchemas = new ArrayList<String>();
|
||||||
visitOpenAPI(openAPI, (s, t) -> {
|
visitOpenAPI(openAPI, (s, t) -> {
|
||||||
if(s.get$ref() != null) {
|
if (s.get$ref() != null) {
|
||||||
String ref = getSimpleRef(s.get$ref());
|
String ref = getSimpleRef(s.get$ref());
|
||||||
if(!allUsedSchemas.contains(ref)) {
|
if (!allUsedSchemas.contains(ref)) {
|
||||||
allUsedSchemas.add(ref);
|
allUsedSchemas.add(ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,6 +109,7 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of unused schemas in the 'components/schemas' section of an openAPI specification
|
* Return the list of unused schemas in the 'components/schemas' section of an openAPI specification
|
||||||
|
*
|
||||||
* @param openAPI specification
|
* @param openAPI specification
|
||||||
* @return schemas a list of unused schemas
|
* @return schemas a list of unused schemas
|
||||||
*/
|
*/
|
||||||
@ -118,7 +120,7 @@ public class ModelUtils {
|
|||||||
unusedSchemas.addAll(schemas.keySet());
|
unusedSchemas.addAll(schemas.keySet());
|
||||||
|
|
||||||
visitOpenAPI(openAPI, (s, t) -> {
|
visitOpenAPI(openAPI, (s, t) -> {
|
||||||
if(s.get$ref() != null) {
|
if (s.get$ref() != null) {
|
||||||
unusedSchemas.remove(getSimpleRef(s.get$ref()));
|
unusedSchemas.remove(getSimpleRef(s.get$ref()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -127,6 +129,7 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of schemas in the 'components/schemas' used only in a 'application/x-www-form-urlencoded' or 'multipart/form-data' mime time
|
* Return the list of schemas in the 'components/schemas' used only in a 'application/x-www-form-urlencoded' or 'multipart/form-data' mime time
|
||||||
|
*
|
||||||
* @param openAPI specification
|
* @param openAPI specification
|
||||||
* @return schemas a list of schemas
|
* @return schemas a list of schemas
|
||||||
*/
|
*/
|
||||||
@ -135,7 +138,7 @@ public class ModelUtils {
|
|||||||
List<String> schemasUsedInOtherCases = new ArrayList<String>();
|
List<String> schemasUsedInOtherCases = new ArrayList<String>();
|
||||||
|
|
||||||
visitOpenAPI(openAPI, (s, t) -> {
|
visitOpenAPI(openAPI, (s, t) -> {
|
||||||
if(s.get$ref() != null) {
|
if (s.get$ref() != null) {
|
||||||
String ref = getSimpleRef(s.get$ref());
|
String ref = getSimpleRef(s.get$ref());
|
||||||
if ("application/x-www-form-urlencoded".equalsIgnoreCase(t) ||
|
if ("application/x-www-form-urlencoded".equalsIgnoreCase(t) ||
|
||||||
"multipart/form-data".equalsIgnoreCase(t)) {
|
"multipart/form-data".equalsIgnoreCase(t)) {
|
||||||
@ -167,7 +170,7 @@ public class ModelUtils {
|
|||||||
if (allOperations != null) {
|
if (allOperations != null) {
|
||||||
for (Operation operation : allOperations) {
|
for (Operation operation : allOperations) {
|
||||||
//Params:
|
//Params:
|
||||||
if(operation.getParameters() != null) {
|
if (operation.getParameters() != null) {
|
||||||
for (Parameter p : operation.getParameters()) {
|
for (Parameter p : operation.getParameters()) {
|
||||||
Parameter parameter = getReferencedParameter(openAPI, p);
|
Parameter parameter = getReferencedParameter(openAPI, p);
|
||||||
if (parameter.getSchema() != null) {
|
if (parameter.getSchema() != null) {
|
||||||
@ -187,7 +190,7 @@ public class ModelUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Responses:
|
//Responses:
|
||||||
if(operation.getResponses() != null) {
|
if (operation.getResponses() != null) {
|
||||||
for (ApiResponse r : operation.getResponses().values()) {
|
for (ApiResponse r : operation.getResponses().values()) {
|
||||||
ApiResponse apiResponse = getReferencedApiResponse(openAPI, r);
|
ApiResponse apiResponse = getReferencedApiResponse(openAPI, r);
|
||||||
if (apiResponse != null && apiResponse.getContent() != null) {
|
if (apiResponse != null && apiResponse.getContent() != null) {
|
||||||
@ -207,51 +210,51 @@ public class ModelUtils {
|
|||||||
|
|
||||||
private static void visitSchema(OpenAPI openAPI, Schema schema, String mimeType, List<String> visitedSchemas, OpenAPISchemaVisitor visitor) {
|
private static void visitSchema(OpenAPI openAPI, Schema schema, String mimeType, List<String> visitedSchemas, OpenAPISchemaVisitor visitor) {
|
||||||
visitor.visit(schema, mimeType);
|
visitor.visit(schema, mimeType);
|
||||||
if(schema.get$ref() != null) {
|
if (schema.get$ref() != null) {
|
||||||
String ref = getSimpleRef(schema.get$ref());
|
String ref = getSimpleRef(schema.get$ref());
|
||||||
if(!visitedSchemas.contains(ref)) {
|
if (!visitedSchemas.contains(ref)) {
|
||||||
visitedSchemas.add(ref);
|
visitedSchemas.add(ref);
|
||||||
Schema referencedSchema = getSchemas(openAPI).get(ref);
|
Schema referencedSchema = getSchemas(openAPI).get(ref);
|
||||||
if(referencedSchema != null) {
|
if (referencedSchema != null) {
|
||||||
visitSchema(openAPI, referencedSchema, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, referencedSchema, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(schema instanceof ComposedSchema) {
|
if (schema instanceof ComposedSchema) {
|
||||||
List<Schema> oneOf = ((ComposedSchema) schema).getOneOf();
|
List<Schema> oneOf = ((ComposedSchema) schema).getOneOf();
|
||||||
if(oneOf != null) {
|
if (oneOf != null) {
|
||||||
for (Schema s : oneOf) {
|
for (Schema s : oneOf) {
|
||||||
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<Schema> allOf = ((ComposedSchema) schema).getAllOf();
|
List<Schema> allOf = ((ComposedSchema) schema).getAllOf();
|
||||||
if(allOf != null) {
|
if (allOf != null) {
|
||||||
for (Schema s : allOf) {
|
for (Schema s : allOf) {
|
||||||
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<Schema> anyOf = ((ComposedSchema) schema).getAnyOf();
|
List<Schema> anyOf = ((ComposedSchema) schema).getAnyOf();
|
||||||
if(anyOf != null) {
|
if (anyOf != null) {
|
||||||
for (Schema s : anyOf) {
|
for (Schema s : anyOf) {
|
||||||
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, s, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(schema instanceof ArraySchema) {
|
} else if (schema instanceof ArraySchema) {
|
||||||
Schema itemsSchema = ((ArraySchema) schema).getItems();
|
Schema itemsSchema = ((ArraySchema) schema).getItems();
|
||||||
if(itemsSchema != null) {
|
if (itemsSchema != null) {
|
||||||
visitSchema(openAPI, itemsSchema, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, itemsSchema, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
} else if(isMapSchema(schema)) {
|
} else if (isMapSchema(schema)) {
|
||||||
Object additionalProperties = schema.getAdditionalProperties();
|
Object additionalProperties = schema.getAdditionalProperties();
|
||||||
if(additionalProperties instanceof Schema) {
|
if (additionalProperties instanceof Schema) {
|
||||||
visitSchema(openAPI, (Schema) additionalProperties, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, (Schema) additionalProperties, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(schema.getNot() != null) {
|
if (schema.getNot() != null) {
|
||||||
visitSchema(openAPI, schema.getNot(), mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, schema.getNot(), mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
Map<String, Schema> properties = schema.getProperties();
|
Map<String, Schema> properties = schema.getProperties();
|
||||||
if(properties != null) {
|
if (properties != null) {
|
||||||
for (Schema property : properties.values()) {
|
for (Schema property : properties.values()) {
|
||||||
visitSchema(openAPI, property, mimeType, visitedSchemas, visitor);
|
visitSchema(openAPI, property, mimeType, visitedSchemas, visitor);
|
||||||
}
|
}
|
||||||
@ -269,7 +272,7 @@ public class ModelUtils {
|
|||||||
ref = ref.substring(ref.lastIndexOf("/") + 1);
|
ref = ref.substring(ref.lastIndexOf("/") + 1);
|
||||||
} else if (ref.startsWith("#/definitions/")) {
|
} else if (ref.startsWith("#/definitions/")) {
|
||||||
ref = ref.substring(ref.lastIndexOf("/") + 1);
|
ref = ref.substring(ref.lastIndexOf("/") + 1);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.warn("Failed to get the schema name: {}", ref);
|
LOGGER.warn("Failed to get the schema name: {}", ref);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -478,15 +481,16 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If a Schema contains a reference to an other Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases.
|
* If a Schema contains a reference to an other Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases.
|
||||||
|
*
|
||||||
* @param openAPI specification being checked
|
* @param openAPI specification being checked
|
||||||
* @param schema potentially containing a '$ref'
|
* @param schema potentially containing a '$ref'
|
||||||
* @return schema without '$ref'
|
* @return schema without '$ref'
|
||||||
*/
|
*/
|
||||||
public static Schema getReferencedSchema(OpenAPI openAPI, Schema schema) {
|
public static Schema getReferencedSchema(OpenAPI openAPI, Schema schema) {
|
||||||
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
|
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
|
||||||
String name = getSimpleRef(schema.get$ref());
|
String name = getSimpleRef(schema.get$ref());
|
||||||
Schema referencedSchema = getSchema(openAPI, name);
|
Schema referencedSchema = getSchema(openAPI, name);
|
||||||
if(referencedSchema != null) {
|
if (referencedSchema != null) {
|
||||||
return referencedSchema;
|
return referencedSchema;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,7 +514,8 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If a RequestBody contains a reference to an other RequestBody with '$ref', returns the referenced RequestBody if it is found or the actual RequestBody in the other cases.
|
* If a RequestBody contains a reference to an other RequestBody with '$ref', returns the referenced RequestBody if it is found or the actual RequestBody in the other cases.
|
||||||
* @param openAPI specification being checked
|
*
|
||||||
|
* @param openAPI specification being checked
|
||||||
* @param requestBody potentially containing a '$ref'
|
* @param requestBody potentially containing a '$ref'
|
||||||
* @return requestBody without '$ref'
|
* @return requestBody without '$ref'
|
||||||
*/
|
*/
|
||||||
@ -518,7 +523,7 @@ public class ModelUtils {
|
|||||||
if (requestBody != null && StringUtils.isNotEmpty(requestBody.get$ref())) {
|
if (requestBody != null && StringUtils.isNotEmpty(requestBody.get$ref())) {
|
||||||
String name = getSimpleRef(requestBody.get$ref());
|
String name = getSimpleRef(requestBody.get$ref());
|
||||||
RequestBody referencedRequestBody = getRequestBody(openAPI, name);
|
RequestBody referencedRequestBody = getRequestBody(openAPI, name);
|
||||||
if(referencedRequestBody != null) {
|
if (referencedRequestBody != null) {
|
||||||
return referencedRequestBody;
|
return referencedRequestBody;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -538,7 +543,8 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If a ApiResponse contains a reference to an other ApiResponse with '$ref', returns the referenced ApiResponse if it is found or the actual ApiResponse in the other cases.
|
* If a ApiResponse contains a reference to an other ApiResponse with '$ref', returns the referenced ApiResponse if it is found or the actual ApiResponse in the other cases.
|
||||||
* @param openAPI specification being checked
|
*
|
||||||
|
* @param openAPI specification being checked
|
||||||
* @param apiResponse potentially containing a '$ref'
|
* @param apiResponse potentially containing a '$ref'
|
||||||
* @return apiResponse without '$ref'
|
* @return apiResponse without '$ref'
|
||||||
*/
|
*/
|
||||||
@ -546,7 +552,7 @@ public class ModelUtils {
|
|||||||
if (apiResponse != null && StringUtils.isNotEmpty(apiResponse.get$ref())) {
|
if (apiResponse != null && StringUtils.isNotEmpty(apiResponse.get$ref())) {
|
||||||
String name = getSimpleRef(apiResponse.get$ref());
|
String name = getSimpleRef(apiResponse.get$ref());
|
||||||
ApiResponse referencedApiResponse = getApiResponse(openAPI, name);
|
ApiResponse referencedApiResponse = getApiResponse(openAPI, name);
|
||||||
if(referencedApiResponse != null) {
|
if (referencedApiResponse != null) {
|
||||||
return referencedApiResponse;
|
return referencedApiResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -566,7 +572,8 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If a Parameter contains a reference to an other Parameter with '$ref', returns the referenced Parameter if it is found or the actual Parameter in the other cases.
|
* If a Parameter contains a reference to an other Parameter with '$ref', returns the referenced Parameter if it is found or the actual Parameter in the other cases.
|
||||||
* @param openAPI specification being checked
|
*
|
||||||
|
* @param openAPI specification being checked
|
||||||
* @param parameter potentially containing a '$ref'
|
* @param parameter potentially containing a '$ref'
|
||||||
* @return parameter without '$ref'
|
* @return parameter without '$ref'
|
||||||
*/
|
*/
|
||||||
@ -574,7 +581,7 @@ public class ModelUtils {
|
|||||||
if (parameter != null && StringUtils.isNotEmpty(parameter.get$ref())) {
|
if (parameter != null && StringUtils.isNotEmpty(parameter.get$ref())) {
|
||||||
String name = getSimpleRef(parameter.get$ref());
|
String name = getSimpleRef(parameter.get$ref());
|
||||||
Parameter referencedParameter = getParameter(openAPI, name);
|
Parameter referencedParameter = getParameter(openAPI, name);
|
||||||
if(referencedParameter != null) {
|
if (referencedParameter != null) {
|
||||||
return referencedParameter;
|
return referencedParameter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -594,6 +601,7 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the first defined Schema for a RequestBody
|
* Return the first defined Schema for a RequestBody
|
||||||
|
*
|
||||||
* @param requestBody request body of the operation
|
* @param requestBody request body of the operation
|
||||||
* @return firstSchema
|
* @return firstSchema
|
||||||
*/
|
*/
|
||||||
@ -603,6 +611,7 @@ public class ModelUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the first defined Schema for a ApiResponse
|
* Return the first defined Schema for a ApiResponse
|
||||||
|
*
|
||||||
* @param response api response of the operation
|
* @param response api response of the operation
|
||||||
* @return firstSchema
|
* @return firstSchema
|
||||||
*/
|
*/
|
||||||
@ -614,10 +623,38 @@ public class ModelUtils {
|
|||||||
if (content == null || content.isEmpty()) {
|
if (content == null || content.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(content.size() > 1) {
|
if (content.size() > 1) {
|
||||||
LOGGER.warn("Multiple schemas found, returning only the first one");
|
LOGGER.warn("Multiple schemas found, returning only the first one");
|
||||||
}
|
}
|
||||||
MediaType mediaType = content.values().iterator().next();
|
MediaType mediaType = content.values().iterator().next();
|
||||||
return mediaType.getSchema();
|
return mediaType.getSchema();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the actual schema from aliases. If the provided schema is not an alias, the schema itself will be returned.
|
||||||
|
*
|
||||||
|
* @param allSchemas all schemas
|
||||||
|
* @param schema schema (alias or direct reference)
|
||||||
|
* @return actual schema
|
||||||
|
*/
|
||||||
|
public static Schema unaliasSchema(Map<String, Schema> allSchemas, Schema schema) {
|
||||||
|
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
|
||||||
|
Schema ref = allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()));
|
||||||
|
if (ref == null) {
|
||||||
|
LOGGER.warn("{} is not defined", schema.get$ref());
|
||||||
|
return schema;
|
||||||
|
} else if (isObjectSchema(ref)) { // model
|
||||||
|
return schema;
|
||||||
|
} else if (isStringSchema(ref) && (ref.getEnum() != null && !ref.getEnum().isEmpty())) {
|
||||||
|
// top-level enum class
|
||||||
|
return schema;
|
||||||
|
} else if (isMapSchema(ref) || isArraySchema(ref)) { // map/array def should be created as models
|
||||||
|
return schema;
|
||||||
|
} else {
|
||||||
|
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
|
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
|
||||||
|
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}@XmlEnumValue({{{value}}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
{{#enumVars}}@XmlEnumValue({{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
|||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public {{dataType}} value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@ import com.squareup.moshi.Json
|
|||||||
*/
|
*/
|
||||||
enum class {{classname}}(val value: {{dataType}}){
|
enum class {{classname}}(val value: {{dataType}}){
|
||||||
{{#allowableValues}}{{#enumVars}}
|
{{#allowableValues}}{{#enumVars}}
|
||||||
@Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
@Json(name = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||||
{{/enumVars}}{{/allowableValues}}
|
{{/enumVars}}{{/allowableValues}}
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,10 @@ import org.testng.Assert;
|
|||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -202,7 +204,7 @@ public class DefaultCodegenTest {
|
|||||||
Assert.assertEquals(co.produces.size(), 1);
|
Assert.assertEquals(co.produces.size(), 1);
|
||||||
Assert.assertEquals(co.produces.get(0).get("mediaType"), "application/json");
|
Assert.assertEquals(co.produces.get(0).get("mediaType"), "application/json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetSchemaTypeWithComposedSchemaWithOneOf() {
|
public void testGetSchemaTypeWithComposedSchemaWithOneOf() {
|
||||||
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/composed-oneof.yaml", null, new ParseOptions()).getOpenAPI();
|
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/composed-oneof.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
@ -214,4 +216,32 @@ public class DefaultCodegenTest {
|
|||||||
|
|
||||||
Assert.assertNotNull(type);
|
Assert.assertNotNull(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void updateCodegenPropertyEnum() {
|
||||||
|
final DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
CodegenProperty array = codegenPropertyWithArrayOfIntegerValues();
|
||||||
|
|
||||||
|
codegen.updateCodegenPropertyEnum(array);
|
||||||
|
|
||||||
|
List<Map<String, Object>> enumVars = (List<Map<String, Object>>) array.getItems().getAllowableValues().get("enumVars");
|
||||||
|
Assert.assertNotNull(enumVars);
|
||||||
|
Map<String, Object> testedEnumVar = enumVars.get(0);
|
||||||
|
Assert.assertNotNull(testedEnumVar);
|
||||||
|
Assert.assertEquals(testedEnumVar.getOrDefault("name", ""),"_1");
|
||||||
|
Assert.assertEquals(testedEnumVar.getOrDefault("value", ""), "\"1\"");
|
||||||
|
Assert.assertEquals(testedEnumVar.getOrDefault("isString", ""), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CodegenProperty codegenPropertyWithArrayOfIntegerValues() {
|
||||||
|
CodegenProperty array = new CodegenProperty();
|
||||||
|
final CodegenProperty items = new CodegenProperty();
|
||||||
|
final HashMap<String, Object> allowableValues = new HashMap<>();
|
||||||
|
allowableValues.put("values", Collections.singletonList(1));
|
||||||
|
items.setAllowableValues(allowableValues);
|
||||||
|
items.dataType = "Integer";
|
||||||
|
array.setItems(items);
|
||||||
|
array.dataType = "Array";
|
||||||
|
return array;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,15 @@ public class AbstractJavaCodegenTest {
|
|||||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.invoker.oooooo");
|
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.invoker.oooooo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void toEnumValue(){
|
||||||
|
final AbstractJavaCodegen codegen = new P_AbstractJavaCodegen();
|
||||||
|
Assert.assertEquals(codegen.toEnumValue("1", "Integer"), "1");
|
||||||
|
Assert.assertEquals(codegen.toEnumValue("42", "Double"), "42");
|
||||||
|
Assert.assertEquals(codegen.toEnumValue("1337", "Long"), "1337l");
|
||||||
|
Assert.assertEquals(codegen.toEnumValue("3.14", "Float"), "3.14f");
|
||||||
|
}
|
||||||
|
|
||||||
private static class P_AbstractJavaCodegen extends AbstractJavaCodegen {
|
private static class P_AbstractJavaCodegen extends AbstractJavaCodegen {
|
||||||
@Override
|
@Override
|
||||||
public CodegenType getTag() {
|
public CodegenType getTag() {
|
||||||
|
@ -34,12 +34,7 @@ import io.swagger.v3.oas.models.parameters.RequestBody;
|
|||||||
import io.swagger.v3.parser.core.models.ParseOptions;
|
import io.swagger.v3.parser.core.models.ParseOptions;
|
||||||
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||||
|
|
||||||
import org.openapitools.codegen.CodegenConstants;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.CodegenModel;
|
|
||||||
import org.openapitools.codegen.CodegenModelFactory;
|
|
||||||
import org.openapitools.codegen.CodegenModelType;
|
|
||||||
import org.openapitools.codegen.CodegenOperation;
|
|
||||||
import org.openapitools.codegen.CodegenParameter;
|
|
||||||
import org.openapitools.codegen.languages.JavaClientCodegen;
|
import org.openapitools.codegen.languages.JavaClientCodegen;
|
||||||
import org.openapitools.codegen.utils.ModelUtils;
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
@ -309,7 +304,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.mmmmm");
|
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.mmmmm");
|
||||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm");
|
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetSchemaTypeWithComposedSchemaWithAllOf() {
|
public void testGetSchemaTypeWithComposedSchemaWithAllOf() {
|
||||||
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/2_0/composed-allof.yaml", null, new ParseOptions()).getOpenAPI();
|
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/2_0/composed-allof.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
@ -321,6 +316,34 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertEquals(co.allParams.get(0).baseType, "MessageEventCoreWithTimeListEntries");
|
Assert.assertEquals(co.allParams.get(0).baseType, "MessageEventCoreWithTimeListEntries");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void updateCodegenPropertyEnum() {
|
||||||
|
final JavaClientCodegen codegen = new JavaClientCodegen();
|
||||||
|
CodegenProperty array = codegenPropertyWithArrayOfIntegerValues();
|
||||||
|
|
||||||
|
codegen.updateCodegenPropertyEnum(array);
|
||||||
|
|
||||||
|
List<Map<String, String>> enumVars = (List<Map<String, String>>) array.getItems().getAllowableValues().get("enumVars");
|
||||||
|
Assert.assertNotNull(enumVars);
|
||||||
|
Map<String, String> testedEnumVar = enumVars.get(0);
|
||||||
|
Assert.assertNotNull(testedEnumVar);
|
||||||
|
Assert.assertEquals(testedEnumVar.getOrDefault("name", ""),"NUMBER_1");
|
||||||
|
Assert.assertEquals(testedEnumVar.getOrDefault("value", ""), "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
private CodegenProperty codegenPropertyWithArrayOfIntegerValues() {
|
||||||
|
CodegenProperty array = new CodegenProperty();
|
||||||
|
final CodegenProperty items = new CodegenProperty();
|
||||||
|
final HashMap<String, Object> allowableValues = new HashMap<>();
|
||||||
|
allowableValues.put("values", Collections.singletonList(1));
|
||||||
|
items.setAllowableValues(allowableValues);
|
||||||
|
items.dataType = "Integer";
|
||||||
|
array.setItems(items);
|
||||||
|
array.dataType = "Array";
|
||||||
|
array.mostInnerItems = items;
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
private CodegenParameter createPathParam(String name) {
|
private CodegenParameter createPathParam(String name) {
|
||||||
CodegenParameter codegenParameter = createStringParam(name);
|
CodegenParameter codegenParameter = createStringParam(name);
|
||||||
codegenParameter.isPathParam = true;
|
codegenParameter.isPathParam = true;
|
||||||
|
@ -943,11 +943,11 @@ public class JavaModelTest {
|
|||||||
Assert.assertTrue(cp.isNotContainer);
|
Assert.assertTrue(cp.isNotContainer);
|
||||||
Assert.assertFalse(cp.isLong);
|
Assert.assertFalse(cp.isLong);
|
||||||
Assert.assertFalse(cp.isInteger);
|
Assert.assertFalse(cp.isInteger);
|
||||||
// Assert.assertTrue(cp.isString); //TODO: issue swagger-api/swagger-codegen#8001
|
Assert.assertTrue(cp.isString);
|
||||||
Assert.assertEquals(cp.getter, "getSomePropertyWithMinMaxAndPattern");
|
Assert.assertEquals(cp.getter, "getSomePropertyWithMinMaxAndPattern");
|
||||||
// Assert.assertEquals(cp.minLength, Integer.valueOf(3)); //TODO: issue swagger-api/swagger-codegen#8001
|
Assert.assertEquals(cp.minLength, Integer.valueOf(3));
|
||||||
// Assert.assertEquals(cp.maxLength, Integer.valueOf(10)); //TODO: issue swagger-api/swagger-codegen#8001
|
Assert.assertEquals(cp.maxLength, Integer.valueOf(10));
|
||||||
// Assert.assertEquals(cp.pattern, "^[A-Z]+$"); //TODO: issue swagger-api/swagger-codegen#8001
|
Assert.assertEquals(cp.pattern, "^[A-Z]+$");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(description = "convert an array schema")
|
@Test(description = "convert an array schema")
|
||||||
|
@ -6,6 +6,9 @@ import org.testng.Assert;
|
|||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import static org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.*;
|
import static org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.*;
|
||||||
|
import static org.testng.Assert.assertEquals;
|
||||||
|
import static org.testng.Assert.assertFalse;
|
||||||
|
import static org.testng.Assert.assertTrue;
|
||||||
|
|
||||||
public class AbstractKotlinCodegenTest {
|
public class AbstractKotlinCodegenTest {
|
||||||
|
|
||||||
@ -14,41 +17,51 @@ public class AbstractKotlinCodegenTest {
|
|||||||
@Test
|
@Test
|
||||||
public void camlCaseEnumConverter() {
|
public void camlCaseEnumConverter() {
|
||||||
codegen.setEnumPropertyNaming(camelCase.name());
|
codegen.setEnumPropertyNaming(camelCase.name());
|
||||||
Assert.assertEquals(codegen.toEnumVarName("long Name", null), "longName");
|
assertEquals(codegen.toEnumVarName("long Name", null), "longName");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("1long Name", null), "_1longName");
|
assertEquals(codegen.toEnumVarName("1long Name", null), "_1longName");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("not1long Name", null), "not1longName");
|
assertEquals(codegen.toEnumVarName("not1long Name", null), "not1longName");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void uppercasEnumConverter() {
|
public void uppercasEnumConverter() {
|
||||||
codegen.setEnumPropertyNaming(UPPERCASE.name());
|
codegen.setEnumPropertyNaming(UPPERCASE.name());
|
||||||
Assert.assertEquals(codegen.toEnumVarName("long Name", null), "LONG_NAME");
|
assertEquals(codegen.toEnumVarName("long Name", null), "LONG_NAME");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("1long Name", null), "_1LONG_NAME");
|
assertEquals(codegen.toEnumVarName("1long Name", null), "_1LONG_NAME");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("not1long Name", null), "NOT1LONG_NAME");
|
assertEquals(codegen.toEnumVarName("not1long Name", null), "NOT1LONG_NAME");
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void snake_caseEnumConverter() {
|
public void snake_caseEnumConverter() {
|
||||||
codegen.setEnumPropertyNaming(snake_case.name());
|
codegen.setEnumPropertyNaming(snake_case.name());
|
||||||
Assert.assertEquals(codegen.toEnumVarName("long Name", null), "long_name");
|
assertEquals(codegen.toEnumVarName("long Name", null), "long_name");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("1long Name", null), "_1long_name");
|
assertEquals(codegen.toEnumVarName("1long Name", null), "_1long_name");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("not1long Name", null), "not1long_name");
|
assertEquals(codegen.toEnumVarName("not1long Name", null), "not1long_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void originalEnumConverter() {
|
public void originalEnumConverter() {
|
||||||
codegen.setEnumPropertyNaming(original.name());
|
codegen.setEnumPropertyNaming(original.name());
|
||||||
Assert.assertEquals(codegen.toEnumVarName("long Name", null), "long_Name");
|
assertEquals(codegen.toEnumVarName("long Name", null), "long_Name");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("1long Name", null), "_1long_Name");
|
assertEquals(codegen.toEnumVarName("1long Name", null), "_1long_Name");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("not1long Name", null), "not1long_Name");
|
assertEquals(codegen.toEnumVarName("not1long Name", null), "not1long_Name");
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void pascalCaseEnumConverter() {
|
public void pascalCaseEnumConverter() {
|
||||||
codegen.setEnumPropertyNaming(PascalCase.name());
|
codegen.setEnumPropertyNaming(PascalCase.name());
|
||||||
Assert.assertEquals(codegen.toEnumVarName("long Name", null), "LongName");
|
assertEquals(codegen.toEnumVarName("long Name", null), "LongName");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("1long Name", null), "_1longName");
|
assertEquals(codegen.toEnumVarName("1long Name", null), "_1longName");
|
||||||
Assert.assertEquals(codegen.toEnumVarName("not1long Name", null), "Not1longName");
|
assertEquals(codegen.toEnumVarName("not1long Name", null), "Not1longName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void toEnumValue(){
|
||||||
|
assertEquals(codegen.toEnumValue("1", "kotlin.Int"), "1");
|
||||||
|
assertEquals(codegen.toEnumValue("1", "kotlin.Double"), "1.0");
|
||||||
|
assertEquals(codegen.toEnumValue("1.3", "kotlin.Double"), "1.3");
|
||||||
|
assertEquals(codegen.toEnumValue("1337", "kotlin.Long"), "1337");
|
||||||
|
assertEquals(codegen.toEnumValue("5", "kotlin.Float"), "5f");
|
||||||
|
assertEquals(codegen.toEnumValue("1.0", "kotlin.Float"), "1.0f");
|
||||||
|
assertEquals(codegen.toEnumValue("data", "Something"), "\"data\"");
|
||||||
|
}
|
||||||
|
|
||||||
private class P_AbstractKotlinCodegen extends AbstractKotlinCodegen {
|
private class P_AbstractKotlinCodegen extends AbstractKotlinCodegen {
|
||||||
@Override
|
@Override
|
||||||
@ -66,4 +79,11 @@ public class AbstractKotlinCodegenTest {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void isDataTypeString(){
|
||||||
|
assertFalse(codegen.isDataTypeString("kotlin.Int"));
|
||||||
|
assertTrue(codegen.isDataTypeString("kotlin.String"));
|
||||||
|
assertTrue(codegen.isDataTypeString("String"));
|
||||||
|
}
|
||||||
}
|
}
|
@ -310,12 +310,14 @@ public class PhpModelTest {
|
|||||||
Assert.assertTrue(prope.isEnum);
|
Assert.assertTrue(prope.isEnum);
|
||||||
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList("fish", "crab"));
|
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList("fish", "crab"));
|
||||||
|
|
||||||
HashMap<String, String> fish= new HashMap<String, String>();
|
HashMap<String, Object> fish= new HashMap<String, Object>();
|
||||||
fish.put("name", "FISH");
|
fish.put("name", "FISH");
|
||||||
fish.put("value", "\'fish\'");
|
fish.put("value", "\'fish\'");
|
||||||
HashMap<String, String> crab= new HashMap<String, String>();
|
fish.put("isString", false);
|
||||||
|
HashMap<String, Object> crab= new HashMap<String, Object>();
|
||||||
crab.put("name", "CRAB");
|
crab.put("name", "CRAB");
|
||||||
crab.put("value", "\'crab\'");
|
crab.put("value", "\'crab\'");
|
||||||
|
crab.put("isString", false);
|
||||||
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(fish, crab));
|
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(fish, crab));
|
||||||
|
|
||||||
// assert inner items
|
// assert inner items
|
||||||
@ -343,12 +345,14 @@ public class PhpModelTest {
|
|||||||
Assert.assertNull(prope.items);
|
Assert.assertNull(prope.items);
|
||||||
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList(1, -1));
|
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList(1, -1));
|
||||||
|
|
||||||
HashMap<String, String> one = new HashMap<String, String>();
|
HashMap<String, Object> one = new HashMap<String, Object>();
|
||||||
one.put("name", "1");
|
one.put("name", "1");
|
||||||
one.put("value", "1");
|
one.put("value", "1");
|
||||||
HashMap<String, String> minusOne = new HashMap<String, String>();
|
one.put("isString", false);
|
||||||
|
HashMap<String, Object> minusOne = new HashMap<String, Object>();
|
||||||
minusOne.put("name", "MINUS_1");
|
minusOne.put("name", "MINUS_1");
|
||||||
minusOne.put("value", "-1");
|
minusOne.put("value", "-1");
|
||||||
|
minusOne.put("isString", false);
|
||||||
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(one, minusOne));
|
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(one, minusOne));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,12 +234,14 @@ public class TypeScriptFetchModelTest {
|
|||||||
Assert.assertTrue(prope.isEnum);
|
Assert.assertTrue(prope.isEnum);
|
||||||
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList("fish", "crab"));
|
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList("fish", "crab"));
|
||||||
|
|
||||||
HashMap<String, String> fish = new HashMap<String, String>();
|
HashMap<String, Object> fish = new HashMap<String, Object>();
|
||||||
fish.put("name", "Fish");
|
fish.put("name", "Fish");
|
||||||
fish.put("value", "'fish'");
|
fish.put("value", "'fish'");
|
||||||
HashMap<String, String> crab = new HashMap<String, String>();
|
fish.put("isString", false);
|
||||||
|
HashMap<String, Object> crab = new HashMap<String, Object>();
|
||||||
crab.put("name", "Crab");
|
crab.put("name", "Crab");
|
||||||
crab.put("value", "'crab'");
|
crab.put("value", "'crab'");
|
||||||
|
crab.put("isString", false);
|
||||||
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(fish, crab));
|
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(fish, crab));
|
||||||
|
|
||||||
// assert inner items
|
// assert inner items
|
||||||
@ -270,12 +272,14 @@ public class TypeScriptFetchModelTest {
|
|||||||
Assert.assertNull(prope.items);
|
Assert.assertNull(prope.items);
|
||||||
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList(1, -1));
|
Assert.assertEquals(prope.allowableValues.get("values"), Arrays.asList(1, -1));
|
||||||
|
|
||||||
HashMap<String, String> one = new HashMap<String, String>();
|
HashMap<String, Object> one = new HashMap<String, Object>();
|
||||||
one.put("name", "NUMBER_1");
|
one.put("name", "NUMBER_1");
|
||||||
one.put("value", "1");
|
one.put("value", "1");
|
||||||
HashMap<String, String> minusOne = new HashMap<String, String>();
|
one.put("isString", false);
|
||||||
|
HashMap<String, Object> minusOne = new HashMap<String, Object>();
|
||||||
minusOne.put("name", "NUMBER_MINUS_1");
|
minusOne.put("name", "NUMBER_MINUS_1");
|
||||||
minusOne.put("value", "-1");
|
minusOne.put("value", "-1");
|
||||||
|
minusOne.put("isString", false);
|
||||||
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(one, minusOne));
|
Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(one, minusOne));
|
||||||
|
|
||||||
//IMPORTANT: these are not final enum values, which may be further updated
|
//IMPORTANT: these are not final enum values, which may be further updated
|
||||||
|
@ -16,3 +16,61 @@ paths:
|
|||||||
default:
|
default:
|
||||||
description: "Internal server error"
|
description: "Internal server error"
|
||||||
summary: Test
|
summary: Test
|
||||||
|
definitions:
|
||||||
|
MapTest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
direct_map:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
indirect_map:
|
||||||
|
$ref: "#/definitions/StringBooleanMap"
|
||||||
|
ref_test:
|
||||||
|
$ref: "#/definitions/StringRef"
|
||||||
|
direct_test:
|
||||||
|
type: string
|
||||||
|
StringBooleanMap:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
StringRef:
|
||||||
|
type: string
|
||||||
|
Pet:
|
||||||
|
title: a Pet
|
||||||
|
description: A pet for sale in the pet store
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
category:
|
||||||
|
$ref: '#/definitions/Category'
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: tag
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Tag'
|
||||||
|
Tag:
|
||||||
|
title: Pet Tag
|
||||||
|
description: A tag for a pet
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
Category:
|
||||||
|
title: Pet category
|
||||||
|
description: A category for a pet
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Category
|
@ -1355,6 +1355,12 @@ definitions:
|
|||||||
enum:
|
enum:
|
||||||
- UPPER
|
- UPPER
|
||||||
- lower
|
- lower
|
||||||
|
direct_map:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
indirect_map:
|
||||||
|
$ref: "#/definitions/StringBooleanMap"
|
||||||
ArrayTest:
|
ArrayTest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -1452,3 +1458,6 @@ definitions:
|
|||||||
OuterBoolean:
|
OuterBoolean:
|
||||||
type: boolean
|
type: boolean
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
|
StringBooleanMap:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
|||||||
<artifactId>openapi-generator-project</artifactId>
|
<artifactId>openapi-generator-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>openapi-generator-project</name>
|
<name>openapi-generator-project</name>
|
||||||
<version>3.0.3</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
<url>https://github.com/openapitools/openapi-generator</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||||
|
@ -97,6 +97,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [SpecialModelName](docs/SpecialModelName.md)
|
- [SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
- [StringBooleanMap](docs/StringBooleanMap.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
- [User](docs/User.md)
|
- [User](docs/User.md)
|
||||||
|
|
||||||
|
@ -1276,14 +1276,18 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
OuterComposite:
|
OuterComposite:
|
||||||
example: {}
|
example:
|
||||||
|
my_string: my_string
|
||||||
|
my_number: 0.80082819046101150206595775671303272247314453125
|
||||||
|
my_boolean: true
|
||||||
properties:
|
properties:
|
||||||
my_number:
|
my_number:
|
||||||
$ref: '#/components/schemas/OuterNumber'
|
type: number
|
||||||
my_string:
|
my_string:
|
||||||
$ref: '#/components/schemas/OuterString'
|
type: string
|
||||||
my_boolean:
|
my_boolean:
|
||||||
$ref: '#/components/schemas/OuterBoolean'
|
type: boolean
|
||||||
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
type: object
|
type: object
|
||||||
format_test:
|
format_test:
|
||||||
properties:
|
properties:
|
||||||
@ -1381,6 +1385,10 @@ components:
|
|||||||
required:
|
required:
|
||||||
- className
|
- className
|
||||||
type: object
|
type: object
|
||||||
|
StringBooleanMap:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
Cat:
|
Cat:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Animal'
|
- $ref: '#/components/schemas/Animal'
|
||||||
@ -1403,6 +1411,12 @@ components:
|
|||||||
- lower
|
- lower
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
direct_map:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
indirect_map:
|
||||||
|
$ref: '#/components/schemas/StringBooleanMap'
|
||||||
type: object
|
type: object
|
||||||
Tag:
|
Tag:
|
||||||
example:
|
example:
|
||||||
|
@ -5,6 +5,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
|
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
|
||||||
**MapOfEnumString** | **map[string]string** | | [optional]
|
**MapOfEnumString** | **map[string]string** | | [optional]
|
||||||
|
**DirectMap** | **map[string]bool** | | [optional]
|
||||||
|
**IndirectMap** | [***StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -12,4 +12,6 @@ package petstore
|
|||||||
type MapTest struct {
|
type MapTest struct {
|
||||||
MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"`
|
MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"`
|
||||||
MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"`
|
MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"`
|
||||||
|
DirectMap map[string]bool `json:"direct_map,omitempty"`
|
||||||
|
IndirectMap *StringBooleanMap `json:"indirect_map,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package petstore
|
||||||
|
|
||||||
|
type StringBooleanMap struct {
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -69,6 +70,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -121,6 +128,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -132,12 +183,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return ObjectUtils.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return ObjectUtils.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
ObjectUtils.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
ObjectUtils.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
ObjectUtils.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
ObjectUtils.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return ObjectUtils.hashCodeMulti(mapMapOfString, mapOfEnumString);
|
return ObjectUtils.hashCodeMulti(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -148,6 +201,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* 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.apache.commons.lang3.ObjectUtils;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return ObjectUtils.hashCodeMulti(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> 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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
|
|
||||||
@ -89,6 +90,14 @@ public class MapTest implements Parcelable {
|
|||||||
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_DIRECT_MAP = "direct_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_DIRECT_MAP)
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest() {
|
public MapTest() {
|
||||||
}
|
}
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
@ -143,6 +152,50 @@ public class MapTest implements Parcelable {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -154,12 +207,14 @@ public class MapTest implements Parcelable {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -170,6 +225,8 @@ public class MapTest implements Parcelable {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@ -189,11 +246,15 @@ public class MapTest implements Parcelable {
|
|||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
out.writeValue(mapMapOfString);
|
out.writeValue(mapMapOfString);
|
||||||
out.writeValue(mapOfEnumString);
|
out.writeValue(mapOfEnumString);
|
||||||
|
out.writeValue(directMap);
|
||||||
|
out.writeValue(indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
MapTest(Parcel in) {
|
MapTest(Parcel in) {
|
||||||
mapMapOfString = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader());
|
mapMapOfString = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader());
|
||||||
mapOfEnumString = (Map<String, InnerEnum>)in.readValue(null);
|
mapOfEnumString = (Map<String, InnerEnum>)in.readValue(null);
|
||||||
|
directMap = (Map<String, Boolean>)in.readValue(null);
|
||||||
|
indirectMap = (StringBooleanMap)in.readValue(StringBooleanMap.class.getClassLoader());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
|
@ -92,7 +92,7 @@ public class OuterComposite implements Parcelable {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> implements Parcelable {
|
||||||
|
public StringBooleanMap() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
super.writeToParcel(out, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBooleanMap(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<StringBooleanMap> CREATOR = new Parcelable.Creator<StringBooleanMap>() {
|
||||||
|
public StringBooleanMap createFromParcel(Parcel in) {
|
||||||
|
return new StringBooleanMap(in);
|
||||||
|
}
|
||||||
|
public StringBooleanMap[] newArray(int size) {
|
||||||
|
return new StringBooleanMap[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -87,6 +88,14 @@ public class MapTest {
|
|||||||
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_DIRECT_MAP = "direct_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_DIRECT_MAP)
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -139,6 +148,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -150,12 +203,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -166,6 +221,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -87,6 +88,14 @@ public class MapTest {
|
|||||||
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_DIRECT_MAP = "direct_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_DIRECT_MAP)
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map";
|
||||||
|
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -139,6 +148,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -150,12 +203,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -166,6 +221,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
@ -70,6 +71,12 @@ public class MapTest {
|
|||||||
@JsonProperty("map_of_enum_string")
|
@JsonProperty("map_of_enum_string")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -122,6 +129,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -133,12 +184,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,6 +202,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 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 java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StringBooleanMap
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3.0.3-SNAPSHOT
|
3.1.0-SNAPSHOT
|
@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||||
|
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="Map<String, InnerEnum>"></a>
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# StringBooleanMap
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -23,6 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.client.model.StringBooleanMap;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||||
import javax.xml.bind.annotation.*;
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ -83,6 +84,18 @@ public class MapTest {
|
|||||||
@XmlElement(name = "inner")
|
@XmlElement(name = "inner")
|
||||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||||
|
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
// Is a container wrapped=false
|
||||||
|
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||||
|
// items.example= items.type=Boolean
|
||||||
|
@XmlElement(name = "inner")
|
||||||
|
private Map<String, Boolean> directMap = null;
|
||||||
|
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
@JacksonXmlProperty(localName = "indirect_map")
|
||||||
|
@XmlElement(name = "indirect_map")
|
||||||
|
private StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||||
this.mapMapOfString = mapMapOfString;
|
this.mapMapOfString = mapMapOfString;
|
||||||
return this;
|
return this;
|
||||||
@ -135,6 +148,50 @@ public class MapTest {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
|
||||||
|
if (this.directMap == null) {
|
||||||
|
this.directMap = new HashMap<String, Boolean>();
|
||||||
|
}
|
||||||
|
this.directMap.put(key, directMapItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get directMap
|
||||||
|
* @return directMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get indirectMap
|
||||||
|
* @return indirectMap
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -146,12 +203,14 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(this.directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(this.indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -162,6 +221,8 @@ public class MapTest {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public class OuterComposite {
|
|||||||
* @return myBoolean
|
* @return myBoolean
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public Boolean getMyBoolean() {
|
public Boolean isMyBoolean() {
|
||||||
return myBoolean;
|
return myBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user