forked from loafle/openapi-generator-original
Better handling of Inline schema (#15682)
* skip allOf inline subschema created as $ref * add option for fallback * add back atleastonemodel * add log * update java, kotlin, js samples * update tests * fix native client test * fix java client errors by regenerating test files * clean up python * clean up powershell * clean up php * clean up ruby * update erlang, elixir * update dart samples * update ts samples * update r, go samples * update perl * update swift * add back files * add back files * remove outdated test files * fix test
This commit is contained in:
parent
21748e024a
commit
6788f43af0
@ -450,7 +450,11 @@ Another useful option is `inlineSchemaNameDefaults`, which allows you to customi
|
|||||||
--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item
|
--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.
|
Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment.
|
||||||
|
|
||||||
|
There are 2 special values:
|
||||||
|
- `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.
|
||||||
|
- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schmeas by default)
|
||||||
|
|
||||||
## OpenAPI Normalizer
|
## OpenAPI Normalizer
|
||||||
|
|
||||||
|
@ -2781,7 +2781,8 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// includes child's properties (all, required) in allProperties, allRequired
|
// includes child's properties (all, required) in allProperties, allRequired
|
||||||
addProperties(allProperties, allRequired, component, new HashSet<>());
|
addProperties(allProperties, allRequired, component, new HashSet<>());
|
||||||
}
|
}
|
||||||
break; // at most one child only
|
// in 7.0.0 release, we comment out below to allow more than 1 child schemas in allOf
|
||||||
|
//break; // at most one child only
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ import org.openapitools.codegen.config.GlobalSettings;
|
|||||||
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||||
import org.openapitools.codegen.api.TemplateFileType;
|
import org.openapitools.codegen.api.TemplateFileType;
|
||||||
import org.openapitools.codegen.ignore.CodegenIgnoreProcessor;
|
import org.openapitools.codegen.ignore.CodegenIgnoreProcessor;
|
||||||
|
import org.openapitools.codegen.languages.CSharpNetCoreClientCodegen;
|
||||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||||
import org.openapitools.codegen.meta.Stability;
|
import org.openapitools.codegen.meta.Stability;
|
||||||
import org.openapitools.codegen.model.ApiInfoMap;
|
import org.openapitools.codegen.model.ApiInfoMap;
|
||||||
@ -269,6 +270,13 @@ public class DefaultGenerator implements Generator {
|
|||||||
InlineModelResolver inlineModelResolver = new InlineModelResolver();
|
InlineModelResolver inlineModelResolver = new InlineModelResolver();
|
||||||
inlineModelResolver.setInlineSchemaNameMapping(config.inlineSchemaNameMapping());
|
inlineModelResolver.setInlineSchemaNameMapping(config.inlineSchemaNameMapping());
|
||||||
inlineModelResolver.setInlineSchemaNameDefaults(config.inlineSchemaNameDefault());
|
inlineModelResolver.setInlineSchemaNameDefaults(config.inlineSchemaNameDefault());
|
||||||
|
if (inlineModelResolver.refactorAllOfInlineSchemas == null && // option not set
|
||||||
|
config instanceof CSharpNetCoreClientCodegen) { // default to true for csharp-netcore generator
|
||||||
|
inlineModelResolver.refactorAllOfInlineSchemas = true;
|
||||||
|
LOGGER.info("inlineModelResolver.refactorAllOfInlineSchemas is default to true instead of false for `csharp-netcore` generator." +
|
||||||
|
"Add --inline-schema-name-defaults REFACTOR_ALLOF_INLINE_SCHEMAS=false in CLI for example to set it to false instead.");
|
||||||
|
}
|
||||||
|
|
||||||
inlineModelResolver.flatten(openAPI);
|
inlineModelResolver.flatten(openAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ public class InlineModelResolver {
|
|||||||
private Set<String> inlineSchemaNameMappingValues = new HashSet<>();
|
private Set<String> inlineSchemaNameMappingValues = new HashSet<>();
|
||||||
public boolean resolveInlineEnums = false;
|
public boolean resolveInlineEnums = false;
|
||||||
public boolean skipSchemaReuse = false; // skip reusing inline schema if set to true
|
public boolean skipSchemaReuse = false; // skip reusing inline schema if set to true
|
||||||
|
public Boolean refactorAllOfInlineSchemas = null; // refactor allOf inline schemas into $ref
|
||||||
|
|
||||||
// structure mapper sorts properties alphabetically on write to ensure models are
|
// structure mapper sorts properties alphabetically on write to ensure models are
|
||||||
// serialized consistently for lookup of existing models
|
// serialized consistently for lookup of existing models
|
||||||
@ -80,6 +81,16 @@ public class InlineModelResolver {
|
|||||||
this.inlineSchemaNameDefaults.getOrDefault("SKIP_SCHEMA_REUSE", "false"))) {
|
this.inlineSchemaNameDefaults.getOrDefault("SKIP_SCHEMA_REUSE", "false"))) {
|
||||||
this.skipSchemaReuse = true;
|
this.skipSchemaReuse = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.inlineSchemaNameDefaults.containsKey("REFACTOR_ALLOF_INLINE_SCHEMAS")) {
|
||||||
|
if (Boolean.valueOf(this.inlineSchemaNameDefaults.get("REFACTOR_ALLOF_INLINE_SCHEMAS"))) {
|
||||||
|
this.refactorAllOfInlineSchemas = true;
|
||||||
|
} else { // set to false
|
||||||
|
this.refactorAllOfInlineSchemas = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// not set so default to null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void flatten(OpenAPI openAPI) {
|
void flatten(OpenAPI openAPI) {
|
||||||
@ -233,6 +244,7 @@ public class InlineModelResolver {
|
|||||||
// allOf items are all non-model (e.g. type: string) only
|
// allOf items are all non-model (e.g. type: string) only
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.getAnyOf() != null && !m.getAnyOf().isEmpty()) {
|
if (m.getAnyOf() != null && !m.getAnyOf().isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -351,9 +363,14 @@ public class InlineModelResolver {
|
|||||||
// Recurse to create $refs for inner models
|
// Recurse to create $refs for inner models
|
||||||
gatherInlineModels(inner, schemaName);
|
gatherInlineModels(inner, schemaName);
|
||||||
if (isModelNeeded(inner)) {
|
if (isModelNeeded(inner)) {
|
||||||
|
if (Boolean.TRUE.equals(this.refactorAllOfInlineSchemas)) {
|
||||||
Schema refSchema = this.makeSchemaInComponents(schemaName, inner);
|
Schema refSchema = this.makeSchemaInComponents(schemaName, inner);
|
||||||
newAllOf.add(refSchema); // replace with ref
|
newAllOf.add(refSchema); // replace with ref
|
||||||
atLeastOneModel = true;
|
atLeastOneModel = true;
|
||||||
|
} else { // do not refactor allOf inline schemas
|
||||||
|
newAllOf.add(inner);
|
||||||
|
atLeastOneModel = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
newAllOf.add(inner);
|
newAllOf.add(inner);
|
||||||
}
|
}
|
||||||
@ -554,8 +571,9 @@ public class InlineModelResolver {
|
|||||||
*
|
*
|
||||||
* @param key a unique name ofr the composed schema.
|
* @param key a unique name ofr the composed schema.
|
||||||
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
|
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
|
||||||
|
* @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped.
|
||||||
*/
|
*/
|
||||||
private void flattenComposedChildren(String key, List<Schema> children) {
|
private void flattenComposedChildren(String key, List<Schema> children, boolean skipAllOfInlineSchemas) {
|
||||||
if (children == null || children.isEmpty()) {
|
if (children == null || children.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -581,6 +599,7 @@ public class InlineModelResolver {
|
|||||||
// Recurse to create $refs for inner models
|
// Recurse to create $refs for inner models
|
||||||
gatherInlineModels(innerModel, innerModelName);
|
gatherInlineModels(innerModel, innerModelName);
|
||||||
String existing = matchGenerated(innerModel);
|
String existing = matchGenerated(innerModel);
|
||||||
|
if (!skipAllOfInlineSchemas) {
|
||||||
if (existing == null) {
|
if (existing == null) {
|
||||||
innerModelName = addSchemas(innerModelName, innerModel);
|
innerModelName = addSchemas(innerModelName, innerModel);
|
||||||
Schema schema = new Schema().$ref(innerModelName);
|
Schema schema = new Schema().$ref(innerModelName);
|
||||||
@ -591,6 +610,9 @@ public class InlineModelResolver {
|
|||||||
schema.setRequired(component.getRequired());
|
schema.setRequired(component.getRequired());
|
||||||
listIterator.set(schema);
|
listIterator.set(schema);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LOGGER.debug("Inline allOf schema {} not refactored into a separate model using $ref.", innerModelName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -614,9 +636,9 @@ public class InlineModelResolver {
|
|||||||
} else if (ModelUtils.isComposedSchema(model)) {
|
} else if (ModelUtils.isComposedSchema(model)) {
|
||||||
ComposedSchema m = (ComposedSchema) model;
|
ComposedSchema m = (ComposedSchema) model;
|
||||||
// inline child schemas
|
// inline child schemas
|
||||||
flattenComposedChildren(modelName + "_allOf", m.getAllOf());
|
flattenComposedChildren(modelName + "_allOf", m.getAllOf(), !Boolean.TRUE.equals(this.refactorAllOfInlineSchemas));
|
||||||
flattenComposedChildren(modelName + "_anyOf", m.getAnyOf());
|
flattenComposedChildren(modelName + "_anyOf", m.getAnyOf(), false);
|
||||||
flattenComposedChildren(modelName + "_oneOf", m.getOneOf());
|
flattenComposedChildren(modelName + "_oneOf", m.getOneOf(), false);
|
||||||
} else {
|
} else {
|
||||||
gatherInlineModels(model, modelName);
|
gatherInlineModels(model, modelName);
|
||||||
}
|
}
|
||||||
|
@ -1905,6 +1905,26 @@ public class ModelUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the schema is a parent (with discriminator).
|
||||||
|
*
|
||||||
|
* @param schema the schema.
|
||||||
|
*
|
||||||
|
* @return true if the schema is a parent.
|
||||||
|
*/
|
||||||
|
public static boolean isParent(Schema schema) {
|
||||||
|
if (schema != null && schema.getDiscriminator() != null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if x-parent is set
|
||||||
|
if (isExtensionParent(schema)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
private interface OpenAPISchemaVisitor {
|
private interface OpenAPISchemaVisitor {
|
||||||
|
|
||||||
|
@ -800,7 +800,11 @@ public class InlineModelResolverTest {
|
|||||||
|
|
||||||
ComposedSchema schema = (ComposedSchema) openAPI.getComponents().getSchemas().get("ComposedObjectModelInline");
|
ComposedSchema schema = (ComposedSchema) openAPI.getComponents().getSchemas().get("ComposedObjectModelInline");
|
||||||
|
|
||||||
checkComposedChildren(openAPI, schema.getAllOf(), "allOf");
|
// since 7.0.0, allOf inline sub-schemas are not created as $ref schema
|
||||||
|
assertEquals(1, schema.getAllOf().get(0).getProperties().size());
|
||||||
|
assertNull(schema.getAllOf().get(0).get$ref());
|
||||||
|
|
||||||
|
// anyOf, oneOf sub-schemas are created as $ref schema by inline model resolver
|
||||||
checkComposedChildren(openAPI, schema.getAnyOf(), "anyOf");
|
checkComposedChildren(openAPI, schema.getAnyOf(), "anyOf");
|
||||||
checkComposedChildren(openAPI, schema.getOneOf(), "oneOf");
|
checkComposedChildren(openAPI, schema.getOneOf(), "oneOf");
|
||||||
}
|
}
|
||||||
@ -833,27 +837,25 @@ public class InlineModelResolverTest {
|
|||||||
ComposedSchema party = (ComposedSchema) openAPI.getComponents().getSchemas().get("Party");
|
ComposedSchema party = (ComposedSchema) openAPI.getComponents().getSchemas().get("Party");
|
||||||
List<Schema> partySchemas = party.getAllOf();
|
List<Schema> partySchemas = party.getAllOf();
|
||||||
Schema entity = ModelUtils.getReferencedSchema(openAPI, partySchemas.get(0));
|
Schema entity = ModelUtils.getReferencedSchema(openAPI, partySchemas.get(0));
|
||||||
Schema partyAllOf = ModelUtils.getReferencedSchema(openAPI, partySchemas.get(1));
|
Schema partyAllOfChildSchema = partySchemas.get(1); // get the inline schema directly
|
||||||
|
|
||||||
assertEquals(partySchemas.get(0).get$ref(), "#/components/schemas/Entity");
|
assertEquals(partySchemas.get(0).get$ref(), "#/components/schemas/Entity");
|
||||||
assertEquals(partySchemas.get(1).get$ref(), "#/components/schemas/Party_allOf");
|
assertEquals(partySchemas.get(1).get$ref(), null);
|
||||||
|
|
||||||
assertNull(party.getDiscriminator());
|
assertNull(party.getDiscriminator());
|
||||||
assertNull(entity.getDiscriminator());
|
assertNull(entity.getDiscriminator());
|
||||||
assertNotNull(partyAllOf.getDiscriminator());
|
assertNotNull(partyAllOfChildSchema.getDiscriminator());
|
||||||
assertEquals(partyAllOf.getDiscriminator().getPropertyName(), "party_type");
|
assertEquals(partyAllOfChildSchema.getDiscriminator().getPropertyName(), "party_type");
|
||||||
assertEquals(partyAllOf.getRequired().get(0), "party_type");
|
assertEquals(partyAllOfChildSchema.getRequired().get(0), "party_type");
|
||||||
|
|
||||||
|
|
||||||
// Contact
|
// Contact
|
||||||
ComposedSchema contact = (ComposedSchema) openAPI.getComponents().getSchemas().get("Contact");
|
ComposedSchema contact = (ComposedSchema) openAPI.getComponents().getSchemas().get("Contact");
|
||||||
Schema contactAllOf = ModelUtils.getReferencedSchema(openAPI, contact.getAllOf().get(1));
|
Schema contactAllOf = contact.getAllOf().get(1); // use the inline child scheam directly
|
||||||
|
|
||||||
assertEquals(contact.getExtensions().get("x-discriminator-value"), "contact");
|
assertEquals(contact.getExtensions().get("x-discriminator-value"), "contact");
|
||||||
assertEquals(contact.getAllOf().get(0).get$ref(), "#/components/schemas/Party");
|
assertEquals(contact.getAllOf().get(0).get$ref(), "#/components/schemas/Party");
|
||||||
assertEquals(contact.getAllOf().get(1).get$ref(), "#/components/schemas/Contact_allOf");
|
assertEquals(contact.getAllOf().get(1).get$ref(), null);
|
||||||
assertNull(contactAllOf.getDiscriminator());
|
assertEquals(contactAllOf.getProperties().size(), 4);
|
||||||
|
|
||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
ComposedSchema customer = (ComposedSchema) openAPI.getComponents().getSchemas().get("Customer");
|
ComposedSchema customer = (ComposedSchema) openAPI.getComponents().getSchemas().get("Customer");
|
||||||
@ -866,15 +868,14 @@ public class InlineModelResolverTest {
|
|||||||
|
|
||||||
// Discriminators are not defined at this level in the schema doc
|
// Discriminators are not defined at this level in the schema doc
|
||||||
assertNull(customerSchemas.get(0).getDiscriminator());
|
assertNull(customerSchemas.get(0).getDiscriminator());
|
||||||
assertEquals(customerSchemas.get(1).get$ref(), "#/components/schemas/Customer_allOf");
|
assertNull(customerSchemas.get(1).get$ref());
|
||||||
assertNull(customerSchemas.get(1).getDiscriminator());
|
assertNotNull(customerSchemas.get(1).getDiscriminator());
|
||||||
|
|
||||||
// Customer -> Party where Customer defines it's own discriminator
|
// Customer -> Party where Customer defines it's own discriminator
|
||||||
assertNotNull(customerAllOf.getDiscriminator());
|
assertNotNull(customerAllOf.getDiscriminator());
|
||||||
assertEquals(customerAllOf.getDiscriminator().getPropertyName(), "customer_type");
|
assertEquals(customerAllOf.getDiscriminator().getPropertyName(), "customer_type");
|
||||||
assertEquals(customerAllOf.getRequired().get(0), "customer_type");
|
assertEquals(customerAllOf.getRequired().get(0), "customer_type");
|
||||||
|
|
||||||
|
|
||||||
// Person
|
// Person
|
||||||
ComposedSchema person = (ComposedSchema) openAPI.getComponents().getSchemas().get("Person");
|
ComposedSchema person = (ComposedSchema) openAPI.getComponents().getSchemas().get("Person");
|
||||||
List<Schema> personSchemas = person.getAllOf();
|
List<Schema> personSchemas = person.getAllOf();
|
||||||
@ -883,25 +884,26 @@ public class InlineModelResolverTest {
|
|||||||
// Discriminators are not defined at this level in the schema doc
|
// Discriminators are not defined at this level in the schema doc
|
||||||
assertEquals(personSchemas.get(0).get$ref(), "#/components/schemas/Customer");
|
assertEquals(personSchemas.get(0).get$ref(), "#/components/schemas/Customer");
|
||||||
assertNull(personSchemas.get(0).getDiscriminator());
|
assertNull(personSchemas.get(0).getDiscriminator());
|
||||||
assertEquals(personSchemas.get(1).get$ref(), "#/components/schemas/Person_allOf");
|
assertNull(personSchemas.get(1).get$ref());
|
||||||
assertNull(personSchemas.get(1).getDiscriminator());
|
assertNull(personSchemas.get(1).getDiscriminator());
|
||||||
|
assertEquals(2, personSchemas.get(1).getProperties().size());
|
||||||
|
|
||||||
// Person -> Customer -> Party, so discriminator is not at this level
|
// Person -> Customer -> Party, so discriminator is not at this level
|
||||||
assertNull(person.getDiscriminator());
|
assertNull(person.getDiscriminator());
|
||||||
assertEquals(person.getExtensions().get("x-discriminator-value"), "person");
|
assertEquals(person.getExtensions().get("x-discriminator-value"), "person");
|
||||||
assertNull(personAllOf.getDiscriminator());
|
assertNull(personAllOf.getDiscriminator());
|
||||||
|
|
||||||
|
|
||||||
// Organization
|
// Organization
|
||||||
ComposedSchema organization = (ComposedSchema) openAPI.getComponents().getSchemas().get("Organization");
|
ComposedSchema organization = (ComposedSchema) openAPI.getComponents().getSchemas().get("Organization");
|
||||||
List<Schema> organizationSchemas = organization.getAllOf();
|
List<Schema> organizationSchemas = organization.getAllOf();
|
||||||
Schema organizationAllOf = ModelUtils.getReferencedSchema(openAPI, organizationSchemas.get(1));
|
Schema organizationAllOf = organizationSchemas.get(1); // get the inline child schema directly
|
||||||
|
|
||||||
// Discriminators are not defined at this level in the schema doc
|
// Discriminators are not defined at this level in the schema doc
|
||||||
assertEquals(organizationSchemas.get(0).get$ref(), "#/components/schemas/Customer");
|
assertEquals(organizationSchemas.get(0).get$ref(), "#/components/schemas/Customer");
|
||||||
assertNull(organizationSchemas.get(0).getDiscriminator());
|
assertNull(organizationSchemas.get(0).getDiscriminator());
|
||||||
assertEquals(organizationSchemas.get(1).get$ref(), "#/components/schemas/Organization_allOf");
|
assertNotNull(organizationAllOf);
|
||||||
assertNull(organizationSchemas.get(1).getDiscriminator());
|
assertNull(organizationAllOf.getDiscriminator());
|
||||||
|
assertEquals(1, organizationAllOf.getProperties().size());
|
||||||
|
|
||||||
// Organization -> Customer -> Party, so discriminator is not at this level
|
// Organization -> Customer -> Party, so discriminator is not at this level
|
||||||
assertNull(organizationAllOf.getDiscriminator());
|
assertNull(organizationAllOf.getDiscriminator());
|
||||||
@ -1097,7 +1099,9 @@ public class InlineModelResolverTest {
|
|||||||
//assertEquals("#/components/schemas/resolveInlineRequestBodyAllOf_request", requestBodyReference.get$ref());
|
//assertEquals("#/components/schemas/resolveInlineRequestBodyAllOf_request", requestBodyReference.get$ref());
|
||||||
|
|
||||||
ComposedSchema allOfModel = (ComposedSchema) openAPI.getComponents().getSchemas().get("resolveInlineRequestBodyAllOf_request");
|
ComposedSchema allOfModel = (ComposedSchema) openAPI.getComponents().getSchemas().get("resolveInlineRequestBodyAllOf_request");
|
||||||
assertEquals("#/components/schemas/resolveInlineRequestBody_request", allOfModel.getAllOf().get(0).get$ref());
|
assertEquals(null, allOfModel.getAllOf().get(0).get$ref());
|
||||||
|
assertEquals(2, allOfModel.getAllOf().get(0).getProperties().size());
|
||||||
|
|
||||||
//Schema allOfModel = ModelUtils.getReferencedSchema(openAPI, requestBodyReference.get$ref());
|
//Schema allOfModel = ModelUtils.getReferencedSchema(openAPI, requestBodyReference.get$ref());
|
||||||
|
|
||||||
//RequestBody referencedRequestBody = ModelUtils.getReferencedRequestBody(openAPI, requestBodyReference);
|
//RequestBody referencedRequestBody = ModelUtils.getReferencedRequestBody(openAPI, requestBodyReference);
|
||||||
|
@ -517,13 +517,11 @@ public class JavaClientCodegenTest {
|
|||||||
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
|
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
|
||||||
List<File> files = generator.opts(clientOptInput).generate();
|
List<File> files = generator.opts(clientOptInput).generate();
|
||||||
|
|
||||||
Assert.assertEquals(files.size(), 162);
|
Assert.assertEquals(files.size(), 153);
|
||||||
validateJavaSourceFiles(files);
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Dog.java"),
|
TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Dog.java"),
|
||||||
"import xyz.abcdef.invoker.JSON;");
|
"import xyz.abcdef.invoker.JSON;");
|
||||||
TestUtils.assertFileNotContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/DogAllOf.java"),
|
|
||||||
"import xyz.abcdef.invoker.JSON;");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -1788,7 +1786,7 @@ public class JavaClientCodegenTest {
|
|||||||
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
|
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
|
||||||
List<File> files = generator.opts(clientOptInput).generate();
|
List<File> files = generator.opts(clientOptInput).generate();
|
||||||
|
|
||||||
Assert.assertEquals(files.size(), 33);
|
Assert.assertEquals(files.size(), 24);
|
||||||
validateJavaSourceFiles(files);
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Child.java"),
|
TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Child.java"),
|
||||||
|
@ -28,8 +28,9 @@ public class KotlinJvmVolleyModelCodegenTest {
|
|||||||
|
|
||||||
String outputPath = checkModel(codegen, false);
|
String outputPath = checkModel(codegen, false);
|
||||||
|
|
||||||
assertFileContains(Paths.get(outputPath + "/src/main/java/models/room/BigDogRoomModel.kt"), "toApiModel()");
|
// TODO need revision on how kotlin client generator handles allOf ($ref vs inline)
|
||||||
assertFileContains(Paths.get(outputPath + "/src/main/java/models/BigDog.kt"), "toRoomModel()");
|
//assertFileContains(Paths.get(outputPath + "/src/main/java/models/room/BigDogRoomModel.kt"), "toApiModel()");
|
||||||
|
//assertFileContains(Paths.get(outputPath + "/src/main/java/models/BigDog.kt"), "toRoomModel()");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -60,7 +60,6 @@ public class ModelUtilsTest {
|
|||||||
"SomeObj17",
|
"SomeObj17",
|
||||||
"SomeObj18",
|
"SomeObj18",
|
||||||
"Common18",
|
"Common18",
|
||||||
"SomeObj18_allOf",
|
|
||||||
"_some_p19_patch_request",
|
"_some_p19_patch_request",
|
||||||
"Obj19ByAge",
|
"Obj19ByAge",
|
||||||
"Obj19ByType",
|
"Obj19ByType",
|
||||||
@ -95,9 +94,7 @@ public class ModelUtilsTest {
|
|||||||
"UnusedObj4",
|
"UnusedObj4",
|
||||||
"Parent29",
|
"Parent29",
|
||||||
"AChild29",
|
"AChild29",
|
||||||
"BChild29",
|
"BChild29"
|
||||||
"AChild29_allOf",
|
|
||||||
"BChild29_allOf"
|
|
||||||
);
|
);
|
||||||
Assert.assertEquals(unusedSchemas.size(), expectedUnusedSchemas.size());
|
Assert.assertEquals(unusedSchemas.size(), expectedUnusedSchemas.size());
|
||||||
Assert.assertTrue(unusedSchemas.containsAll(expectedUnusedSchemas));
|
Assert.assertTrue(unusedSchemas.containsAll(expectedUnusedSchemas));
|
||||||
|
@ -9,7 +9,6 @@ docs/Bird.md
|
|||||||
docs/BodyApi.md
|
docs/BodyApi.md
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DataQuery.md
|
docs/DataQuery.md
|
||||||
docs/DataQueryAllOf.md
|
|
||||||
docs/DefaultValue.md
|
docs/DefaultValue.md
|
||||||
docs/FormApi.md
|
docs/FormApi.md
|
||||||
docs/HeaderApi.md
|
docs/HeaderApi.md
|
||||||
@ -52,7 +51,6 @@ src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
|
|||||||
src/main/java/org/openapitools/client/model/Bird.java
|
src/main/java/org/openapitools/client/model/Bird.java
|
||||||
src/main/java/org/openapitools/client/model/Category.java
|
src/main/java/org/openapitools/client/model/Category.java
|
||||||
src/main/java/org/openapitools/client/model/DataQuery.java
|
src/main/java/org/openapitools/client/model/DataQuery.java
|
||||||
src/main/java/org/openapitools/client/model/DataQueryAllOf.java
|
|
||||||
src/main/java/org/openapitools/client/model/DefaultValue.java
|
src/main/java/org/openapitools/client/model/DefaultValue.java
|
||||||
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
||||||
src/main/java/org/openapitools/client/model/Pet.java
|
src/main/java/org/openapitools/client/model/Pet.java
|
||||||
|
@ -129,7 +129,6 @@ Class | Method | HTTP request | Description
|
|||||||
- [Bird](docs/Bird.md)
|
- [Bird](docs/Bird.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DataQuery](docs/DataQuery.md)
|
- [DataQuery](docs/DataQuery.md)
|
||||||
- [DataQueryAllOf](docs/DataQueryAllOf.md)
|
|
||||||
- [DefaultValue](docs/DefaultValue.md)
|
- [DefaultValue](docs/DefaultValue.md)
|
||||||
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
|
@ -610,7 +610,19 @@ components:
|
|||||||
x-parent: true
|
x-parent: true
|
||||||
DataQuery:
|
DataQuery:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/DataQuery_allOf'
|
- properties:
|
||||||
|
suffix:
|
||||||
|
description: test suffix
|
||||||
|
type: string
|
||||||
|
text:
|
||||||
|
description: Some text containing white spaces
|
||||||
|
example: Some text
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
description: A date
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
- $ref: '#/components/schemas/Query'
|
- $ref: '#/components/schemas/Query'
|
||||||
NumberPropertiesOnly:
|
NumberPropertiesOnly:
|
||||||
properties:
|
properties:
|
||||||
@ -645,19 +657,4 @@ components:
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Bird'
|
- $ref: '#/components/schemas/Bird'
|
||||||
- $ref: '#/components/schemas/Category'
|
- $ref: '#/components/schemas/Category'
|
||||||
DataQuery_allOf:
|
|
||||||
properties:
|
|
||||||
suffix:
|
|
||||||
description: test suffix
|
|
||||||
type: string
|
|
||||||
text:
|
|
||||||
description: Some text containing white spaces
|
|
||||||
example: Some text
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
description: A date
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# DataQueryAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Name | Type | Description | Notes |
|
|
||||||
|------------ | ------------- | ------------- | -------------|
|
|
||||||
|**suffix** | **String** | test suffix | [optional] |
|
|
||||||
|**text** | **String** | Some text containing white spaces | [optional] |
|
|
||||||
|**date** | **OffsetDateTime** | A date | [optional] |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -217,6 +217,30 @@ public class DataQuery extends Query {
|
|||||||
|
|
||||||
StringJoiner joiner = new StringJoiner("&");
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `id` to the URL query string
|
||||||
|
if (getId() != null) {
|
||||||
|
try {
|
||||||
|
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
// Should never happen, UTF-8 is always supported
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add `outcomes` to the URL query string
|
||||||
|
if (getOutcomes() != null) {
|
||||||
|
for (int i = 0; i < getOutcomes().size(); i++) {
|
||||||
|
try {
|
||||||
|
joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix,
|
||||||
|
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
|
||||||
|
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20")));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
// Should never happen, UTF-8 is always supported
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// add `suffix` to the URL query string
|
// add `suffix` to the URL query string
|
||||||
if (getSuffix() != null) {
|
if (getSuffix() != null) {
|
||||||
try {
|
try {
|
||||||
@ -247,30 +271,6 @@ public class DataQuery extends Query {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add `id` to the URL query string
|
|
||||||
if (getId() != null) {
|
|
||||||
try {
|
|
||||||
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// Should never happen, UTF-8 is always supported
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `outcomes` to the URL query string
|
|
||||||
if (getOutcomes() != null) {
|
|
||||||
for (int i = 0; i < getOutcomes().size(); i++) {
|
|
||||||
try {
|
|
||||||
joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix,
|
|
||||||
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
|
|
||||||
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20")));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// Should never happen, UTF-8 is always supported
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return joiner.toString();
|
return joiner.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,237 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.StringJoiner;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_SUFFIX,
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_TEXT,
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_DATE
|
|
||||||
})
|
|
||||||
@JsonTypeName("DataQuery_allOf")
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class DataQueryAllOf {
|
|
||||||
public static final String JSON_PROPERTY_SUFFIX = "suffix";
|
|
||||||
private String suffix;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_TEXT = "text";
|
|
||||||
private String text;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_DATE = "date";
|
|
||||||
private OffsetDateTime date;
|
|
||||||
|
|
||||||
public DataQueryAllOf() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataQueryAllOf suffix(String suffix) {
|
|
||||||
|
|
||||||
this.suffix = suffix;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test suffix
|
|
||||||
* @return suffix
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_SUFFIX)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public String getSuffix() {
|
|
||||||
return suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_SUFFIX)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setSuffix(String suffix) {
|
|
||||||
this.suffix = suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf text(String text) {
|
|
||||||
|
|
||||||
this.text = text;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Some text containing white spaces
|
|
||||||
* @return text
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_TEXT)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_TEXT)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setText(String text) {
|
|
||||||
this.text = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf date(OffsetDateTime date) {
|
|
||||||
|
|
||||||
this.date = date;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A date
|
|
||||||
* @return date
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_DATE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public OffsetDateTime getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_DATE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setDate(OffsetDateTime date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o;
|
|
||||||
return Objects.equals(this.suffix, dataQueryAllOf.suffix) &&
|
|
||||||
Objects.equals(this.text, dataQueryAllOf.text) &&
|
|
||||||
Objects.equals(this.date, dataQueryAllOf.date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(suffix, text, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("class DataQueryAllOf {\n");
|
|
||||||
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
|
|
||||||
sb.append(" text: ").append(toIndentedString(text)).append("\n");
|
|
||||||
sb.append(" date: ").append(toIndentedString(date)).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(Object o) {
|
|
||||||
if (o == null) {
|
|
||||||
return "null";
|
|
||||||
}
|
|
||||||
return o.toString().replace("\n", "\n ");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the instance into URL query string.
|
|
||||||
*
|
|
||||||
* @return URL query string
|
|
||||||
*/
|
|
||||||
public String toUrlQueryString() {
|
|
||||||
return toUrlQueryString(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the instance into URL query string.
|
|
||||||
*
|
|
||||||
* @param prefix prefix of the query string
|
|
||||||
* @return URL query string
|
|
||||||
*/
|
|
||||||
public String toUrlQueryString(String prefix) {
|
|
||||||
String suffix = "";
|
|
||||||
String containerSuffix = "";
|
|
||||||
String containerPrefix = "";
|
|
||||||
if (prefix == null) {
|
|
||||||
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
|
||||||
prefix = "";
|
|
||||||
} else {
|
|
||||||
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
|
||||||
prefix = prefix + "[";
|
|
||||||
suffix = "]";
|
|
||||||
containerSuffix = "]";
|
|
||||||
containerPrefix = "[";
|
|
||||||
}
|
|
||||||
|
|
||||||
StringJoiner joiner = new StringJoiner("&");
|
|
||||||
|
|
||||||
// add `suffix` to the URL query string
|
|
||||||
if (getSuffix() != null) {
|
|
||||||
try {
|
|
||||||
joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), "UTF-8").replaceAll("\\+", "%20")));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// Should never happen, UTF-8 is always supported
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `text` to the URL query string
|
|
||||||
if (getText() != null) {
|
|
||||||
try {
|
|
||||||
joiner.add(String.format("%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), "UTF-8").replaceAll("\\+", "%20")));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// Should never happen, UTF-8 is always supported
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `date` to the URL query string
|
|
||||||
if (getDate() != null) {
|
|
||||||
try {
|
|
||||||
joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), "UTF-8").replaceAll("\\+", "%20")));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// Should never happen, UTF-8 is always supported
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return joiner.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -120,7 +120,7 @@ public class CustomTest {
|
|||||||
|
|
||||||
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
||||||
org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response);
|
org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response);
|
||||||
Assert.assertEquals("/query/style_form/explode_true/object/allOf?text=Hello%20World&id=3487&outcomes=SKIPPED&outcomes=FAILURE", p.path);
|
Assert.assertEquals("/query/style_form/explode_true/object/allOf?id=3487&outcomes=SKIPPED&outcomes=FAILURE&text=Hello%20World", p.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
public class DataQueryAllOfTest {
|
|
||||||
private final DataQueryAllOf model = new DataQueryAllOf();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testDataQueryAllOf() {
|
|
||||||
// TODO: test DataQueryAllOf
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'text'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void textTest() {
|
|
||||||
// TODO: test text
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'date'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void dateTest() {
|
|
||||||
// TODO: test date
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -31,7 +31,6 @@ src/main/java/org/openapitools/client/model/ApiResponse.java
|
|||||||
src/main/java/org/openapitools/client/model/Bird.java
|
src/main/java/org/openapitools/client/model/Bird.java
|
||||||
src/main/java/org/openapitools/client/model/Category.java
|
src/main/java/org/openapitools/client/model/Category.java
|
||||||
src/main/java/org/openapitools/client/model/DataQuery.java
|
src/main/java/org/openapitools/client/model/DataQuery.java
|
||||||
src/main/java/org/openapitools/client/model/DataQueryAllOf.java
|
|
||||||
src/main/java/org/openapitools/client/model/DefaultValue.java
|
src/main/java/org/openapitools/client/model/DefaultValue.java
|
||||||
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
||||||
src/main/java/org/openapitools/client/model/Pet.java
|
src/main/java/org/openapitools/client/model/Pet.java
|
||||||
|
@ -610,7 +610,19 @@ components:
|
|||||||
x-parent: true
|
x-parent: true
|
||||||
DataQuery:
|
DataQuery:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/DataQuery_allOf'
|
- properties:
|
||||||
|
suffix:
|
||||||
|
description: test suffix
|
||||||
|
type: string
|
||||||
|
text:
|
||||||
|
description: Some text containing white spaces
|
||||||
|
example: Some text
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
description: A date
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
- $ref: '#/components/schemas/Query'
|
- $ref: '#/components/schemas/Query'
|
||||||
NumberPropertiesOnly:
|
NumberPropertiesOnly:
|
||||||
properties:
|
properties:
|
||||||
@ -645,19 +657,4 @@ components:
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Bird'
|
- $ref: '#/components/schemas/Bird'
|
||||||
- $ref: '#/components/schemas/Category'
|
- $ref: '#/components/schemas/Category'
|
||||||
DataQuery_allOf:
|
|
||||||
properties:
|
|
||||||
suffix:
|
|
||||||
description: test suffix
|
|
||||||
type: string
|
|
||||||
text:
|
|
||||||
description: Some text containing white spaces
|
|
||||||
example: Some text
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
description: A date
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
|
|
||||||
|
@ -1,153 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import com.google.gson.TypeAdapter;
|
|
||||||
import com.google.gson.annotations.JsonAdapter;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
import com.google.gson.stream.JsonReader;
|
|
||||||
import com.google.gson.stream.JsonWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class DataQueryAllOf {
|
|
||||||
public static final String SERIALIZED_NAME_SUFFIX = "suffix";
|
|
||||||
@SerializedName(SERIALIZED_NAME_SUFFIX)
|
|
||||||
private String suffix;
|
|
||||||
|
|
||||||
public static final String SERIALIZED_NAME_TEXT = "text";
|
|
||||||
@SerializedName(SERIALIZED_NAME_TEXT)
|
|
||||||
private String text;
|
|
||||||
|
|
||||||
public static final String SERIALIZED_NAME_DATE = "date";
|
|
||||||
@SerializedName(SERIALIZED_NAME_DATE)
|
|
||||||
private OffsetDateTime date;
|
|
||||||
|
|
||||||
public DataQueryAllOf() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataQueryAllOf suffix(String suffix) {
|
|
||||||
|
|
||||||
this.suffix = suffix;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test suffix
|
|
||||||
* @return suffix
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
|
|
||||||
public String getSuffix() {
|
|
||||||
return suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setSuffix(String suffix) {
|
|
||||||
this.suffix = suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf text(String text) {
|
|
||||||
|
|
||||||
this.text = text;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Some text containing white spaces
|
|
||||||
* @return text
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
|
|
||||||
public String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setText(String text) {
|
|
||||||
this.text = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf date(OffsetDateTime date) {
|
|
||||||
|
|
||||||
this.date = date;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A date
|
|
||||||
* @return date
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
|
|
||||||
public OffsetDateTime getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setDate(OffsetDateTime date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o;
|
|
||||||
return Objects.equals(this.suffix, dataQueryAllOf.suffix) &&
|
|
||||||
Objects.equals(this.text, dataQueryAllOf.text) &&
|
|
||||||
Objects.equals(this.date, dataQueryAllOf.date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(suffix, text, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("class DataQueryAllOf {\n");
|
|
||||||
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
|
|
||||||
sb.append(" text: ").append(toIndentedString(text)).append("\n");
|
|
||||||
sb.append(" date: ").append(toIndentedString(date)).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(Object o) {
|
|
||||||
if (o == null) {
|
|
||||||
return "null";
|
|
||||||
}
|
|
||||||
return o.toString().replace("\n", "\n ");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import com.google.gson.TypeAdapter;
|
|
||||||
import com.google.gson.annotations.JsonAdapter;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
import com.google.gson.stream.JsonReader;
|
|
||||||
import com.google.gson.stream.JsonWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
class DataQueryAllOfTest {
|
|
||||||
private final DataQueryAllOf model = new DataQueryAllOf();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
void testDataQueryAllOf() {
|
|
||||||
// TODO: test DataQueryAllOf
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'text'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
void textTest() {
|
|
||||||
// TODO: test text
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'date'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
void dateTest() {
|
|
||||||
// TODO: test date
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -9,7 +9,6 @@ docs/Bird.md
|
|||||||
docs/BodyApi.md
|
docs/BodyApi.md
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DataQuery.md
|
docs/DataQuery.md
|
||||||
docs/DataQueryAllOf.md
|
|
||||||
docs/DefaultValue.md
|
docs/DefaultValue.md
|
||||||
docs/FormApi.md
|
docs/FormApi.md
|
||||||
docs/HeaderApi.md
|
docs/HeaderApi.md
|
||||||
@ -49,7 +48,6 @@ src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
|||||||
src/main/java/org/openapitools/client/model/Bird.java
|
src/main/java/org/openapitools/client/model/Bird.java
|
||||||
src/main/java/org/openapitools/client/model/Category.java
|
src/main/java/org/openapitools/client/model/Category.java
|
||||||
src/main/java/org/openapitools/client/model/DataQuery.java
|
src/main/java/org/openapitools/client/model/DataQuery.java
|
||||||
src/main/java/org/openapitools/client/model/DataQueryAllOf.java
|
|
||||||
src/main/java/org/openapitools/client/model/DefaultValue.java
|
src/main/java/org/openapitools/client/model/DefaultValue.java
|
||||||
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
||||||
src/main/java/org/openapitools/client/model/Pet.java
|
src/main/java/org/openapitools/client/model/Pet.java
|
||||||
|
@ -145,7 +145,6 @@ Class | Method | HTTP request | Description
|
|||||||
- [Bird](docs/Bird.md)
|
- [Bird](docs/Bird.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DataQuery](docs/DataQuery.md)
|
- [DataQuery](docs/DataQuery.md)
|
||||||
- [DataQueryAllOf](docs/DataQueryAllOf.md)
|
|
||||||
- [DefaultValue](docs/DefaultValue.md)
|
- [DefaultValue](docs/DefaultValue.md)
|
||||||
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
|
@ -610,7 +610,19 @@ components:
|
|||||||
x-parent: true
|
x-parent: true
|
||||||
DataQuery:
|
DataQuery:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/DataQuery_allOf'
|
- properties:
|
||||||
|
suffix:
|
||||||
|
description: test suffix
|
||||||
|
type: string
|
||||||
|
text:
|
||||||
|
description: Some text containing white spaces
|
||||||
|
example: Some text
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
description: A date
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
- $ref: '#/components/schemas/Query'
|
- $ref: '#/components/schemas/Query'
|
||||||
NumberPropertiesOnly:
|
NumberPropertiesOnly:
|
||||||
properties:
|
properties:
|
||||||
@ -645,19 +657,4 @@ components:
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Bird'
|
- $ref: '#/components/schemas/Bird'
|
||||||
- $ref: '#/components/schemas/Category'
|
- $ref: '#/components/schemas/Category'
|
||||||
DataQuery_allOf:
|
|
||||||
properties:
|
|
||||||
suffix:
|
|
||||||
description: test suffix
|
|
||||||
type: string
|
|
||||||
text:
|
|
||||||
description: Some text containing white spaces
|
|
||||||
example: Some text
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
description: A date
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# DataQueryAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Name | Type | Description | Notes |
|
|
||||||
|------------ | ------------- | ------------- | -------------|
|
|
||||||
|**suffix** | **String** | test suffix | [optional] |
|
|
||||||
|**text** | **String** | Some text containing white spaces | [optional] |
|
|
||||||
|**date** | **OffsetDateTime** | A date | [optional] |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -219,6 +219,20 @@ public class DataQuery extends Query {
|
|||||||
|
|
||||||
StringJoiner joiner = new StringJoiner("&");
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `id` to the URL query string
|
||||||
|
if (getId() != null) {
|
||||||
|
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||||
|
}
|
||||||
|
|
||||||
|
// add `outcomes` to the URL query string
|
||||||
|
if (getOutcomes() != null) {
|
||||||
|
for (int i = 0; i < getOutcomes().size(); i++) {
|
||||||
|
joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix,
|
||||||
|
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
|
||||||
|
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// add `suffix` to the URL query string
|
// add `suffix` to the URL query string
|
||||||
if (getSuffix() != null) {
|
if (getSuffix() != null) {
|
||||||
joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||||
@ -234,20 +248,6 @@ public class DataQuery extends Query {
|
|||||||
joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// add `id` to the URL query string
|
|
||||||
if (getId() != null) {
|
|
||||||
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `outcomes` to the URL query string
|
|
||||||
if (getOutcomes() != null) {
|
|
||||||
for (int i = 0; i < getOutcomes().size(); i++) {
|
|
||||||
joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix,
|
|
||||||
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
|
|
||||||
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return joiner.toString();
|
return joiner.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,223 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* 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.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.StringJoiner;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@JsonPropertyOrder({
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_SUFFIX,
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_TEXT,
|
|
||||||
DataQueryAllOf.JSON_PROPERTY_DATE
|
|
||||||
})
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class DataQueryAllOf {
|
|
||||||
public static final String JSON_PROPERTY_SUFFIX = "suffix";
|
|
||||||
private String suffix;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_TEXT = "text";
|
|
||||||
private String text;
|
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_DATE = "date";
|
|
||||||
private OffsetDateTime date;
|
|
||||||
|
|
||||||
public DataQueryAllOf() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataQueryAllOf suffix(String suffix) {
|
|
||||||
this.suffix = suffix;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test suffix
|
|
||||||
* @return suffix
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_SUFFIX)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public String getSuffix() {
|
|
||||||
return suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_SUFFIX)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setSuffix(String suffix) {
|
|
||||||
this.suffix = suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf text(String text) {
|
|
||||||
this.text = text;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Some text containing white spaces
|
|
||||||
* @return text
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_TEXT)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_TEXT)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setText(String text) {
|
|
||||||
this.text = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf date(OffsetDateTime date) {
|
|
||||||
this.date = date;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A date
|
|
||||||
* @return date
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
@JsonProperty(JSON_PROPERTY_DATE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
|
|
||||||
public OffsetDateTime getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonProperty(JSON_PROPERTY_DATE)
|
|
||||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
|
||||||
public void setDate(OffsetDateTime date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if this DataQuery_allOf object is equal to o.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o;
|
|
||||||
return Objects.equals(this.suffix, dataQueryAllOf.suffix) &&
|
|
||||||
Objects.equals(this.text, dataQueryAllOf.text) &&
|
|
||||||
Objects.equals(this.date, dataQueryAllOf.date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(suffix, text, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("class DataQueryAllOf {\n");
|
|
||||||
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
|
|
||||||
sb.append(" text: ").append(toIndentedString(text)).append("\n");
|
|
||||||
sb.append(" date: ").append(toIndentedString(date)).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(Object o) {
|
|
||||||
if (o == null) {
|
|
||||||
return "null";
|
|
||||||
}
|
|
||||||
return o.toString().replace("\n", "\n ");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the instance into URL query string.
|
|
||||||
*
|
|
||||||
* @return URL query string
|
|
||||||
*/
|
|
||||||
public String toUrlQueryString() {
|
|
||||||
return toUrlQueryString(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the instance into URL query string.
|
|
||||||
*
|
|
||||||
* @param prefix prefix of the query string
|
|
||||||
* @return URL query string
|
|
||||||
*/
|
|
||||||
public String toUrlQueryString(String prefix) {
|
|
||||||
String suffix = "";
|
|
||||||
String containerSuffix = "";
|
|
||||||
String containerPrefix = "";
|
|
||||||
if (prefix == null) {
|
|
||||||
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
|
||||||
prefix = "";
|
|
||||||
} else {
|
|
||||||
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
|
||||||
prefix = prefix + "[";
|
|
||||||
suffix = "]";
|
|
||||||
containerSuffix = "]";
|
|
||||||
containerPrefix = "[";
|
|
||||||
}
|
|
||||||
|
|
||||||
StringJoiner joiner = new StringJoiner("&");
|
|
||||||
|
|
||||||
// add `suffix` to the URL query string
|
|
||||||
if (getSuffix() != null) {
|
|
||||||
joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `text` to the URL query string
|
|
||||||
if (getText() != null) {
|
|
||||||
joiner.add(String.format("%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
|
||||||
}
|
|
||||||
|
|
||||||
// add `date` to the URL query string
|
|
||||||
if (getDate() != null) {
|
|
||||||
joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
|
||||||
}
|
|
||||||
|
|
||||||
return joiner.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -88,7 +88,7 @@ public class CustomTest {
|
|||||||
|
|
||||||
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
||||||
org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response);
|
org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response);
|
||||||
Assert.assertEquals("/query/style_form/explode_true/object/allOf?text=Hello%20World&id=3487&outcomes=SKIPPED&outcomes=FAILURE", p.path);
|
Assert.assertEquals("/query/style_form/explode_true/object/allOf?id=3487&outcomes=SKIPPED&outcomes=FAILURE&text=Hello%20World", p.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
public class DataQueryAllOfTest {
|
|
||||||
private final DataQueryAllOf model = new DataQueryAllOf();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testDataQueryAllOf() {
|
|
||||||
// TODO: test DataQueryAllOf
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'text'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void textTest() {
|
|
||||||
// TODO: test text
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'date'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void dateTest() {
|
|
||||||
// TODO: test date
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -9,7 +9,6 @@ docs/Bird.md
|
|||||||
docs/BodyApi.md
|
docs/BodyApi.md
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DataQuery.md
|
docs/DataQuery.md
|
||||||
docs/DataQueryAllOf.md
|
|
||||||
docs/DefaultValue.md
|
docs/DefaultValue.md
|
||||||
docs/FormApi.md
|
docs/FormApi.md
|
||||||
docs/HeaderApi.md
|
docs/HeaderApi.md
|
||||||
@ -57,7 +56,6 @@ src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
|||||||
src/main/java/org/openapitools/client/model/Bird.java
|
src/main/java/org/openapitools/client/model/Bird.java
|
||||||
src/main/java/org/openapitools/client/model/Category.java
|
src/main/java/org/openapitools/client/model/Category.java
|
||||||
src/main/java/org/openapitools/client/model/DataQuery.java
|
src/main/java/org/openapitools/client/model/DataQuery.java
|
||||||
src/main/java/org/openapitools/client/model/DataQueryAllOf.java
|
|
||||||
src/main/java/org/openapitools/client/model/DefaultValue.java
|
src/main/java/org/openapitools/client/model/DefaultValue.java
|
||||||
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java
|
||||||
src/main/java/org/openapitools/client/model/Pet.java
|
src/main/java/org/openapitools/client/model/Pet.java
|
||||||
|
@ -136,7 +136,6 @@ Class | Method | HTTP request | Description
|
|||||||
- [Bird](docs/Bird.md)
|
- [Bird](docs/Bird.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DataQuery](docs/DataQuery.md)
|
- [DataQuery](docs/DataQuery.md)
|
||||||
- [DataQueryAllOf](docs/DataQueryAllOf.md)
|
|
||||||
- [DefaultValue](docs/DefaultValue.md)
|
- [DefaultValue](docs/DefaultValue.md)
|
||||||
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
|
@ -610,7 +610,19 @@ components:
|
|||||||
x-parent: true
|
x-parent: true
|
||||||
DataQuery:
|
DataQuery:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/DataQuery_allOf'
|
- properties:
|
||||||
|
suffix:
|
||||||
|
description: test suffix
|
||||||
|
type: string
|
||||||
|
text:
|
||||||
|
description: Some text containing white spaces
|
||||||
|
example: Some text
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
description: A date
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
- $ref: '#/components/schemas/Query'
|
- $ref: '#/components/schemas/Query'
|
||||||
NumberPropertiesOnly:
|
NumberPropertiesOnly:
|
||||||
properties:
|
properties:
|
||||||
@ -645,19 +657,4 @@ components:
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Bird'
|
- $ref: '#/components/schemas/Bird'
|
||||||
- $ref: '#/components/schemas/Category'
|
- $ref: '#/components/schemas/Category'
|
||||||
DataQuery_allOf:
|
|
||||||
properties:
|
|
||||||
suffix:
|
|
||||||
description: test suffix
|
|
||||||
type: string
|
|
||||||
text:
|
|
||||||
description: Some text containing white spaces
|
|
||||||
example: Some text
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
description: A date
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
# DataQueryAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Name | Type | Description | Notes |
|
|
||||||
|------------ | ------------- | ------------- | -------------|
|
|
||||||
|**suffix** | **String** | test suffix | [optional] |
|
|
||||||
|**text** | **String** | Some text containing white spaces | [optional] |
|
|
||||||
|**date** | **OffsetDateTime** | A date | [optional] |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -96,7 +96,6 @@ public class JSON {
|
|||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Bird.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Bird.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DataQuery.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DataQuery.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DataQueryAllOf.CustomTypeAdapterFactory());
|
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DefaultValue.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DefaultValue.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NumberPropertiesOnly.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NumberPropertiesOnly.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory());
|
||||||
|
@ -185,11 +185,11 @@ public class DataQuery extends Query {
|
|||||||
static {
|
static {
|
||||||
// a set of all properties/fields (JSON key names)
|
// a set of all properties/fields (JSON key names)
|
||||||
openapiFields = new HashSet<String>();
|
openapiFields = new HashSet<String>();
|
||||||
|
openapiFields.add("id");
|
||||||
|
openapiFields.add("outcomes");
|
||||||
openapiFields.add("suffix");
|
openapiFields.add("suffix");
|
||||||
openapiFields.add("text");
|
openapiFields.add("text");
|
||||||
openapiFields.add("date");
|
openapiFields.add("date");
|
||||||
openapiFields.add("id");
|
|
||||||
openapiFields.add("outcomes");
|
|
||||||
|
|
||||||
// a set of required properties/fields (JSON key names)
|
// a set of required properties/fields (JSON key names)
|
||||||
openapiRequiredFields = new HashSet<String>();
|
openapiRequiredFields = new HashSet<String>();
|
||||||
|
@ -1,268 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import com.google.gson.TypeAdapter;
|
|
||||||
import com.google.gson.annotations.JsonAdapter;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
import com.google.gson.stream.JsonReader;
|
|
||||||
import com.google.gson.stream.JsonWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import com.google.gson.JsonArray;
|
|
||||||
import com.google.gson.JsonDeserializationContext;
|
|
||||||
import com.google.gson.JsonDeserializer;
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.JsonParseException;
|
|
||||||
import com.google.gson.TypeAdapterFactory;
|
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
import com.google.gson.TypeAdapter;
|
|
||||||
import com.google.gson.stream.JsonReader;
|
|
||||||
import com.google.gson.stream.JsonWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.openapitools.client.JSON;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
|
||||||
public class DataQueryAllOf {
|
|
||||||
public static final String SERIALIZED_NAME_SUFFIX = "suffix";
|
|
||||||
@SerializedName(SERIALIZED_NAME_SUFFIX)
|
|
||||||
private String suffix;
|
|
||||||
|
|
||||||
public static final String SERIALIZED_NAME_TEXT = "text";
|
|
||||||
@SerializedName(SERIALIZED_NAME_TEXT)
|
|
||||||
private String text;
|
|
||||||
|
|
||||||
public static final String SERIALIZED_NAME_DATE = "date";
|
|
||||||
@SerializedName(SERIALIZED_NAME_DATE)
|
|
||||||
private OffsetDateTime date;
|
|
||||||
|
|
||||||
public DataQueryAllOf() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataQueryAllOf suffix(String suffix) {
|
|
||||||
|
|
||||||
this.suffix = suffix;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test suffix
|
|
||||||
* @return suffix
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
public String getSuffix() {
|
|
||||||
return suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setSuffix(String suffix) {
|
|
||||||
this.suffix = suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf text(String text) {
|
|
||||||
|
|
||||||
this.text = text;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Some text containing white spaces
|
|
||||||
* @return text
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
public String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setText(String text) {
|
|
||||||
this.text = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DataQueryAllOf date(OffsetDateTime date) {
|
|
||||||
|
|
||||||
this.date = date;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A date
|
|
||||||
* @return date
|
|
||||||
**/
|
|
||||||
@javax.annotation.Nullable
|
|
||||||
public OffsetDateTime getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setDate(OffsetDateTime date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o;
|
|
||||||
return Objects.equals(this.suffix, dataQueryAllOf.suffix) &&
|
|
||||||
Objects.equals(this.text, dataQueryAllOf.text) &&
|
|
||||||
Objects.equals(this.date, dataQueryAllOf.date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(suffix, text, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("class DataQueryAllOf {\n");
|
|
||||||
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
|
|
||||||
sb.append(" text: ").append(toIndentedString(text)).append("\n");
|
|
||||||
sb.append(" date: ").append(toIndentedString(date)).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(Object o) {
|
|
||||||
if (o == null) {
|
|
||||||
return "null";
|
|
||||||
}
|
|
||||||
return o.toString().replace("\n", "\n ");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static HashSet<String> openapiFields;
|
|
||||||
public static HashSet<String> openapiRequiredFields;
|
|
||||||
|
|
||||||
static {
|
|
||||||
// a set of all properties/fields (JSON key names)
|
|
||||||
openapiFields = new HashSet<String>();
|
|
||||||
openapiFields.add("suffix");
|
|
||||||
openapiFields.add("text");
|
|
||||||
openapiFields.add("date");
|
|
||||||
|
|
||||||
// a set of required properties/fields (JSON key names)
|
|
||||||
openapiRequiredFields = new HashSet<String>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validates the JSON Object and throws an exception if issues found
|
|
||||||
*
|
|
||||||
* @param jsonObj JSON Object
|
|
||||||
* @throws IOException if the JSON Object is invalid with respect to DataQueryAllOf
|
|
||||||
*/
|
|
||||||
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
|
|
||||||
if (jsonObj == null) {
|
|
||||||
if (!DataQueryAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
|
|
||||||
throw new IllegalArgumentException(String.format("The required field(s) %s in DataQueryAllOf is not found in the empty JSON string", DataQueryAllOf.openapiRequiredFields.toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();
|
|
||||||
// check to see if the JSON string contains additional fields
|
|
||||||
for (Entry<String, JsonElement> entry : entries) {
|
|
||||||
if (!DataQueryAllOf.openapiFields.contains(entry.getKey())) {
|
|
||||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataQueryAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((jsonObj.get("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) {
|
|
||||||
throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").toString()));
|
|
||||||
}
|
|
||||||
if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) {
|
|
||||||
throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
|
||||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
|
||||||
if (!DataQueryAllOf.class.isAssignableFrom(type.getRawType())) {
|
|
||||||
return null; // this class only serializes 'DataQueryAllOf' and its subtypes
|
|
||||||
}
|
|
||||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
|
||||||
final TypeAdapter<DataQueryAllOf> thisAdapter
|
|
||||||
= gson.getDelegateAdapter(this, TypeToken.get(DataQueryAllOf.class));
|
|
||||||
|
|
||||||
return (TypeAdapter<T>) new TypeAdapter<DataQueryAllOf>() {
|
|
||||||
@Override
|
|
||||||
public void write(JsonWriter out, DataQueryAllOf value) throws IOException {
|
|
||||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
|
||||||
elementAdapter.write(out, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataQueryAllOf read(JsonReader in) throws IOException {
|
|
||||||
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
|
|
||||||
validateJsonObject(jsonObj);
|
|
||||||
return thisAdapter.fromJsonTree(jsonObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
}.nullSafe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create an instance of DataQueryAllOf given an JSON string
|
|
||||||
*
|
|
||||||
* @param jsonString JSON string
|
|
||||||
* @return An instance of DataQueryAllOf
|
|
||||||
* @throws IOException if the JSON string is invalid with respect to DataQueryAllOf
|
|
||||||
*/
|
|
||||||
public static DataQueryAllOf fromJson(String jsonString) throws IOException {
|
|
||||||
return JSON.getGson().fromJson(jsonString, DataQueryAllOf.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert an instance of DataQueryAllOf to an JSON string
|
|
||||||
*
|
|
||||||
* @return JSON string
|
|
||||||
*/
|
|
||||||
public String toJson() {
|
|
||||||
return JSON.getGson().toJson(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Echo Server API
|
|
||||||
* Echo Server API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 0.1.0
|
|
||||||
* Contact: team@openapitools.org
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
package org.openapitools.client.model;
|
|
||||||
|
|
||||||
import com.google.gson.TypeAdapter;
|
|
||||||
import com.google.gson.annotations.JsonAdapter;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
import com.google.gson.stream.JsonReader;
|
|
||||||
import com.google.gson.stream.JsonWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
public class DataQueryAllOfTest {
|
|
||||||
private final DataQueryAllOf model = new DataQueryAllOf();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model tests for DataQueryAllOf
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testDataQueryAllOf() {
|
|
||||||
// TODO: test DataQueryAllOf
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'text'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void textTest() {
|
|
||||||
// TODO: test text
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the property 'date'
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void dateTest() {
|
|
||||||
// TODO: test date
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -7,7 +7,6 @@ docs/Bird.md
|
|||||||
docs/BodyApi.md
|
docs/BodyApi.md
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DataQuery.md
|
docs/DataQuery.md
|
||||||
docs/DataQueryAllOf.md
|
|
||||||
docs/DefaultValue.md
|
docs/DefaultValue.md
|
||||||
docs/FormApi.md
|
docs/FormApi.md
|
||||||
docs/HeaderApi.md
|
docs/HeaderApi.md
|
||||||
@ -36,7 +35,6 @@ openapi_client/models/__init__.py
|
|||||||
openapi_client/models/bird.py
|
openapi_client/models/bird.py
|
||||||
openapi_client/models/category.py
|
openapi_client/models/category.py
|
||||||
openapi_client/models/data_query.py
|
openapi_client/models/data_query.py
|
||||||
openapi_client/models/data_query_all_of.py
|
|
||||||
openapi_client/models/default_value.py
|
openapi_client/models/default_value.py
|
||||||
openapi_client/models/number_properties_only.py
|
openapi_client/models/number_properties_only.py
|
||||||
openapi_client/models/pet.py
|
openapi_client/models/pet.py
|
||||||
|
@ -108,7 +108,6 @@ Class | Method | HTTP request | Description
|
|||||||
- [Bird](docs/Bird.md)
|
- [Bird](docs/Bird.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DataQuery](docs/DataQuery.md)
|
- [DataQuery](docs/DataQuery.md)
|
||||||
- [DataQueryAllOf](docs/DataQueryAllOf.md)
|
|
||||||
- [DefaultValue](docs/DefaultValue.md)
|
- [DefaultValue](docs/DefaultValue.md)
|
||||||
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
- [NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
# DataQueryAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**suffix** | **str** | test suffix | [optional]
|
|
||||||
**text** | **str** | Some text containing white spaces | [optional]
|
|
||||||
**var_date** | **datetime** | A date | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from openapi_client.models.data_query_all_of import DataQueryAllOf
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of DataQueryAllOf from a JSON string
|
|
||||||
data_query_all_of_instance = DataQueryAllOf.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print DataQueryAllOf.to_json()
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
data_query_all_of_dict = data_query_all_of_instance.to_dict()
|
|
||||||
# create an instance of DataQueryAllOf from a dict
|
|
||||||
data_query_all_of_form_dict = data_query_all_of.from_dict(data_query_all_of_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -39,7 +39,6 @@ from openapi_client.exceptions import ApiException
|
|||||||
from openapi_client.models.bird import Bird
|
from openapi_client.models.bird import Bird
|
||||||
from openapi_client.models.category import Category
|
from openapi_client.models.category import Category
|
||||||
from openapi_client.models.data_query import DataQuery
|
from openapi_client.models.data_query import DataQuery
|
||||||
from openapi_client.models.data_query_all_of import DataQueryAllOf
|
|
||||||
from openapi_client.models.default_value import DefaultValue
|
from openapi_client.models.default_value import DefaultValue
|
||||||
from openapi_client.models.number_properties_only import NumberPropertiesOnly
|
from openapi_client.models.number_properties_only import NumberPropertiesOnly
|
||||||
from openapi_client.models.pet import Pet
|
from openapi_client.models.pet import Pet
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
from openapi_client.models.bird import Bird
|
from openapi_client.models.bird import Bird
|
||||||
from openapi_client.models.category import Category
|
from openapi_client.models.category import Category
|
||||||
from openapi_client.models.data_query import DataQuery
|
from openapi_client.models.data_query import DataQuery
|
||||||
from openapi_client.models.data_query_all_of import DataQueryAllOf
|
|
||||||
from openapi_client.models.default_value import DefaultValue
|
from openapi_client.models.default_value import DefaultValue
|
||||||
from openapi_client.models.number_properties_only import NumberPropertiesOnly
|
from openapi_client.models.number_properties_only import NumberPropertiesOnly
|
||||||
from openapi_client.models.pet import Pet
|
from openapi_client.models.pet import Pet
|
||||||
|
@ -30,7 +30,7 @@ class DataQuery(Query):
|
|||||||
suffix: Optional[StrictStr] = Field(None, description="test suffix")
|
suffix: Optional[StrictStr] = Field(None, description="test suffix")
|
||||||
text: Optional[StrictStr] = Field(None, description="Some text containing white spaces")
|
text: Optional[StrictStr] = Field(None, description="Some text containing white spaces")
|
||||||
var_date: Optional[datetime] = Field(None, alias="date", description="A date")
|
var_date: Optional[datetime] = Field(None, alias="date", description="A date")
|
||||||
__properties = ["suffix", "text", "date", "id", "outcomes"]
|
__properties = ["id", "outcomes", "suffix", "text", "date"]
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
"""Pydantic configuration"""
|
"""Pydantic configuration"""
|
||||||
@ -68,11 +68,11 @@ class DataQuery(Query):
|
|||||||
return DataQuery.parse_obj(obj)
|
return DataQuery.parse_obj(obj)
|
||||||
|
|
||||||
_obj = DataQuery.parse_obj({
|
_obj = DataQuery.parse_obj({
|
||||||
|
"id": obj.get("id"),
|
||||||
|
"outcomes": obj.get("outcomes"),
|
||||||
"suffix": obj.get("suffix"),
|
"suffix": obj.get("suffix"),
|
||||||
"text": obj.get("text"),
|
"text": obj.get("text"),
|
||||||
"var_date": obj.get("date"),
|
"var_date": obj.get("date")
|
||||||
"id": obj.get("id"),
|
|
||||||
"outcomes": obj.get("outcomes")
|
|
||||||
})
|
})
|
||||||
return _obj
|
return _obj
|
||||||
|
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Echo Server API
|
|
||||||
|
|
||||||
Echo Server API # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: team@openapitools.org
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Optional
|
|
||||||
from pydantic import BaseModel, Field, StrictStr
|
|
||||||
|
|
||||||
class DataQueryAllOf(BaseModel):
|
|
||||||
"""
|
|
||||||
DataQueryAllOf
|
|
||||||
"""
|
|
||||||
suffix: Optional[StrictStr] = Field(None, description="test suffix")
|
|
||||||
text: Optional[StrictStr] = Field(None, description="Some text containing white spaces")
|
|
||||||
var_date: Optional[datetime] = Field(None, alias="date", description="A date")
|
|
||||||
__properties = ["suffix", "text", "date"]
|
|
||||||
|
|
||||||
class Config:
|
|
||||||
"""Pydantic configuration"""
|
|
||||||
allow_population_by_field_name = True
|
|
||||||
validate_assignment = True
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.dict(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
return json.dumps(self.to_dict())
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> DataQueryAllOf:
|
|
||||||
"""Create an instance of DataQueryAllOf from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self):
|
|
||||||
"""Returns the dictionary representation of the model using alias"""
|
|
||||||
_dict = self.dict(by_alias=True,
|
|
||||||
exclude={
|
|
||||||
},
|
|
||||||
exclude_none=True)
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: dict) -> DataQueryAllOf:
|
|
||||||
"""Create an instance of DataQueryAllOf from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return DataQueryAllOf.parse_obj(obj)
|
|
||||||
|
|
||||||
_obj = DataQueryAllOf.parse_obj({
|
|
||||||
"suffix": obj.get("suffix"),
|
|
||||||
"text": obj.get("text"),
|
|
||||||
"var_date": obj.get("date")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Echo Server API
|
|
||||||
|
|
||||||
Echo Server API # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: team@openapitools.org
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import absolute_import
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.models.data_query_all_of import DataQueryAllOf # noqa: E501
|
|
||||||
from openapi_client.rest import ApiException
|
|
||||||
|
|
||||||
class TestDataQueryAllOf(unittest.TestCase):
|
|
||||||
"""DataQueryAllOf unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def make_instance(self, include_optional):
|
|
||||||
"""Test DataQueryAllOf
|
|
||||||
include_option is a boolean, when False only required
|
|
||||||
params are included, when True both required and
|
|
||||||
optional params are included """
|
|
||||||
# uncomment below to create an instance of `DataQueryAllOf`
|
|
||||||
"""
|
|
||||||
model = openapi_client.models.data_query_all_of.DataQueryAllOf() # noqa: E501
|
|
||||||
if include_optional :
|
|
||||||
return DataQueryAllOf(
|
|
||||||
suffix = '',
|
|
||||||
text = 'Some text',
|
|
||||||
var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
|
|
||||||
)
|
|
||||||
else :
|
|
||||||
return DataQueryAllOf(
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
|
|
||||||
def testDataQueryAllOf(self):
|
|
||||||
"""Test DataQueryAllOf"""
|
|
||||||
# inst_req_only = self.make_instance(include_optional=False)
|
|
||||||
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
@ -9,7 +9,6 @@ index.ts
|
|||||||
model/abstract-flat-stock-pick-order-base-dto.ts
|
model/abstract-flat-stock-pick-order-base-dto.ts
|
||||||
model/abstract-user-dto.ts
|
model/abstract-user-dto.ts
|
||||||
model/branch-dto.ts
|
model/branch-dto.ts
|
||||||
model/flat-stock-pick-order-dto-all-of.ts
|
|
||||||
model/flat-stock-pick-order-dto.ts
|
model/flat-stock-pick-order-dto.ts
|
||||||
model/index.ts
|
model/index.ts
|
||||||
model/internal-authenticated-user-dto.ts
|
model/internal-authenticated-user-dto.ts
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Example
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FlatStockPickOrderDtoAllOf
|
|
||||||
*/
|
|
||||||
export interface FlatStockPickOrderDtoAllOf {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FlatStockPickOrderDtoAllOf
|
|
||||||
*/
|
|
||||||
'blockedUntil'?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof FlatStockPickOrderDtoAllOf
|
|
||||||
*/
|
|
||||||
'blockedById'?: number;
|
|
||||||
}
|
|
||||||
|
|
@ -16,14 +16,11 @@
|
|||||||
// May contain unused imports in some cases
|
// May contain unused imports in some cases
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { AbstractFlatStockPickOrderBaseDto } from './abstract-flat-stock-pick-order-base-dto';
|
import { AbstractFlatStockPickOrderBaseDto } from './abstract-flat-stock-pick-order-base-dto';
|
||||||
// May contain unused imports in some cases
|
|
||||||
// @ts-ignore
|
|
||||||
import { FlatStockPickOrderDtoAllOf } from './flat-stock-pick-order-dto-all-of';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type FlatStockPickOrderDto
|
* @type FlatStockPickOrderDto
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export type FlatStockPickOrderDto = AbstractFlatStockPickOrderBaseDto & FlatStockPickOrderDtoAllOf;
|
export type FlatStockPickOrderDto = AbstractFlatStockPickOrderBaseDto;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,5 @@ export * from './abstract-flat-stock-pick-order-base-dto';
|
|||||||
export * from './abstract-user-dto';
|
export * from './abstract-user-dto';
|
||||||
export * from './branch-dto';
|
export * from './branch-dto';
|
||||||
export * from './flat-stock-pick-order-dto';
|
export * from './flat-stock-pick-order-dto';
|
||||||
export * from './flat-stock-pick-order-dto-all-of';
|
|
||||||
export * from './internal-authenticated-user-dto';
|
export * from './internal-authenticated-user-dto';
|
||||||
export * from './remote-authenticated-user-dto';
|
export * from './remote-authenticated-user-dto';
|
||||||
|
@ -5,9 +5,7 @@ index.ts
|
|||||||
models/Hero.ts
|
models/Hero.ts
|
||||||
models/Human.ts
|
models/Human.ts
|
||||||
models/SuperBaby.ts
|
models/SuperBaby.ts
|
||||||
models/SuperBabyAllOf.ts
|
|
||||||
models/SuperBoy.ts
|
models/SuperBoy.ts
|
||||||
models/SuperBoyAllOf.ts
|
|
||||||
models/SuperMan.ts
|
models/SuperMan.ts
|
||||||
models/index.ts
|
models/index.ts
|
||||||
runtime.ts
|
runtime.ts
|
||||||
|
@ -13,11 +13,10 @@
|
|||||||
|
|
||||||
import type {
|
import type {
|
||||||
Human,
|
Human,
|
||||||
SuperBabyAllOf,
|
|
||||||
} from './';
|
} from './';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type SuperBaby
|
* @type SuperBaby
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export type SuperBaby = Human & SuperBabyAllOf;
|
export type SuperBaby = Human;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
// tslint:disable
|
|
||||||
/**
|
|
||||||
* Example
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.0.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
* @interface SuperBabyAllOf
|
|
||||||
*/
|
|
||||||
export interface SuperBabyAllOf {
|
|
||||||
/**
|
|
||||||
* @type {string}
|
|
||||||
* @memberof SuperBabyAllOf
|
|
||||||
*/
|
|
||||||
gender?: string;
|
|
||||||
/**
|
|
||||||
* @type {number}
|
|
||||||
* @memberof SuperBabyAllOf
|
|
||||||
*/
|
|
||||||
age?: number;
|
|
||||||
}
|
|
@ -13,11 +13,10 @@
|
|||||||
|
|
||||||
import type {
|
import type {
|
||||||
Human,
|
Human,
|
||||||
SuperBoyAllOf,
|
|
||||||
} from './';
|
} from './';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type SuperBoy
|
* @type SuperBoy
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export type SuperBoy = Human & SuperBoyAllOf;
|
export type SuperBoy = Human;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
// tslint:disable
|
|
||||||
/**
|
|
||||||
* Example
|
|
||||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.0.0
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
* @interface SuperBoyAllOf
|
|
||||||
*/
|
|
||||||
export interface SuperBoyAllOf {
|
|
||||||
/**
|
|
||||||
* @type {string}
|
|
||||||
* @memberof SuperBoyAllOf
|
|
||||||
*/
|
|
||||||
category?: string;
|
|
||||||
/**
|
|
||||||
* @type {number}
|
|
||||||
* @memberof SuperBoyAllOf
|
|
||||||
*/
|
|
||||||
level: number;
|
|
||||||
}
|
|
@ -14,11 +14,10 @@
|
|||||||
import type {
|
import type {
|
||||||
Hero,
|
Hero,
|
||||||
Human,
|
Human,
|
||||||
SuperBoyAllOf,
|
|
||||||
} from './';
|
} from './';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type SuperMan
|
* @type SuperMan
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export type SuperMan = Hero & Human & SuperBoyAllOf;
|
export type SuperMan = Hero & Human;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
export * from './Hero';
|
export * from './Hero';
|
||||||
export * from './Human';
|
export * from './Human';
|
||||||
export * from './SuperBaby';
|
export * from './SuperBaby';
|
||||||
export * from './SuperBabyAllOf';
|
|
||||||
export * from './SuperBoy';
|
export * from './SuperBoy';
|
||||||
export * from './SuperBoyAllOf';
|
|
||||||
export * from './SuperMan';
|
export * from './SuperMan';
|
||||||
|
@ -14,12 +14,10 @@ R/api_exception.R
|
|||||||
R/api_response.R
|
R/api_response.R
|
||||||
R/basque_pig.R
|
R/basque_pig.R
|
||||||
R/cat.R
|
R/cat.R
|
||||||
R/cat_all_of.R
|
|
||||||
R/category.R
|
R/category.R
|
||||||
R/danish_pig.R
|
R/danish_pig.R
|
||||||
R/date.R
|
R/date.R
|
||||||
R/dog.R
|
R/dog.R
|
||||||
R/dog_all_of.R
|
|
||||||
R/fake_api.R
|
R/fake_api.R
|
||||||
R/format_test.R
|
R/format_test.R
|
||||||
R/mammal.R
|
R/mammal.R
|
||||||
@ -46,12 +44,10 @@ docs/AnyOfPig.md
|
|||||||
docs/AnyOfPrimitiveTypeTest.md
|
docs/AnyOfPrimitiveTypeTest.md
|
||||||
docs/BasquePig.md
|
docs/BasquePig.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DanishPig.md
|
docs/DanishPig.md
|
||||||
docs/Date.md
|
docs/Date.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/FakeApi.md
|
docs/FakeApi.md
|
||||||
docs/FormatTest.md
|
docs/FormatTest.md
|
||||||
docs/Mammal.md
|
docs/Mammal.md
|
||||||
|
@ -22,12 +22,10 @@ export(AnyOfPig)
|
|||||||
export(AnyOfPrimitiveTypeTest)
|
export(AnyOfPrimitiveTypeTest)
|
||||||
export(BasquePig)
|
export(BasquePig)
|
||||||
export(Cat)
|
export(Cat)
|
||||||
export(CatAllOf)
|
|
||||||
export(Category)
|
export(Category)
|
||||||
export(DanishPig)
|
export(DanishPig)
|
||||||
export(Date)
|
export(Date)
|
||||||
export(Dog)
|
export(Dog)
|
||||||
export(DogAllOf)
|
|
||||||
export(FormatTest)
|
export(FormatTest)
|
||||||
export(Mammal)
|
export(Mammal)
|
||||||
export(ModelApiResponse)
|
export(ModelApiResponse)
|
||||||
|
@ -1,196 +0,0 @@
|
|||||||
#' Create a new CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' CatAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title CatAllOf
|
|
||||||
#' @description CatAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field declawed character [optional]
|
|
||||||
#' @field _field_list a list of fields list(character)
|
|
||||||
#' @field additional_properties additional properties list(character) [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
CatAllOf <- R6::R6Class(
|
|
||||||
"CatAllOf",
|
|
||||||
public = list(
|
|
||||||
`declawed` = NULL,
|
|
||||||
`_field_list` = c("declawed"),
|
|
||||||
`additional_properties` = list(),
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param declawed declawed
|
|
||||||
#' @param additional_properties additional properties (optional)
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
|
||||||
if (!is.null(`declawed`)) {
|
|
||||||
if (!(is.logical(`declawed`) && length(`declawed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`))
|
|
||||||
}
|
|
||||||
self$`declawed` <- `declawed`
|
|
||||||
}
|
|
||||||
if (!is.null(additional_properties)) {
|
|
||||||
for (key in names(additional_properties)) {
|
|
||||||
self$additional_properties[[key]] <- additional_properties[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
CatAllOfObject <- list()
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
CatAllOfObject[["declawed"]] <-
|
|
||||||
self$`declawed`
|
|
||||||
}
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
CatAllOfObject[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
|
|
||||||
CatAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`declawed`)) {
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
}
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"declawed":
|
|
||||||
%s
|
|
||||||
',
|
|
||||||
tolower(self$`declawed`)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
json_obj <- jsonlite::fromJSON(json_string)
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
json_obj[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA)))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to CatAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of CatAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# CatAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# CatAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# CatAllOf$lock()
|
|
||||||
|
|
@ -1,196 +0,0 @@
|
|||||||
#' Create a new DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' DogAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title DogAllOf
|
|
||||||
#' @description DogAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field breed character [optional]
|
|
||||||
#' @field _field_list a list of fields list(character)
|
|
||||||
#' @field additional_properties additional properties list(character) [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
DogAllOf <- R6::R6Class(
|
|
||||||
"DogAllOf",
|
|
||||||
public = list(
|
|
||||||
`breed` = NULL,
|
|
||||||
`_field_list` = c("breed"),
|
|
||||||
`additional_properties` = list(),
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param breed breed
|
|
||||||
#' @param additional_properties additional properties (optional)
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
|
||||||
if (!is.null(`breed`)) {
|
|
||||||
if (!(is.character(`breed`) && length(`breed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`))
|
|
||||||
}
|
|
||||||
self$`breed` <- `breed`
|
|
||||||
}
|
|
||||||
if (!is.null(additional_properties)) {
|
|
||||||
for (key in names(additional_properties)) {
|
|
||||||
self$additional_properties[[key]] <- additional_properties[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
DogAllOfObject <- list()
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
DogAllOfObject[["breed"]] <-
|
|
||||||
self$`breed`
|
|
||||||
}
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
DogAllOfObject[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
|
|
||||||
DogAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`breed`)) {
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
}
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"breed":
|
|
||||||
"%s"
|
|
||||||
',
|
|
||||||
self$`breed`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
json_obj <- jsonlite::fromJSON(json_string)
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
json_obj[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA)))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to DogAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of DogAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# DogAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# DogAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# DogAllOf$lock()
|
|
||||||
|
|
@ -109,12 +109,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
||||||
- [BasquePig](docs/BasquePig.md)
|
- [BasquePig](docs/BasquePig.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
- [CatAllOf](docs/CatAllOf.md)
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DanishPig](docs/DanishPig.md)
|
- [DanishPig](docs/DanishPig.md)
|
||||||
- [Date](docs/Date.md)
|
- [Date](docs/Date.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
- [DogAllOf](docs/DogAllOf.md)
|
|
||||||
- [FormatTest](docs/FormatTest.md)
|
- [FormatTest](docs/FormatTest.md)
|
||||||
- [Mammal](docs/Mammal.md)
|
- [Mammal](docs/Mammal.md)
|
||||||
- [ModelApiResponse](docs/ModelApiResponse.md)
|
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::CatAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::DogAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test CatAllOf")
|
|
||||||
|
|
||||||
model_instance <- CatAllOf$new()
|
|
||||||
|
|
||||||
test_that("declawed", {
|
|
||||||
# tests for the property `declawed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`declawed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test DogAllOf")
|
|
||||||
|
|
||||||
model_instance <- DogAllOf$new()
|
|
||||||
|
|
||||||
test_that("breed", {
|
|
||||||
# tests for the property `breed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`breed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -14,12 +14,10 @@ R/api_exception.R
|
|||||||
R/api_response.R
|
R/api_response.R
|
||||||
R/basque_pig.R
|
R/basque_pig.R
|
||||||
R/cat.R
|
R/cat.R
|
||||||
R/cat_all_of.R
|
|
||||||
R/category.R
|
R/category.R
|
||||||
R/danish_pig.R
|
R/danish_pig.R
|
||||||
R/date.R
|
R/date.R
|
||||||
R/dog.R
|
R/dog.R
|
||||||
R/dog_all_of.R
|
|
||||||
R/fake_api.R
|
R/fake_api.R
|
||||||
R/format_test.R
|
R/format_test.R
|
||||||
R/mammal.R
|
R/mammal.R
|
||||||
@ -45,12 +43,10 @@ docs/AnyOfPig.md
|
|||||||
docs/AnyOfPrimitiveTypeTest.md
|
docs/AnyOfPrimitiveTypeTest.md
|
||||||
docs/BasquePig.md
|
docs/BasquePig.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DanishPig.md
|
docs/DanishPig.md
|
||||||
docs/Date.md
|
docs/Date.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/FakeApi.md
|
docs/FakeApi.md
|
||||||
docs/FormatTest.md
|
docs/FormatTest.md
|
||||||
docs/Mammal.md
|
docs/Mammal.md
|
||||||
|
@ -20,12 +20,10 @@ export(AnyOfPig)
|
|||||||
export(AnyOfPrimitiveTypeTest)
|
export(AnyOfPrimitiveTypeTest)
|
||||||
export(BasquePig)
|
export(BasquePig)
|
||||||
export(Cat)
|
export(Cat)
|
||||||
export(CatAllOf)
|
|
||||||
export(Category)
|
export(Category)
|
||||||
export(DanishPig)
|
export(DanishPig)
|
||||||
export(Date)
|
export(Date)
|
||||||
export(Dog)
|
export(Dog)
|
||||||
export(DogAllOf)
|
|
||||||
export(FormatTest)
|
export(FormatTest)
|
||||||
export(Mammal)
|
export(Mammal)
|
||||||
export(ModelApiResponse)
|
export(ModelApiResponse)
|
||||||
|
@ -1,163 +0,0 @@
|
|||||||
#' Create a new CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' CatAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title CatAllOf
|
|
||||||
#' @description CatAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field declawed character [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
CatAllOf <- R6::R6Class(
|
|
||||||
"CatAllOf",
|
|
||||||
public = list(
|
|
||||||
`declawed` = NULL,
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param declawed declawed
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`declawed` = NULL, ...) {
|
|
||||||
if (!is.null(`declawed`)) {
|
|
||||||
if (!(is.logical(`declawed`) && length(`declawed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`))
|
|
||||||
}
|
|
||||||
self$`declawed` <- `declawed`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
CatAllOfObject <- list()
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
CatAllOfObject[["declawed"]] <-
|
|
||||||
self$`declawed`
|
|
||||||
}
|
|
||||||
CatAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`declawed`)) {
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
}
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"declawed":
|
|
||||||
%s
|
|
||||||
',
|
|
||||||
tolower(self$`declawed`)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to CatAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of CatAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# CatAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# CatAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# CatAllOf$lock()
|
|
||||||
|
|
@ -1,163 +0,0 @@
|
|||||||
#' Create a new DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' DogAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title DogAllOf
|
|
||||||
#' @description DogAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field breed character [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
DogAllOf <- R6::R6Class(
|
|
||||||
"DogAllOf",
|
|
||||||
public = list(
|
|
||||||
`breed` = NULL,
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param breed breed
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`breed` = NULL, ...) {
|
|
||||||
if (!is.null(`breed`)) {
|
|
||||||
if (!(is.character(`breed`) && length(`breed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`))
|
|
||||||
}
|
|
||||||
self$`breed` <- `breed`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
DogAllOfObject <- list()
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
DogAllOfObject[["breed"]] <-
|
|
||||||
self$`breed`
|
|
||||||
}
|
|
||||||
DogAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`breed`)) {
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
}
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"breed":
|
|
||||||
"%s"
|
|
||||||
',
|
|
||||||
self$`breed`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to DogAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of DogAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# DogAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# DogAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# DogAllOf$lock()
|
|
||||||
|
|
@ -109,12 +109,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
||||||
- [BasquePig](docs/BasquePig.md)
|
- [BasquePig](docs/BasquePig.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
- [CatAllOf](docs/CatAllOf.md)
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DanishPig](docs/DanishPig.md)
|
- [DanishPig](docs/DanishPig.md)
|
||||||
- [Date](docs/Date.md)
|
- [Date](docs/Date.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
- [DogAllOf](docs/DogAllOf.md)
|
|
||||||
- [FormatTest](docs/FormatTest.md)
|
- [FormatTest](docs/FormatTest.md)
|
||||||
- [Mammal](docs/Mammal.md)
|
- [Mammal](docs/Mammal.md)
|
||||||
- [ModelApiResponse](docs/ModelApiResponse.md)
|
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::CatAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::DogAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test CatAllOf")
|
|
||||||
|
|
||||||
model_instance <- CatAllOf$new()
|
|
||||||
|
|
||||||
test_that("declawed", {
|
|
||||||
# tests for the property `declawed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`declawed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test DogAllOf")
|
|
||||||
|
|
||||||
model_instance <- DogAllOf$new()
|
|
||||||
|
|
||||||
test_that("breed", {
|
|
||||||
# tests for the property `breed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`breed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -14,12 +14,10 @@ R/api_exception.R
|
|||||||
R/api_response.R
|
R/api_response.R
|
||||||
R/basque_pig.R
|
R/basque_pig.R
|
||||||
R/cat.R
|
R/cat.R
|
||||||
R/cat_all_of.R
|
|
||||||
R/category.R
|
R/category.R
|
||||||
R/danish_pig.R
|
R/danish_pig.R
|
||||||
R/date.R
|
R/date.R
|
||||||
R/dog.R
|
R/dog.R
|
||||||
R/dog_all_of.R
|
|
||||||
R/fake_api.R
|
R/fake_api.R
|
||||||
R/format_test.R
|
R/format_test.R
|
||||||
R/mammal.R
|
R/mammal.R
|
||||||
@ -45,12 +43,10 @@ docs/AnyOfPig.md
|
|||||||
docs/AnyOfPrimitiveTypeTest.md
|
docs/AnyOfPrimitiveTypeTest.md
|
||||||
docs/BasquePig.md
|
docs/BasquePig.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/DanishPig.md
|
docs/DanishPig.md
|
||||||
docs/Date.md
|
docs/Date.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/FakeApi.md
|
docs/FakeApi.md
|
||||||
docs/FormatTest.md
|
docs/FormatTest.md
|
||||||
docs/Mammal.md
|
docs/Mammal.md
|
||||||
|
@ -20,12 +20,10 @@ export(AnyOfPig)
|
|||||||
export(AnyOfPrimitiveTypeTest)
|
export(AnyOfPrimitiveTypeTest)
|
||||||
export(BasquePig)
|
export(BasquePig)
|
||||||
export(Cat)
|
export(Cat)
|
||||||
export(CatAllOf)
|
|
||||||
export(Category)
|
export(Category)
|
||||||
export(DanishPig)
|
export(DanishPig)
|
||||||
export(Date)
|
export(Date)
|
||||||
export(Dog)
|
export(Dog)
|
||||||
export(DogAllOf)
|
|
||||||
export(FormatTest)
|
export(FormatTest)
|
||||||
export(Mammal)
|
export(Mammal)
|
||||||
export(ModelApiResponse)
|
export(ModelApiResponse)
|
||||||
|
@ -1,196 +0,0 @@
|
|||||||
#' Create a new CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' CatAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title CatAllOf
|
|
||||||
#' @description CatAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field declawed character [optional]
|
|
||||||
#' @field _field_list a list of fields list(character)
|
|
||||||
#' @field additional_properties additional properties list(character) [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
CatAllOf <- R6::R6Class(
|
|
||||||
"CatAllOf",
|
|
||||||
public = list(
|
|
||||||
`declawed` = NULL,
|
|
||||||
`_field_list` = c("declawed"),
|
|
||||||
`additional_properties` = list(),
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new CatAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param declawed declawed
|
|
||||||
#' @param additional_properties additional properties (optional)
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
|
||||||
if (!is.null(`declawed`)) {
|
|
||||||
if (!(is.logical(`declawed`) && length(`declawed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`))
|
|
||||||
}
|
|
||||||
self$`declawed` <- `declawed`
|
|
||||||
}
|
|
||||||
if (!is.null(additional_properties)) {
|
|
||||||
for (key in names(additional_properties)) {
|
|
||||||
self$additional_properties[[key]] <- additional_properties[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
CatAllOfObject <- list()
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
CatAllOfObject[["declawed"]] <-
|
|
||||||
self$`declawed`
|
|
||||||
}
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
CatAllOfObject[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
|
|
||||||
CatAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`declawed`)) {
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
}
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return CatAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`declawed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"declawed":
|
|
||||||
%s
|
|
||||||
',
|
|
||||||
tolower(self$`declawed`)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
json_obj <- jsonlite::fromJSON(json_string)
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
json_obj[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA)))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of CatAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of CatAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`declawed` <- this_object$`declawed`
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to CatAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to CatAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of CatAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# CatAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# CatAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# CatAllOf$lock()
|
|
||||||
|
|
@ -1,196 +0,0 @@
|
|||||||
#' Create a new DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' DogAllOf Class
|
|
||||||
#'
|
|
||||||
#' @docType class
|
|
||||||
#' @title DogAllOf
|
|
||||||
#' @description DogAllOf Class
|
|
||||||
#' @format An \code{R6Class} generator object
|
|
||||||
#' @field breed character [optional]
|
|
||||||
#' @field _field_list a list of fields list(character)
|
|
||||||
#' @field additional_properties additional properties list(character) [optional]
|
|
||||||
#' @importFrom R6 R6Class
|
|
||||||
#' @importFrom jsonlite fromJSON toJSON
|
|
||||||
#' @export
|
|
||||||
DogAllOf <- R6::R6Class(
|
|
||||||
"DogAllOf",
|
|
||||||
public = list(
|
|
||||||
`breed` = NULL,
|
|
||||||
`_field_list` = c("breed"),
|
|
||||||
`additional_properties` = list(),
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Initialize a new DogAllOf class.
|
|
||||||
#'
|
|
||||||
#' @param breed breed
|
|
||||||
#' @param additional_properties additional properties (optional)
|
|
||||||
#' @param ... Other optional arguments.
|
|
||||||
#' @export
|
|
||||||
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
|
||||||
if (!is.null(`breed`)) {
|
|
||||||
if (!(is.character(`breed`) && length(`breed`) == 1)) {
|
|
||||||
stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`))
|
|
||||||
}
|
|
||||||
self$`breed` <- `breed`
|
|
||||||
}
|
|
||||||
if (!is.null(additional_properties)) {
|
|
||||||
for (key in names(additional_properties)) {
|
|
||||||
self$additional_properties[[key]] <- additional_properties[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSON = function() {
|
|
||||||
DogAllOfObject <- list()
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
DogAllOfObject[["breed"]] <-
|
|
||||||
self$`breed`
|
|
||||||
}
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
DogAllOfObject[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
|
|
||||||
DogAllOfObject
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSON = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
if (!is.null(this_object$`breed`)) {
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
}
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' To JSON string
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To JSON String
|
|
||||||
#'
|
|
||||||
#' @return DogAllOf in JSON format
|
|
||||||
#' @export
|
|
||||||
toJSONString = function() {
|
|
||||||
jsoncontent <- c(
|
|
||||||
if (!is.null(self$`breed`)) {
|
|
||||||
sprintf(
|
|
||||||
'"breed":
|
|
||||||
"%s"
|
|
||||||
',
|
|
||||||
self$`breed`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jsoncontent <- paste(jsoncontent, collapse = ",")
|
|
||||||
json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = "")))
|
|
||||||
json_obj <- jsonlite::fromJSON(json_string)
|
|
||||||
for (key in names(self$additional_properties)) {
|
|
||||||
json_obj[[key]] <- self$additional_properties[[key]]
|
|
||||||
}
|
|
||||||
json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA)))
|
|
||||||
},
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Deserialize JSON string into an instance of DogAllOf
|
|
||||||
#'
|
|
||||||
#' @param input_json the JSON input
|
|
||||||
#' @return the instance of DogAllOf
|
|
||||||
#' @export
|
|
||||||
fromJSONString = function(input_json) {
|
|
||||||
this_object <- jsonlite::fromJSON(input_json)
|
|
||||||
self$`breed` <- this_object$`breed`
|
|
||||||
# process additional properties/fields in the payload
|
|
||||||
for (key in names(this_object)) {
|
|
||||||
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
|
|
||||||
self$additional_properties[[key]] <- this_object[[key]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self
|
|
||||||
},
|
|
||||||
#' Validate JSON input with respect to DogAllOf
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Validate JSON input with respect to DogAllOf and throw an exception if invalid
|
|
||||||
#'
|
|
||||||
#' @param input the JSON input
|
|
||||||
#' @export
|
|
||||||
validateJSON = function(input) {
|
|
||||||
input_json <- jsonlite::fromJSON(input)
|
|
||||||
},
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' To string (JSON format)
|
|
||||||
#'
|
|
||||||
#' @return String representation of DogAllOf
|
|
||||||
#' @export
|
|
||||||
toString = function() {
|
|
||||||
self$toJSONString()
|
|
||||||
},
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return true if the values in all fields are valid.
|
|
||||||
#'
|
|
||||||
#' @return true if the values in all fields are valid.
|
|
||||||
#' @export
|
|
||||||
isValid = function() {
|
|
||||||
TRUE
|
|
||||||
},
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Return a list of invalid fields (if any).
|
|
||||||
#'
|
|
||||||
#' @return A list of invalid fields (if any).
|
|
||||||
#' @export
|
|
||||||
getInvalidFields = function() {
|
|
||||||
invalid_fields <- list()
|
|
||||||
invalid_fields
|
|
||||||
},
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @description
|
|
||||||
#' Print the object
|
|
||||||
#'
|
|
||||||
#' @export
|
|
||||||
print = function() {
|
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
invisible(self)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
# Lock the class to prevent modifications to the method or field
|
|
||||||
lock_class = TRUE
|
|
||||||
)
|
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
|
||||||
# DogAllOf$unlock()
|
|
||||||
#
|
|
||||||
## Below is an example to define the print function
|
|
||||||
# DogAllOf$set("public", "print", function(...) {
|
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
|
||||||
# invisible(self)
|
|
||||||
# })
|
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
|
||||||
# DogAllOf$lock()
|
|
||||||
|
|
@ -109,12 +109,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
- [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md)
|
||||||
- [BasquePig](docs/BasquePig.md)
|
- [BasquePig](docs/BasquePig.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
- [CatAllOf](docs/CatAllOf.md)
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [DanishPig](docs/DanishPig.md)
|
- [DanishPig](docs/DanishPig.md)
|
||||||
- [Date](docs/Date.md)
|
- [Date](docs/Date.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
- [DogAllOf](docs/DogAllOf.md)
|
|
||||||
- [FormatTest](docs/FormatTest.md)
|
- [FormatTest](docs/FormatTest.md)
|
||||||
- [Mammal](docs/Mammal.md)
|
- [Mammal](docs/Mammal.md)
|
||||||
- [ModelApiResponse](docs/ModelApiResponse.md)
|
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::CatAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# petstore::DogAllOf
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **character** | | [optional]
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test CatAllOf")
|
|
||||||
|
|
||||||
model_instance <- CatAllOf$new()
|
|
||||||
|
|
||||||
test_that("declawed", {
|
|
||||||
# tests for the property `declawed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`declawed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -1,13 +0,0 @@
|
|||||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
||||||
# Please update as you see appropriate
|
|
||||||
|
|
||||||
context("Test DogAllOf")
|
|
||||||
|
|
||||||
model_instance <- DogAllOf$new()
|
|
||||||
|
|
||||||
test_that("breed", {
|
|
||||||
# tests for the property `breed` (character)
|
|
||||||
|
|
||||||
# uncomment below to test the property
|
|
||||||
#expect_equal(model.instance$`breed`, "EXPECTED_RESULT")
|
|
||||||
})
|
|
@ -18,15 +18,12 @@ docs/ArrayOfArrayOfNumberOnly.md
|
|||||||
docs/ArrayOfNumberOnly.md
|
docs/ArrayOfNumberOnly.md
|
||||||
docs/ArrayTest.md
|
docs/ArrayTest.md
|
||||||
docs/BigCat.md
|
docs/BigCat.md
|
||||||
docs/BigCatAllOf.md
|
|
||||||
docs/Capitalization.md
|
docs/Capitalization.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/ClassModel.md
|
docs/ClassModel.md
|
||||||
docs/Client.md
|
docs/Client.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/EnumArrays.md
|
docs/EnumArrays.md
|
||||||
docs/EnumClass.md
|
docs/EnumClass.md
|
||||||
docs/EnumTest.md
|
docs/EnumTest.md
|
||||||
|
@ -163,15 +163,12 @@ Class | Method | HTTP request | Description
|
|||||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [ArrayTest](docs/ArrayTest.md)
|
- [ArrayTest](docs/ArrayTest.md)
|
||||||
- [BigCat](docs/BigCat.md)
|
- [BigCat](docs/BigCat.md)
|
||||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
|
||||||
- [Capitalization](docs/Capitalization.md)
|
- [Capitalization](docs/Capitalization.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
- [CatAllOf](docs/CatAllOf.md)
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [ClassModel](docs/ClassModel.md)
|
- [ClassModel](docs/ClassModel.md)
|
||||||
- [Client](docs/Client.md)
|
- [Client](docs/Client.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
- [DogAllOf](docs/DogAllOf.md)
|
|
||||||
- [EnumArrays](docs/EnumArrays.md)
|
- [EnumArrays](docs/EnumArrays.md)
|
||||||
- [EnumClass](docs/EnumClass.md)
|
- [EnumClass](docs/EnumClass.md)
|
||||||
- [EnumTest](docs/EnumTest.md)
|
- [EnumTest](docs/EnumTest.md)
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
# BigCat_allOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**kind** | **string** | | [optional] [default to null]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
# Cat_allOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**declawed** | **boolean** | | [optional] [default to null]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
# Dog_allOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**breed** | **string** | | [optional] [default to null]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -23,13 +23,11 @@ lib/openapi_petstore/model/array_of_number_only.ex
|
|||||||
lib/openapi_petstore/model/array_test.ex
|
lib/openapi_petstore/model/array_test.ex
|
||||||
lib/openapi_petstore/model/capitalization.ex
|
lib/openapi_petstore/model/capitalization.ex
|
||||||
lib/openapi_petstore/model/cat.ex
|
lib/openapi_petstore/model/cat.ex
|
||||||
lib/openapi_petstore/model/cat_all_of.ex
|
|
||||||
lib/openapi_petstore/model/category.ex
|
lib/openapi_petstore/model/category.ex
|
||||||
lib/openapi_petstore/model/class_model.ex
|
lib/openapi_petstore/model/class_model.ex
|
||||||
lib/openapi_petstore/model/client.ex
|
lib/openapi_petstore/model/client.ex
|
||||||
lib/openapi_petstore/model/deprecated_object.ex
|
lib/openapi_petstore/model/deprecated_object.ex
|
||||||
lib/openapi_petstore/model/dog.ex
|
lib/openapi_petstore/model/dog.ex
|
||||||
lib/openapi_petstore/model/dog_all_of.ex
|
|
||||||
lib/openapi_petstore/model/enum_arrays.ex
|
lib/openapi_petstore/model/enum_arrays.ex
|
||||||
lib/openapi_petstore/model/enum_class.ex
|
lib/openapi_petstore/model/enum_class.ex
|
||||||
lib/openapi_petstore/model/enum_test.ex
|
lib/openapi_petstore/model/enum_test.ex
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
# NOTE: This file is auto generated by OpenAPI Generator 7.0.0-SNAPSHOT (https://openapi-generator.tech).
|
|
||||||
# Do not edit this file manually.
|
|
||||||
|
|
||||||
defmodule OpenapiPetstore.Model.CatAllOf do
|
|
||||||
@moduledoc """
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
@derive [Poison.Encoder]
|
|
||||||
defstruct [
|
|
||||||
:declawed
|
|
||||||
]
|
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
|
||||||
:declawed => boolean() | nil
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.CatAllOf do
|
|
||||||
def decode(value, _options) do
|
|
||||||
value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
# NOTE: This file is auto generated by OpenAPI Generator 7.0.0-SNAPSHOT (https://openapi-generator.tech).
|
|
||||||
# Do not edit this file manually.
|
|
||||||
|
|
||||||
defmodule OpenapiPetstore.Model.DogAllOf do
|
|
||||||
@moduledoc """
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
@derive [Poison.Encoder]
|
|
||||||
defstruct [
|
|
||||||
:breed
|
|
||||||
]
|
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
|
||||||
:breed => String.t | nil
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.DogAllOf do
|
|
||||||
def decode(value, _options) do
|
|
||||||
value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -25,15 +25,12 @@ docs/ArrayOfArrayOfNumberOnly.md
|
|||||||
docs/ArrayOfNumberOnly.md
|
docs/ArrayOfNumberOnly.md
|
||||||
docs/ArrayTest.md
|
docs/ArrayTest.md
|
||||||
docs/BigCat.md
|
docs/BigCat.md
|
||||||
docs/BigCatAllOf.md
|
|
||||||
docs/Capitalization.md
|
docs/Capitalization.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
docs/ClassModel.md
|
docs/ClassModel.md
|
||||||
docs/Client.md
|
docs/Client.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
|
||||||
docs/EnumArrays.md
|
docs/EnumArrays.md
|
||||||
docs/EnumClass.md
|
docs/EnumClass.md
|
||||||
docs/EnumTest.md
|
docs/EnumTest.md
|
||||||
@ -82,15 +79,12 @@ model_array_of_array_of_number_only.go
|
|||||||
model_array_of_number_only.go
|
model_array_of_number_only.go
|
||||||
model_array_test_.go
|
model_array_test_.go
|
||||||
model_big_cat.go
|
model_big_cat.go
|
||||||
model_big_cat_all_of.go
|
|
||||||
model_capitalization.go
|
model_capitalization.go
|
||||||
model_cat.go
|
model_cat.go
|
||||||
model_cat_all_of.go
|
|
||||||
model_category.go
|
model_category.go
|
||||||
model_class_model.go
|
model_class_model.go
|
||||||
model_client.go
|
model_client.go
|
||||||
model_dog.go
|
model_dog.go
|
||||||
model_dog_all_of.go
|
|
||||||
model_enum_arrays.go
|
model_enum_arrays.go
|
||||||
model_enum_class.go
|
model_enum_class.go
|
||||||
model_enum_test_.go
|
model_enum_test_.go
|
||||||
|
@ -133,15 +133,12 @@ Class | Method | HTTP request | Description
|
|||||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [ArrayTest](docs/ArrayTest.md)
|
- [ArrayTest](docs/ArrayTest.md)
|
||||||
- [BigCat](docs/BigCat.md)
|
- [BigCat](docs/BigCat.md)
|
||||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
|
||||||
- [Capitalization](docs/Capitalization.md)
|
- [Capitalization](docs/Capitalization.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
- [CatAllOf](docs/CatAllOf.md)
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [ClassModel](docs/ClassModel.md)
|
- [ClassModel](docs/ClassModel.md)
|
||||||
- [Client](docs/Client.md)
|
- [Client](docs/Client.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
- [DogAllOf](docs/DogAllOf.md)
|
|
||||||
- [EnumArrays](docs/EnumArrays.md)
|
- [EnumArrays](docs/EnumArrays.md)
|
||||||
- [EnumClass](docs/EnumClass.md)
|
- [EnumClass](docs/EnumClass.md)
|
||||||
- [EnumTest](docs/EnumTest.md)
|
- [EnumTest](docs/EnumTest.md)
|
||||||
|
@ -1303,15 +1303,29 @@ components:
|
|||||||
Dog:
|
Dog:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Animal'
|
- $ref: '#/components/schemas/Animal'
|
||||||
- $ref: '#/components/schemas/Dog_allOf'
|
- properties:
|
||||||
|
breed:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
Cat:
|
Cat:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Animal'
|
- $ref: '#/components/schemas/Animal'
|
||||||
- $ref: '#/components/schemas/Cat_allOf'
|
- properties:
|
||||||
|
declawed:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
BigCat:
|
BigCat:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Cat'
|
- $ref: '#/components/schemas/Cat'
|
||||||
- $ref: '#/components/schemas/BigCat_allOf'
|
- properties:
|
||||||
|
kind:
|
||||||
|
enum:
|
||||||
|
- lions
|
||||||
|
- tigers
|
||||||
|
- leopards
|
||||||
|
- jaguars
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
Animal:
|
Animal:
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: className
|
propertyName: className
|
||||||
@ -2104,29 +2118,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- requiredFile
|
- requiredFile
|
||||||
type: object
|
type: object
|
||||||
Dog_allOf:
|
|
||||||
properties:
|
|
||||||
breed:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
Cat_allOf:
|
|
||||||
properties:
|
|
||||||
declawed:
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
BigCat_allOf:
|
|
||||||
properties:
|
|
||||||
kind:
|
|
||||||
enum:
|
|
||||||
- lions
|
|
||||||
- tigers
|
|
||||||
- leopards
|
|
||||||
- jaguars
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
example: null
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
flows:
|
flows:
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
# BigCatAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Kind** | Pointer to **string** | | [optional]
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### NewBigCatAllOf
|
|
||||||
|
|
||||||
`func NewBigCatAllOf() *BigCatAllOf`
|
|
||||||
|
|
||||||
NewBigCatAllOf instantiates a new BigCatAllOf object
|
|
||||||
This constructor will assign default values to properties that have it defined,
|
|
||||||
and makes sure properties required by API are set, but the set of arguments
|
|
||||||
will change when the set of required properties is changed
|
|
||||||
|
|
||||||
### NewBigCatAllOfWithDefaults
|
|
||||||
|
|
||||||
`func NewBigCatAllOfWithDefaults() *BigCatAllOf`
|
|
||||||
|
|
||||||
NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object
|
|
||||||
This constructor will only assign default values to properties that have it defined,
|
|
||||||
but it doesn't guarantee that properties required by API are set
|
|
||||||
|
|
||||||
### GetKind
|
|
||||||
|
|
||||||
`func (o *BigCatAllOf) GetKind() string`
|
|
||||||
|
|
||||||
GetKind returns the Kind field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetKindOk
|
|
||||||
|
|
||||||
`func (o *BigCatAllOf) GetKindOk() (*string, bool)`
|
|
||||||
|
|
||||||
GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetKind
|
|
||||||
|
|
||||||
`func (o *BigCatAllOf) SetKind(v string)`
|
|
||||||
|
|
||||||
SetKind sets Kind field to given value.
|
|
||||||
|
|
||||||
### HasKind
|
|
||||||
|
|
||||||
`func (o *BigCatAllOf) HasKind() bool`
|
|
||||||
|
|
||||||
HasKind returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
# CatAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Declawed** | Pointer to **bool** | | [optional]
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### NewCatAllOf
|
|
||||||
|
|
||||||
`func NewCatAllOf() *CatAllOf`
|
|
||||||
|
|
||||||
NewCatAllOf instantiates a new CatAllOf object
|
|
||||||
This constructor will assign default values to properties that have it defined,
|
|
||||||
and makes sure properties required by API are set, but the set of arguments
|
|
||||||
will change when the set of required properties is changed
|
|
||||||
|
|
||||||
### NewCatAllOfWithDefaults
|
|
||||||
|
|
||||||
`func NewCatAllOfWithDefaults() *CatAllOf`
|
|
||||||
|
|
||||||
NewCatAllOfWithDefaults instantiates a new CatAllOf object
|
|
||||||
This constructor will only assign default values to properties that have it defined,
|
|
||||||
but it doesn't guarantee that properties required by API are set
|
|
||||||
|
|
||||||
### GetDeclawed
|
|
||||||
|
|
||||||
`func (o *CatAllOf) GetDeclawed() bool`
|
|
||||||
|
|
||||||
GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetDeclawedOk
|
|
||||||
|
|
||||||
`func (o *CatAllOf) GetDeclawedOk() (*bool, bool)`
|
|
||||||
|
|
||||||
GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetDeclawed
|
|
||||||
|
|
||||||
`func (o *CatAllOf) SetDeclawed(v bool)`
|
|
||||||
|
|
||||||
SetDeclawed sets Declawed field to given value.
|
|
||||||
|
|
||||||
### HasDeclawed
|
|
||||||
|
|
||||||
`func (o *CatAllOf) HasDeclawed() bool`
|
|
||||||
|
|
||||||
HasDeclawed returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
# DogAllOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Breed** | Pointer to **string** | | [optional]
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### NewDogAllOf
|
|
||||||
|
|
||||||
`func NewDogAllOf() *DogAllOf`
|
|
||||||
|
|
||||||
NewDogAllOf instantiates a new DogAllOf object
|
|
||||||
This constructor will assign default values to properties that have it defined,
|
|
||||||
and makes sure properties required by API are set, but the set of arguments
|
|
||||||
will change when the set of required properties is changed
|
|
||||||
|
|
||||||
### NewDogAllOfWithDefaults
|
|
||||||
|
|
||||||
`func NewDogAllOfWithDefaults() *DogAllOf`
|
|
||||||
|
|
||||||
NewDogAllOfWithDefaults instantiates a new DogAllOf object
|
|
||||||
This constructor will only assign default values to properties that have it defined,
|
|
||||||
but it doesn't guarantee that properties required by API are set
|
|
||||||
|
|
||||||
### GetBreed
|
|
||||||
|
|
||||||
`func (o *DogAllOf) GetBreed() string`
|
|
||||||
|
|
||||||
GetBreed returns the Breed field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetBreedOk
|
|
||||||
|
|
||||||
`func (o *DogAllOf) GetBreedOk() (*string, bool)`
|
|
||||||
|
|
||||||
GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetBreed
|
|
||||||
|
|
||||||
`func (o *DogAllOf) SetBreed(v string)`
|
|
||||||
|
|
||||||
SetBreed sets Breed field to given value.
|
|
||||||
|
|
||||||
### HasBreed
|
|
||||||
|
|
||||||
`func (o *DogAllOf) HasBreed() bool`
|
|
||||||
|
|
||||||
HasBreed returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
|||||||
/*
|
|
||||||
OpenAPI Petstore
|
|
||||||
|
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
|
|
||||||
API version: 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
)
|
|
||||||
|
|
||||||
// checks if the BigCatAllOf type satisfies the MappedNullable interface at compile time
|
|
||||||
var _ MappedNullable = &BigCatAllOf{}
|
|
||||||
|
|
||||||
// BigCatAllOf struct for BigCatAllOf
|
|
||||||
type BigCatAllOf struct {
|
|
||||||
Kind *string `json:"kind,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBigCatAllOf instantiates a new BigCatAllOf object
|
|
||||||
// This constructor will assign default values to properties that have it defined,
|
|
||||||
// and makes sure properties required by API are set, but the set of arguments
|
|
||||||
// will change when the set of required properties is changed
|
|
||||||
func NewBigCatAllOf() *BigCatAllOf {
|
|
||||||
this := BigCatAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object
|
|
||||||
// This constructor will only assign default values to properties that have it defined,
|
|
||||||
// but it doesn't guarantee that properties required by API are set
|
|
||||||
func NewBigCatAllOfWithDefaults() *BigCatAllOf {
|
|
||||||
this := BigCatAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
||||||
func (o *BigCatAllOf) GetKind() string {
|
|
||||||
if o == nil || IsNil(o.Kind) {
|
|
||||||
var ret string
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Kind
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *BigCatAllOf) GetKindOk() (*string, bool) {
|
|
||||||
if o == nil || IsNil(o.Kind) {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Kind, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasKind returns a boolean if a field has been set.
|
|
||||||
func (o *BigCatAllOf) HasKind() bool {
|
|
||||||
if o != nil && !IsNil(o.Kind) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
||||||
func (o *BigCatAllOf) SetKind(v string) {
|
|
||||||
o.Kind = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o BigCatAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
toSerialize,err := o.ToMap()
|
|
||||||
if err != nil {
|
|
||||||
return []byte{}, err
|
|
||||||
}
|
|
||||||
return json.Marshal(toSerialize)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o BigCatAllOf) ToMap() (map[string]interface{}, error) {
|
|
||||||
toSerialize := map[string]interface{}{}
|
|
||||||
if !IsNil(o.Kind) {
|
|
||||||
toSerialize["kind"] = o.Kind
|
|
||||||
}
|
|
||||||
return toSerialize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type NullableBigCatAllOf struct {
|
|
||||||
value *BigCatAllOf
|
|
||||||
isSet bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableBigCatAllOf) Get() *BigCatAllOf {
|
|
||||||
return v.value
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableBigCatAllOf) Set(val *BigCatAllOf) {
|
|
||||||
v.value = val
|
|
||||||
v.isSet = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableBigCatAllOf) IsSet() bool {
|
|
||||||
return v.isSet
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableBigCatAllOf) Unset() {
|
|
||||||
v.value = nil
|
|
||||||
v.isSet = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewNullableBigCatAllOf(val *BigCatAllOf) *NullableBigCatAllOf {
|
|
||||||
return &NullableBigCatAllOf{value: val, isSet: true}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableBigCatAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
return json.Marshal(v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableBigCatAllOf) UnmarshalJSON(src []byte) error {
|
|
||||||
v.isSet = true
|
|
||||||
return json.Unmarshal(src, &v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
|||||||
/*
|
|
||||||
OpenAPI Petstore
|
|
||||||
|
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
|
|
||||||
API version: 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
)
|
|
||||||
|
|
||||||
// checks if the CatAllOf type satisfies the MappedNullable interface at compile time
|
|
||||||
var _ MappedNullable = &CatAllOf{}
|
|
||||||
|
|
||||||
// CatAllOf struct for CatAllOf
|
|
||||||
type CatAllOf struct {
|
|
||||||
Declawed *bool `json:"declawed,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCatAllOf instantiates a new CatAllOf object
|
|
||||||
// This constructor will assign default values to properties that have it defined,
|
|
||||||
// and makes sure properties required by API are set, but the set of arguments
|
|
||||||
// will change when the set of required properties is changed
|
|
||||||
func NewCatAllOf() *CatAllOf {
|
|
||||||
this := CatAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCatAllOfWithDefaults instantiates a new CatAllOf object
|
|
||||||
// This constructor will only assign default values to properties that have it defined,
|
|
||||||
// but it doesn't guarantee that properties required by API are set
|
|
||||||
func NewCatAllOfWithDefaults() *CatAllOf {
|
|
||||||
this := CatAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeclawed returns the Declawed field value if set, zero value otherwise.
|
|
||||||
func (o *CatAllOf) GetDeclawed() bool {
|
|
||||||
if o == nil || IsNil(o.Declawed) {
|
|
||||||
var ret bool
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Declawed
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *CatAllOf) GetDeclawedOk() (*bool, bool) {
|
|
||||||
if o == nil || IsNil(o.Declawed) {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Declawed, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasDeclawed returns a boolean if a field has been set.
|
|
||||||
func (o *CatAllOf) HasDeclawed() bool {
|
|
||||||
if o != nil && !IsNil(o.Declawed) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
|
|
||||||
func (o *CatAllOf) SetDeclawed(v bool) {
|
|
||||||
o.Declawed = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o CatAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
toSerialize,err := o.ToMap()
|
|
||||||
if err != nil {
|
|
||||||
return []byte{}, err
|
|
||||||
}
|
|
||||||
return json.Marshal(toSerialize)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o CatAllOf) ToMap() (map[string]interface{}, error) {
|
|
||||||
toSerialize := map[string]interface{}{}
|
|
||||||
if !IsNil(o.Declawed) {
|
|
||||||
toSerialize["declawed"] = o.Declawed
|
|
||||||
}
|
|
||||||
return toSerialize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type NullableCatAllOf struct {
|
|
||||||
value *CatAllOf
|
|
||||||
isSet bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableCatAllOf) Get() *CatAllOf {
|
|
||||||
return v.value
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableCatAllOf) Set(val *CatAllOf) {
|
|
||||||
v.value = val
|
|
||||||
v.isSet = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableCatAllOf) IsSet() bool {
|
|
||||||
return v.isSet
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableCatAllOf) Unset() {
|
|
||||||
v.value = nil
|
|
||||||
v.isSet = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewNullableCatAllOf(val *CatAllOf) *NullableCatAllOf {
|
|
||||||
return &NullableCatAllOf{value: val, isSet: true}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableCatAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
return json.Marshal(v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error {
|
|
||||||
v.isSet = true
|
|
||||||
return json.Unmarshal(src, &v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
|||||||
/*
|
|
||||||
OpenAPI Petstore
|
|
||||||
|
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
|
|
||||||
API version: 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
)
|
|
||||||
|
|
||||||
// checks if the DogAllOf type satisfies the MappedNullable interface at compile time
|
|
||||||
var _ MappedNullable = &DogAllOf{}
|
|
||||||
|
|
||||||
// DogAllOf struct for DogAllOf
|
|
||||||
type DogAllOf struct {
|
|
||||||
Breed *string `json:"breed,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDogAllOf instantiates a new DogAllOf object
|
|
||||||
// This constructor will assign default values to properties that have it defined,
|
|
||||||
// and makes sure properties required by API are set, but the set of arguments
|
|
||||||
// will change when the set of required properties is changed
|
|
||||||
func NewDogAllOf() *DogAllOf {
|
|
||||||
this := DogAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDogAllOfWithDefaults instantiates a new DogAllOf object
|
|
||||||
// This constructor will only assign default values to properties that have it defined,
|
|
||||||
// but it doesn't guarantee that properties required by API are set
|
|
||||||
func NewDogAllOfWithDefaults() *DogAllOf {
|
|
||||||
this := DogAllOf{}
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetBreed returns the Breed field value if set, zero value otherwise.
|
|
||||||
func (o *DogAllOf) GetBreed() string {
|
|
||||||
if o == nil || IsNil(o.Breed) {
|
|
||||||
var ret string
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Breed
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *DogAllOf) GetBreedOk() (*string, bool) {
|
|
||||||
if o == nil || IsNil(o.Breed) {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Breed, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasBreed returns a boolean if a field has been set.
|
|
||||||
func (o *DogAllOf) HasBreed() bool {
|
|
||||||
if o != nil && !IsNil(o.Breed) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBreed gets a reference to the given string and assigns it to the Breed field.
|
|
||||||
func (o *DogAllOf) SetBreed(v string) {
|
|
||||||
o.Breed = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o DogAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
toSerialize,err := o.ToMap()
|
|
||||||
if err != nil {
|
|
||||||
return []byte{}, err
|
|
||||||
}
|
|
||||||
return json.Marshal(toSerialize)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o DogAllOf) ToMap() (map[string]interface{}, error) {
|
|
||||||
toSerialize := map[string]interface{}{}
|
|
||||||
if !IsNil(o.Breed) {
|
|
||||||
toSerialize["breed"] = o.Breed
|
|
||||||
}
|
|
||||||
return toSerialize, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type NullableDogAllOf struct {
|
|
||||||
value *DogAllOf
|
|
||||||
isSet bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableDogAllOf) Get() *DogAllOf {
|
|
||||||
return v.value
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableDogAllOf) Set(val *DogAllOf) {
|
|
||||||
v.value = val
|
|
||||||
v.isSet = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableDogAllOf) IsSet() bool {
|
|
||||||
return v.isSet
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableDogAllOf) Unset() {
|
|
||||||
v.value = nil
|
|
||||||
v.isSet = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewNullableDogAllOf(val *DogAllOf) *NullableDogAllOf {
|
|
||||||
return &NullableDogAllOf{value: val, isSet: true}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableDogAllOf) MarshalJSON() ([]byte, error) {
|
|
||||||
return json.Marshal(v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error {
|
|
||||||
v.isSet = true
|
|
||||||
return json.Unmarshal(src, &v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
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