diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 261614814cd..694377a1d83 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -171,6 +171,8 @@ public interface CodegenConfig { void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map> operations); + Map updateAllModels(Map objs); + Map postProcessAllModels(Map objs); Map postProcessModels(Map objs); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 77e73cc098b..799dc02ca9e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -22,11 +22,13 @@ import io.swagger.v3.oas.models.ExternalDocumentation; import java.util.*; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.apache.commons.lang3.builder.ToStringBuilder; @JsonIgnoreProperties({"parentModel", "interfaceModels"}) public class CodegenModel { public String parent, parentSchema; public List interfaces; + public List allParents; // References to parent and interface CodegenModels. Only set when code generator supports inheritance. public CodegenModel parentModel; @@ -46,18 +48,18 @@ public class CodegenModel { public String arrayModelType; public boolean isAlias; // Is this effectively an alias of another simple type public boolean isString, isInteger; - public List vars = new ArrayList(); + public List vars = new ArrayList(); // all properties (without parent's properties) + public List allVars = new ArrayList(); // all properties (with parent's properties) public List requiredVars = new ArrayList(); // a list of required properties public List optionalVars = new ArrayList(); // a list of optional properties public List readOnlyVars = new ArrayList(); // a list of read-only properties public List readWriteVars = new ArrayList(); // a list of properties for read, write - public List allVars = new ArrayList(); public List parentVars = new ArrayList(); public Map allowableValues; // Sorted sets of required parameters. - public Set mandatory = new TreeSet(); - public Set allMandatory; + public Set mandatory = new TreeSet(); // without parent's required properties + public Set allMandatory = new TreeSet(); // with parent's required properties public Set imports = new TreeSet(); public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasRequired, hasOptional, isArrayModel, hasChildren, isMapModel; @@ -69,16 +71,59 @@ public class CodegenModel { //The type of the value from additional properties. Used in map like objects. public String additionalPropertiesType; - { - // By default these are the same collections. Where the code generator supports inheritance, composed models - // store the complete closure of owned and inherited properties in allVars and allMandatory. - allVars = vars; - allMandatory = mandatory; - } - @Override public String toString() { - return String.format(Locale.ROOT, "%s(%s)", name, classname); + return new ToStringBuilder(this) + .append("parent", parent) + .append("parentSchema", parentSchema) + .append("interfaces", interfaces) + .append("parentModel", parentModel) + .append("interfaceModels", interfaceModels) + .append("children", children) + .append("name", name) + .append("classname", classname) + .append("title", title) + .append("description", description) + .append("classVarName", classVarName) + .append("modelJson", modelJson) + .append("dataType", dataType) + .append("xmlPrefix", xmlPrefix) + .append("xmlNamespace", xmlNamespace) + .append("xmlName", xmlName) + .append("classFilename", classFilename) + .append("unescapedDescription", unescapedDescription) + .append("discriminator", discriminator) + .append("defaultValue", defaultValue) + .append("arrayModelType", arrayModelType) + .append("isAlias", isAlias) + .append("isString", isString) + .append("isInteger", isInteger) + .append("vars", vars) + .append("requiredVars", requiredVars) + .append("optionalVars", optionalVars) + .append("readOnlyVars", readOnlyVars) + .append("readWriteVars", readWriteVars) + .append("allVars", allVars) + .append("parentVars", parentVars) + .append("allowableValues", allowableValues) + .append("mandatory", mandatory) + .append("allMandatory", allMandatory) + .append("imports", imports) + .append("hasVars", hasVars) + .append("emptyVars", emptyVars) + .append("hasMoreModels", hasMoreModels) + .append("hasEnums", hasEnums) + .append("isEnum", isEnum) + .append("hasRequired", hasRequired) + .append("hasOptional", hasOptional) + .append("isArrayModel", isArrayModel) + .append("hasChildren", hasChildren) + .append("isMapModel", isMapModel) + .append("hasOnlyReadOnly", hasOnlyReadOnly) + .append("externalDocumentation", externalDocumentation) + .append("vendorExtensions", vendorExtensions) + .append("additionalPropertiesType", additionalPropertiesType) + .toString(); } @Override @@ -94,6 +139,8 @@ public class CodegenModel { return false; if (interfaces != null ? !interfaces.equals(that.interfaces) : that.interfaces != null) return false; + if (allParents != null ? !allParents.equals(that.allParents) : that.allParents != null) + return false; if (parentModel != null ? !parentModel.equals(that.parentModel) : that.parentModel != null) return false; if (interfaceModels != null ? !interfaceModels.equals(that.interfaceModels) : that.interfaceModels != null) @@ -169,6 +216,7 @@ public class CodegenModel { int result = parent != null ? parent.hashCode() : 0; result = 31 * result + (parentSchema != null ? parentSchema.hashCode() : 0); result = 31 * result + (interfaces != null ? interfaces.hashCode() : 0); + result = 31 * result + (allParents != null ? allParents.hashCode() : 0); result = 31 * result + (parentModel != null ? parentModel.hashCode() : 0); result = 31 * result + (interfaceModels != null ? interfaceModels.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); @@ -226,10 +274,18 @@ public class CodegenModel { return interfaces; } + public List getAllParents() { + return allParents; + } + public void setInterfaces(List interfaces) { this.interfaces = interfaces; } + public void setAllParents(List allParents) { + this.allParents = allParents; + } + public CodegenModel getParentModel() { return parentModel; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index 519568f299e..508e097ad92 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -61,6 +61,7 @@ public class CodegenProperty implements Cloneable { public boolean isReadOnly; public boolean isWriteOnly; public boolean isNullable; + public boolean isSelfReference; public List _enum; public Map allowableValues; public CodegenProperty items; @@ -439,6 +440,7 @@ public class CodegenProperty implements Cloneable { result = prime * result + ((isReadOnly ? 13 : 31)); result = prime * result + ((isWriteOnly ? 13 : 31)); result = prime * result + ((isNullable ? 13 : 31)); + result = prime * result + ((isSelfReference ? 13 : 31)); result = prime * result + ((items == null) ? 0 : items.hashCode()); result = prime * result + ((mostInnerItems == null) ? 0 : mostInnerItems.hashCode()); result = prime * result + ((jsonSchema == null) ? 0 : jsonSchema.hashCode()); @@ -597,6 +599,9 @@ public class CodegenProperty implements Cloneable { if (this.isNullable != other.isNullable) { return false; } + if (this.isSelfReference != other.isSelfReference ) { + return false; + } if (this._enum != other._enum && (this._enum == null || !this._enum.equals(other._enum))) { return false; } @@ -790,6 +795,7 @@ public class CodegenProperty implements Cloneable { ", isReadOnly=" + isReadOnly + ", isWriteOnly=" + isWriteOnly + ", isNullable=" + isNullable + + ", isSelfReference=" + isSelfReference + ", _enum=" + _enum + ", allowableValues=" + allowableValues + ", items=" + items + diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 832a0619318..b4edf3bb4b4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -115,6 +115,7 @@ public class DefaultCodegen implements CodegenConfig { protected List cliOptions = new ArrayList(); protected boolean skipOverwrite; protected boolean removeOperationIdPrefix; + protected boolean supportsMultipleInheritance; protected boolean supportsInheritance; protected boolean supportsMixins; protected Map supportedLibraries = new LinkedHashMap(); @@ -212,53 +213,79 @@ public class DefaultCodegen implements CodegenConfig { // override with any special post-processing for all models @SuppressWarnings({"static-method", "unchecked"}) public Map postProcessAllModels(Map objs) { - if (supportsInheritance) { - // Index all CodegenModels by model name. - Map allModels = new HashMap(); - for (Entry entry : objs.entrySet()) { - String modelName = toModelName(entry.getKey()); - Map inner = (Map) entry.getValue(); - List> models = (List>) inner.get("models"); - for (Map mo : models) { - CodegenModel cm = (CodegenModel) mo.get("model"); - allModels.put(modelName, cm); - } + return objs; + } + + /** + * Loop through all models to update different flags (e.g. isSelfReference), children models, etc + * + * @param objs Map of models + * @return maps of models with various updates + */ + public Map updateAllModels(Map objs) { + // Index all CodegenModels by model name. + Map allModels = new HashMap(); + for (Entry entry : objs.entrySet()) { + String modelName = toModelName(entry.getKey()); + Map inner = (Map) entry.getValue(); + List> models = (List>) inner.get("models"); + for (Map mo : models) { + CodegenModel cm = (CodegenModel) mo.get("model"); + allModels.put(modelName, cm); } - // Fix up all parent and interface CodegenModel references. - for (CodegenModel cm : allModels.values()) { - if (cm.getParent() != null) { - cm.setParentModel(allModels.get(cm.getParent())); - } - if (cm.getInterfaces() != null && !cm.getInterfaces().isEmpty()) { - cm.setInterfaceModels(new ArrayList(cm.getInterfaces().size())); - for (String intf : cm.getInterfaces()) { - CodegenModel intfModel = allModels.get(intf); - if (intfModel != null) { - cm.getInterfaceModels().add(intfModel); - } - } - } + } + // Fix up all parent and interface CodegenModel references. + for (CodegenModel cm : allModels.values()) { + if (cm.getParent() != null) { + cm.setParentModel(allModels.get(cm.getParent())); } - // Let parent know about all its children - for (String name : allModels.keySet()) { - CodegenModel cm = allModels.get(name); - CodegenModel parent = allModels.get(cm.getParent()); - // if a discriminator exists on the parent, don't add this child to the inheritance hierarchy - // TODO Determine what to do if the parent discriminator name == the grandparent discriminator name - while (parent != null) { - if (parent.getChildren() == null) { - parent.setChildren(new ArrayList()); - } - parent.getChildren().add(cm); - parent.hasChildren = true; - if (parent.getDiscriminator() == null) { - parent = allModels.get(parent.getParent()); - } else { - parent = null; + if (cm.getInterfaces() != null && !cm.getInterfaces().isEmpty()) { + cm.setInterfaceModels(new ArrayList(cm.getInterfaces().size())); + for (String intf : cm.getInterfaces()) { + CodegenModel intfModel = allModels.get(intf); + if (intfModel != null) { + cm.getInterfaceModels().add(intfModel); } } } } + // Let parent know about all its children + for (String name : allModels.keySet()) { + CodegenModel cm = allModels.get(name); + CodegenModel parent = allModels.get(cm.getParent()); + // if a discriminator exists on the parent, don't add this child to the inheritance hierarchy + // TODO Determine what to do if the parent discriminator name == the grandparent discriminator name + while (parent != null) { + if (parent.getChildren() == null) { + parent.setChildren(new ArrayList()); + } + parent.getChildren().add(cm); + parent.hasChildren = true; + if (parent.getDiscriminator() == null) { + parent = allModels.get(parent.getParent()); + } else { + parent = null; + } + } + } + + // loop through properties of each model to detect self-reference + for (Map.Entry entry : objs.entrySet()) { + Map inner = (Map) entry.getValue(); + List> models = (List>) inner.get("models"); + for (Map mo : models) { + CodegenModel cm = (CodegenModel) mo.get("model"); + for (CodegenProperty cp : cm.allVars) { + // detect self import + if (cp.dataType.equals(cm.classname) || + (cp.isContainer && cp.items.dataType.equals(cm.classname))) { + cm.imports.remove(cm.classname); // remove self import + cp.isSelfReference = true; + } + } + } + } + return objs; } @@ -1618,6 +1645,7 @@ public class DefaultCodegen implements CodegenConfig { // parent model final String parentName = ModelUtils.getParentName(composed, allDefinitions); + final List allParents = ModelUtils.getAllParentsName(composed, allDefinitions); final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName); final boolean hasParent = StringUtils.isNotBlank(parentName); @@ -1666,19 +1694,16 @@ public class DefaultCodegen implements CodegenConfig { m.interfaces.add(modelName); addImport(m, modelName); if (allDefinitions != null && refSchema != null) { - if (hasParent || supportsInheritance) { - if (supportsInheritance || parentName.equals(modelName)) { - // inheritance - addProperties(allProperties, allRequired, refSchema, allDefinitions); - } else { - // composition - //LOGGER.debug("Parent {} not set to model name {}", parentName, modelName); - addProperties(properties, required, refSchema, allDefinitions); - } - } else if (!supportsMixins && !supportsInheritance) { + if (allParents.contains(modelName) && supportsMultipleInheritance) { + // multiple inheritance + addProperties(allProperties, allRequired, refSchema, allDefinitions); + } else if (parentName != null && parentName.equals(modelName) && supportsInheritance) { + // single inheritance + addProperties(allProperties, allRequired, refSchema, allDefinitions); + } else { + // composition addProperties(properties, required, refSchema, allDefinitions); } - } if (composed.getAnyOf() != null) { @@ -1696,13 +1721,16 @@ public class DefaultCodegen implements CodegenConfig { if (parent != null) { m.parentSchema = parentName; m.parent = toModelName(parentName); - addImport(m, m.parent); - if (allDefinitions != null && !allDefinitions.isEmpty()) { - if (hasParent || supportsInheritance) { - addProperties(allProperties, allRequired, parent, allDefinitions); - } else { - addProperties(properties, required, parent, allDefinitions); + + if (supportsMultipleInheritance) { + m.allParents = new ArrayList(); + for (String pname : allParents) { + String pModelName = toModelName(pname); + m.allParents.add(pModelName); + addImport(m, pModelName); } + } else { // single inheritance + addImport(m, m.parent); } } @@ -1713,15 +1741,14 @@ public class DefaultCodegen implements CodegenConfig { // component is the child schema addProperties(properties, required, component, allDefinitions); - if (hasParent || supportsInheritance) { - addProperties(allProperties, allRequired, component, allDefinitions); - } + // includes child's properties (all, required) in allProperties, allRequired + addProperties(allProperties, allRequired, component, allDefinitions); } - break; // at most one schema not using $ref + break; // at most one child only } } - addVars(m, unaliasPropertySchema(allDefinitions, properties), required, allProperties, allRequired); + addVars(m, unaliasPropertySchema(allDefinitions, properties), required, unaliasPropertySchema(allDefinitions, allProperties), allRequired); // end of code block for composed schema } else { @@ -1745,7 +1772,8 @@ public class DefaultCodegen implements CodegenConfig { m.isString = Boolean.TRUE; } - addVars(m, unaliasPropertySchema(allDefinitions, schema.getProperties()), schema.getRequired()); + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(allDefinitions, schema.getProperties()), schema.getRequired(), null, null); } // remove duplicated properties @@ -1797,9 +1825,19 @@ public class DefaultCodegen implements CodegenConfig { addParentContainer(codegenModel, codegenModel.name, schema); } + /** + * Add schema's properties to "properties" and "required" list + * + * @param properties all properties + * @param required required property only + * @param schema schema in which the properties will be added to the lists + * @param allSchemas all schemas + */ protected void addProperties(Map properties, List required, Schema schema, Map allSchemas) { if (schema instanceof ComposedSchema) { + throw new RuntimeException("Please report the issue: Cannot process Composed Schema in addProperties: " + schema); + /* ComposedSchema composedSchema = (ComposedSchema) schema; if (composedSchema.getAllOf() == null) { return; @@ -1809,8 +1847,11 @@ public class DefaultCodegen implements CodegenConfig { addProperties(properties, required, component, allSchemas); } return; + */ } + Schema unaliasSchema = ModelUtils.unaliasSchema(globalSchemas, schema); + if (StringUtils.isNotBlank(schema.get$ref())) { Schema interfaceSchema = allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())); addProperties(properties, required, interfaceSchema, allSchemas); @@ -3425,49 +3466,69 @@ public class DefaultCodegen implements CodegenConfig { return properties; } - private void addVars(CodegenModel model, Map properties, List required) { - addVars(model, properties, required, null, null); - } - private void addVars(CodegenModel m, Map properties, List required, Map allProperties, List allRequired) { m.hasRequired = false; if (properties != null && !properties.isEmpty()) { m.hasVars = true; - m.hasEnums = false; + m.hasEnums = false; // TODO need to fix as its false in both cases Set mandatory = required == null ? Collections.emptySet() : new TreeSet(required); + + // update "vars" without parent's properties (all, required) addVars(m, m.vars, properties, mandatory); m.allMandatory = m.mandatory = mandatory; } else { m.emptyVars = true; m.hasVars = false; - m.hasEnums = false; + m.hasEnums = false; // TODO need to fix as its false in both cases } if (allProperties != null) { Set allMandatory = allRequired == null ? Collections.emptySet() : new TreeSet(allRequired); + // update "vars" with parent's properties (all, required) addVars(m, m.allVars, allProperties, allMandatory); m.allMandatory = allMandatory; + } else { // without parent, allVars and vars are the same + m.allVars = m.vars; + m.allMandatory = m.mandatory; } + + // loop through list to update property name with toVarName + Set renamedMandatory = new TreeSet(); + Iterator mandatoryIterator = m.mandatory.iterator(); + while (mandatoryIterator.hasNext()) { + renamedMandatory.add(toVarName(mandatoryIterator.next())); + } + m.mandatory = renamedMandatory; + + Set renamedAllMandatory = new TreeSet(); + Iterator allMandatoryIterator = m.allMandatory.iterator(); + while (allMandatoryIterator.hasNext()) { + renamedAllMandatory.add(toVarName(allMandatoryIterator.next())); + } + m.allMandatory = renamedAllMandatory; } - private void addVars(CodegenModel - m, List vars, Map properties, Set mandatory) { - // convert set to list so that we can access the next entry in the loop - List> propertyList = new ArrayList>(properties.entrySet()); - final int totalCount = propertyList.size(); - for (int i = 0; i < totalCount; i++) { - Map.Entry entry = propertyList.get(i); + /** + * Add variables (properties) to codegen model (list of properties, various flags, etc) + * + * @param m Codegen model + * @param vars list of codegen properties (e.g. vars, allVars) to be updated with the new properties + * @param properties a map of properties (schema) + * @param mandatory a set of required properties' name + */ + private void addVars(CodegenModel m, List vars, Map properties, Set mandatory) { + for (Map.Entry entry : properties.entrySet()) { final String key = entry.getKey(); final Schema prop = entry.getValue(); if (prop == null) { - LOGGER.warn("null property for " + key); + LOGGER.warn("Please report the issue. There shouldn't be null property for " + key); } else { final CodegenProperty cp = fromProperty(key, prop); cp.required = mandatory.contains(key); @@ -3484,14 +3545,7 @@ public class DefaultCodegen implements CodegenConfig { m.hasOnlyReadOnly = false; } - if (i + 1 != totalCount) { - cp.hasMore = true; - // check the next entry to see if it's read only - if (!Boolean.TRUE.equals(propertyList.get(i + 1).getValue().getReadOnly())) { - cp.hasMoreNonReadOnly = true; // next entry is not ready only - } - } - + // TODO revise the logic to include map if (cp.isContainer) { addImport(m, typeMapping.get("array")); } @@ -3515,7 +3569,7 @@ public class DefaultCodegen implements CodegenConfig { if (Boolean.TRUE.equals(cp.isReadOnly)) { m.readOnlyVars.add(cp); } else { // else add to readWriteVars (list of properties) - // FIXME: readWriteVars can contain duplicated properties. Debug/breakpoint here while running C# generator (Dog and Cat models) + // duplicated properties will be removed by removeAllDuplicatedProperty later m.readWriteVars.add(cp); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 1ffa43cc145..2d6506555fc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -458,6 +458,9 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { } } + // loop through all models to update children models, isSelfReference, isCircularReference, etc + allProcessedModels = config.updateAllModels(allProcessedModels); + // post process all processed models allProcessedModels = config.postProcessAllModels(allProcessedModels); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index c6a81150c02..3e0db4a7c7c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -54,6 +54,9 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp supportsInheritance = true; + // to support multiple inheritance e.g. export interface ModelC extends ModelA, ModelB + //supportsMultipleInheritance = true; + // NOTE: TypeScript uses camel cased reserved words, while models are title cased. We don't want lowercase comparisons. reservedWords.addAll(Arrays.asList( // local variable names used in API methods (endpoints) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index c8151053f6a..1efe05c14b5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -1046,6 +1046,16 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo } } + for (CodegenProperty var : cm.allVars) { + // Add JSDoc @type value for this property. + String jsDocType = getJSDocType(cm, var); + var.vendorExtensions.put("x-jsdoc-type", jsDocType); + + if (Boolean.TRUE.equals(var.required)) { + required.add(var); + } + } + if (supportsInheritance || supportsMixins) { for (CodegenProperty var : cm.allVars) { if (Boolean.TRUE.equals(var.required)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index b873fb10bbf..1260b334af7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -762,5 +762,4 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig } } } - } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index b9f0acbf92f..de4179fdf1a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -68,6 +68,8 @@ public class RubyClientCodegen extends AbstractRubyCodegen { public RubyClientCodegen() { super(); + supportsInheritance = true; + // clear import mapping (from default generator) as ruby does not use it // at the moment importMapping.clear(); @@ -112,6 +114,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { itr.remove(); } } + cliOptions.add(new CliOption(GEM_NAME, "gem name (convention: underscore_case)."). defaultValue("openapi_client")); cliOptions.add(new CliOption(MODULE_NAME, "top module name (convention: CamelCase, usually corresponding" + diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 518a1c44892..73957e2cacb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -877,6 +877,35 @@ public class ModelUtils { return null; } + public static List getAllParentsName(ComposedSchema composedSchema, Map allSchemas) { + List interfaces = getInterfaces(composedSchema); + List names = new ArrayList(); + + if (interfaces != null && !interfaces.isEmpty()) { + for (Schema schema : interfaces) { + // get the actual schema + if (StringUtils.isNotEmpty(schema.get$ref())) { + String parentName = getSimpleRef(schema.get$ref()); + Schema s = allSchemas.get(parentName); + if (s == null) { + LOGGER.error("Failed to obtain schema from {}", parentName); + names.add("UNKNOWN_PARENT_NAME"); + } else if (s.getDiscriminator() != null && StringUtils.isNotEmpty(s.getDiscriminator().getPropertyName())) { + // discriminator.propertyName is used + names.add(parentName); + } else { + LOGGER.debug("Not a parent since discriminator.propertyName is not set {}", s.get$ref()); + // not a parent since discriminator.propertyName is not set + } + } else { + // not a ref, doing nothing + } + } + } + + return names; + } + public static boolean isNullable(Schema schema) { if (schema == null) { return false; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache index 9ec6e67dde9..63ccda17dcd 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache @@ -1,4 +1,4 @@ -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{>modelGenericAdditionalProperties}} +export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{.}}}{{^-last}}, {{/-last}}{{/allParents}} { {{>modelGenericAdditionalProperties}} {{#vars}} {{#description}} /** @@ -7,4 +7,4 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{>m {{/description}} {{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; {{/vars}} -}{{>modelGenericEnums}} \ No newline at end of file +}{{>modelGenericEnums}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java index 2512812d774..6460b97ecdd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java @@ -208,23 +208,80 @@ public class RubyClientCodegenTest { final Schema schema = openAPI.getComponents().getSchemas().get("Pet"); CodegenModel nullablePet = codegen.fromModel("Pet", schema, openAPI.getComponents().getSchemas()); + + Assert.assertNotNull(nullablePet); + Assert.assertEquals(nullablePet.getVars().size(), 6); CodegenProperty cp0 = nullablePet.getVars().get(0); Assert.assertFalse(cp0.isNullable); + Assert.assertEquals(cp0.name, "id"); CodegenProperty cp1 = nullablePet.getVars().get(1); Assert.assertFalse(cp1.isNullable); + Assert.assertEquals(cp1.name, "category"); CodegenProperty cp2 = nullablePet.getVars().get(2); Assert.assertFalse(cp2.isNullable); + Assert.assertEquals(cp2.name, "name"); CodegenProperty cp3 = nullablePet.getVars().get(3); Assert.assertFalse(cp3.isNullable); + Assert.assertEquals(cp3.name, "photo_urls"); CodegenProperty cp4 = nullablePet.getVars().get(4); Assert.assertFalse(cp4.isNullable); + Assert.assertEquals(cp4.name, "tags"); CodegenProperty cp5 = nullablePet.getVars().get(5); Assert.assertFalse(cp5.isNullable); + Assert.assertEquals(cp5.name, "status"); + + // test allVars + Assert.assertEquals(nullablePet.getAllVars().size(), 6); + cp0 = nullablePet.getVars().get(0); + Assert.assertFalse(cp0.isNullable); + Assert.assertEquals(cp0.name, "id"); + + cp1 = nullablePet.getVars().get(1); + Assert.assertFalse(cp1.isNullable); + Assert.assertEquals(cp1.name, "category"); + + cp2 = nullablePet.getVars().get(2); + Assert.assertFalse(cp2.isNullable); + Assert.assertEquals(cp2.name, "name"); + + cp3 = nullablePet.getVars().get(3); + Assert.assertFalse(cp3.isNullable); + Assert.assertEquals(cp3.name, "photo_urls"); + + cp4 = nullablePet.getVars().get(4); + Assert.assertFalse(cp4.isNullable); + Assert.assertEquals(cp4.name, "tags"); + + cp5 = nullablePet.getVars().get(5); + Assert.assertFalse(cp5.isNullable); + Assert.assertEquals(cp5.name, "status"); + + // test requiredVars + Assert.assertEquals(nullablePet.getRequiredVars().size(), 2); + cp0 = nullablePet.getRequiredVars().get(0); + Assert.assertFalse(cp0.isNullable); + Assert.assertEquals(cp0.name, "name"); + + cp1 = nullablePet.getRequiredVars().get(1); + Assert.assertFalse(cp1.isNullable); + Assert.assertEquals(cp1.name, "photo_urls"); + + // test mandatory + Set mandatory = new TreeSet(); + mandatory.add("name"); + mandatory.add("photo_urls"); + Assert.assertEquals(nullablePet.getMandatory(), mandatory); + + // test allMandatory + Set allMandatory = new TreeSet(); + allMandatory.add("name"); + allMandatory.add("photo_urls"); + Assert.assertEquals(nullablePet.getAllMandatory(), allMandatory); } @Test(description = "test nullable for parameters (OAS3)") @@ -349,8 +406,8 @@ public class RubyClientCodegenTest { } - @Test(description = "test allOf with discriminator and duplicated properties(OAS3)") - public void allOfMappingDuplicatedPropertiesTest() { + @Test(description = "test allOf with discriminator and duplicated properties(OAS3) for Child model") + public void allOfMappingDuplicatedPropertiesTestForChild() { final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml", null, new ParseOptions()).getOpenAPI(); final RubyClientCodegen codegen = new RubyClientCodegen(); codegen.setModuleName("OnlinePetstore"); @@ -358,25 +415,108 @@ public class RubyClientCodegenTest { final Schema schema = openAPI.getComponents().getSchemas().get("Child"); CodegenModel child = codegen.fromModel("Child", schema, openAPI.getComponents().getSchemas()); Assert.assertNotNull(child); - Assert.assertEquals(child.getVars().size(), 6); - CodegenProperty cp0 = child.getVars().get(0); + // to test allVars (without parent's properties) + Assert.assertEquals(child.getAllVars().size(), 7); + + CodegenProperty cp0 = child.getAllVars().get(0); + Assert.assertEquals(cp0.name, "_type"); + + CodegenProperty cp1 = child.getAllVars().get(1); + Assert.assertEquals(cp1.name, "last_name"); + + CodegenProperty cp2 = child.getAllVars().get(2); + Assert.assertEquals(cp2.name, "first_name"); + + CodegenProperty cp3 = child.getAllVars().get(3); + Assert.assertEquals(cp3.name, "duplicated_optional"); + + CodegenProperty cp4 = child.getAllVars().get(4); + Assert.assertEquals(cp4.name, "duplicated_required"); + + CodegenProperty cp5 = child.getAllVars().get(5); + Assert.assertEquals(cp5.name, "person_required"); + + CodegenProperty cp6 = child.getAllVars().get(6); + Assert.assertEquals(cp6.name, "age"); + + // to test vars (without parent's properties) + Assert.assertEquals(child.getVars().size(), 2); + + cp0 = child.getVars().get(0); Assert.assertEquals(cp0.name, "age"); - CodegenProperty cp1 = child.getVars().get(1); + cp1 = child.getVars().get(1); Assert.assertEquals(cp1.name, "first_name"); - CodegenProperty cp2 = child.getVars().get(2); - Assert.assertEquals(cp2.name, "_type"); + // to test requiredVars + Assert.assertEquals(child.getRequiredVars().size(), 2); - CodegenProperty cp3 = child.getVars().get(3); - Assert.assertEquals(cp3.name, "last_name"); + cp0 = child.getRequiredVars().get(0); + Assert.assertEquals(cp0.name, "duplicated_required"); - CodegenProperty cp4 = child.getVars().get(4); - Assert.assertEquals(cp4.name, "duplicated_optional"); + cp1 = child.getRequiredVars().get(1); + Assert.assertEquals(cp1.name, "person_required"); - CodegenProperty cp5 = child.getVars().get(5); - Assert.assertEquals(cp5.name, "duplicated_required"); + } + + @Test(description = "test allOf with discriminator and duplicated properties(OAS3) for Adult model") + public void allOfMappingDuplicatedPropertiesTestForAdult() { + final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml", null, new ParseOptions()).getOpenAPI(); + final RubyClientCodegen codegen = new RubyClientCodegen(); + codegen.setModuleName("OnlinePetstore"); + + final Schema schema = openAPI.getComponents().getSchemas().get("Adult"); + CodegenModel adult = codegen.fromModel("Adult", schema, openAPI.getComponents().getSchemas()); + Assert.assertNotNull(adult); + + // to test allVars (without parent's properties) + Assert.assertEquals(adult.getAllVars().size(), 8); + + CodegenProperty cp0 = adult.getAllVars().get(0); + Assert.assertEquals(cp0.name, "_type"); + + CodegenProperty cp1 = adult.getAllVars().get(1); + Assert.assertEquals(cp1.name, "last_name"); + + CodegenProperty cp2 = adult.getAllVars().get(2); + Assert.assertEquals(cp2.name, "first_name"); + + CodegenProperty cp3 = adult.getAllVars().get(3); + Assert.assertEquals(cp3.name, "duplicated_optional"); + + CodegenProperty cp4 = adult.getAllVars().get(4); + Assert.assertEquals(cp4.name, "duplicated_required"); + + CodegenProperty cp5 = adult.getAllVars().get(5); + Assert.assertEquals(cp5.name, "person_required"); + + CodegenProperty cp6 = adult.getAllVars().get(6); + Assert.assertEquals(cp6.name, "children"); + + CodegenProperty cp7 = adult.getAllVars().get(7); + Assert.assertEquals(cp7.name, "adult_required"); + + // to test vars (without parent's properties) + Assert.assertEquals(adult.getVars().size(), 4); + + cp0 = adult.getVars().get(0); + Assert.assertEquals(cp0.name, "duplicated_optional"); + + cp1 = adult.getVars().get(1); + Assert.assertEquals(cp1.name, "duplicated_required"); + + cp2 = adult.getVars().get(2); + Assert.assertEquals(cp2.name, "children"); + + // to test requiredVars + Assert.assertEquals(adult.getRequiredVars().size(), 2); + + cp0 = adult.getRequiredVars().get(0); + Assert.assertEquals(cp0.name, "duplicated_required"); + + cp1 = adult.getRequiredVars().get(1); + Assert.assertEquals(cp1.name, "person_required"); } @Test(description = "test example string imported from x-example parameterr (OAS2)") @@ -410,9 +550,9 @@ public class RubyClientCodegenTest { /** * We want to make sure that all Regex patterns: - * - Start with / so Ruby know this is a regex pattern - * - Have a second / that may be added to end if only 1 exists at start - * - If there are 2 / in pattern then don't add any more + * - Start with / so Ruby know this is a regex pattern + * - Have a second / that may be added to end if only 1 exists at start + * - If there are 2 / in pattern then don't add any more */ @Test(description = "test regex patterns") public void exampleRegexParameterValidationOAS3Test() { diff --git a/modules/openapi-generator/src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml b/modules/openapi-generator/src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml index 2e1ec994bb0..11e53012e52 100644 --- a/modules/openapi-generator/src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/allOfMappingDuplicatedProperties.yaml @@ -29,6 +29,7 @@ components: Person: required: - duplicated_required + - person_required type: object discriminator: propertyName: $_type @@ -46,6 +47,9 @@ components: type: string duplicated_required: type: string + person_required: + type: string + format: date-time Adult: description: A representation of an adult allOf: @@ -53,6 +57,7 @@ components: - type: object required: - duplicated_required + - child_required properties: duplicated_optional: type: integer @@ -62,6 +67,8 @@ components: type: array items: $ref: "#/components/schemas/Child" + adult_required: + type: boolean Child: description: A representation of a child allOf: diff --git a/modules/openapi-generator/src/test/resources/3_0/allOfMultiParent.yaml b/modules/openapi-generator/src/test/resources/3_0/allOfMultiParent.yaml new file mode 100644 index 00000000000..7e10f022581 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/allOfMultiParent.yaml @@ -0,0 +1,94 @@ +openapi: 3.0.1 +info: + version: 1.0.0 + title: Example + license: + name: MIT +servers: + - url: http://api.example.xyz/v1 +paths: + /person/display/{personId}: + get: + parameters: + - name: personId + in: path + required: true + description: The id of the person to retrieve + schema: + type: string + operationId: list + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Person" +components: + schemas: + Person: + required: + - duplicated_required + - person_required + type: object + discriminator: + propertyName: $_type + mapping: + a: '#/components/schemas/Adult' + c: '#/components/schemas/Child' + properties: + $_type: + type: string + lastName: + type: string + firstName: + type: string + duplicated_optional: + type: string + duplicated_required: + type: string + person_required: + type: string + format: date-time + Human: + required: + - body + type: object + discriminator: + propertyName: $_type + properties: + $_type: + type: string + body: + type: string + Adult: + description: A representation of an adult + allOf: + - $ref: '#/components/schemas/Person' + - $ref: '#/components/schemas/Human' + - type: object + required: + - duplicated_required + - child_required + properties: + duplicated_optional: + type: integer + duplicated_required: + type: integer + children: + type: array + items: + $ref: "#/components/schemas/Child" + adult_required: + type: boolean + Child: + description: A representation of a child + allOf: + - type: object + properties: + age: + type: integer + format: int32 + firstName: + type: string + - $ref: '#/components/schemas/Person' diff --git a/run-in-docker.sh b/run-in-docker.sh index 31c47764503..80a0f2b8866 100755 --- a/run-in-docker.sh +++ b/run-in-docker.sh @@ -13,6 +13,6 @@ docker run --rm -it \ -e MAVEN_CONFIG=/var/maven/.m2 \ -u "$(id -u):$(id -g)" \ -v "${PWD}:/gen" \ - -v "${maven_cache_repo}:/var/maven/.m2/repository" \ + -v "$HOME/.m2":/root/.m2 \ --entrypoint /gen/docker-entrypoint.sh \ maven:3-jdk-8 "$@" diff --git a/samples/client/petstore/go/go-petstore/docs/Cat.md b/samples/client/petstore/go/go-petstore/docs/Cat.md index 8b39bdf028d..b51d5fd2b95 100644 --- a/samples/client/petstore/go/go-petstore/docs/Cat.md +++ b/samples/client/petstore/go/go-petstore/docs/Cat.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] **ClassName** | **string** | | **Color** | **string** | | [optional] [default to red] +**Declawed** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Dog.md b/samples/client/petstore/go/go-petstore/docs/Dog.md index 2107e83ede5..13c0aa28e6b 100644 --- a/samples/client/petstore/go/go-petstore/docs/Dog.md +++ b/samples/client/petstore/go/go-petstore/docs/Dog.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Breed** | **string** | | [optional] **ClassName** | **string** | | **Color** | **string** | | [optional] [default to red] +**Breed** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/model_cat.go b/samples/client/petstore/go/go-petstore/model_cat.go index 4c8b1bfe599..58b3deeb938 100644 --- a/samples/client/petstore/go/go-petstore/model_cat.go +++ b/samples/client/petstore/go/go-petstore/model_cat.go @@ -10,7 +10,7 @@ package petstore type Cat struct { - Declawed bool `json:"declawed,omitempty"` ClassName string `json:"className"` Color string `json:"color,omitempty"` + Declawed bool `json:"declawed,omitempty"` } diff --git a/samples/client/petstore/go/go-petstore/model_dog.go b/samples/client/petstore/go/go-petstore/model_dog.go index dcd7d1d6353..3f791ca1947 100644 --- a/samples/client/petstore/go/go-petstore/model_dog.go +++ b/samples/client/petstore/go/go-petstore/model_dog.go @@ -10,7 +10,7 @@ package petstore type Dog struct { - Breed string `json:"breed,omitempty"` ClassName string `json:"className"` Color string `json:"color,omitempty"` + Breed string `json:"breed,omitempty"` } diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index e8cb861e188..4e5c2b86857 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -457,26 +457,26 @@ mkCapitalization = -- ** Cat -- | Cat data Cat = Cat - { catDeclawed :: !(Maybe Bool) -- ^ "declawed" - , catClassName :: !(Text) -- ^ /Required/ "className" + { catClassName :: !(Text) -- ^ /Required/ "className" , catColor :: !(Maybe Text) -- ^ "color" + , catDeclawed :: !(Maybe Bool) -- ^ "declawed" } deriving (P.Show, P.Eq, P.Typeable) -- | FromJSON Cat instance A.FromJSON Cat where parseJSON = A.withObject "Cat" $ \o -> Cat - <$> (o .:? "declawed") - <*> (o .: "className") + <$> (o .: "className") <*> (o .:? "color") + <*> (o .:? "declawed") -- | ToJSON Cat instance A.ToJSON Cat where toJSON Cat {..} = _omitNulls - [ "declawed" .= catDeclawed - , "className" .= catClassName + [ "className" .= catClassName , "color" .= catColor + , "declawed" .= catDeclawed ] @@ -486,9 +486,9 @@ mkCat -> Cat mkCat catClassName = Cat - { catDeclawed = Nothing - , catClassName + { catClassName , catColor = Nothing + , catDeclawed = Nothing } -- ** Category @@ -584,26 +584,26 @@ mkClient = -- ** Dog -- | Dog data Dog = Dog - { dogBreed :: !(Maybe Text) -- ^ "breed" - , dogClassName :: !(Text) -- ^ /Required/ "className" + { dogClassName :: !(Text) -- ^ /Required/ "className" , dogColor :: !(Maybe Text) -- ^ "color" + , dogBreed :: !(Maybe Text) -- ^ "breed" } deriving (P.Show, P.Eq, P.Typeable) -- | FromJSON Dog instance A.FromJSON Dog where parseJSON = A.withObject "Dog" $ \o -> Dog - <$> (o .:? "breed") - <*> (o .: "className") + <$> (o .: "className") <*> (o .:? "color") + <*> (o .:? "breed") -- | ToJSON Dog instance A.ToJSON Dog where toJSON Dog {..} = _omitNulls - [ "breed" .= dogBreed - , "className" .= dogClassName + [ "className" .= dogClassName , "color" .= dogColor + , "breed" .= dogBreed ] @@ -613,9 +613,9 @@ mkDog -> Dog mkDog dogClassName = Dog - { dogBreed = Nothing - , dogClassName + { dogClassName , dogColor = Nothing + , dogBreed = Nothing } -- ** EnumArrays diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index d1d6eb09dd9..0b8a2a84813 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -156,11 +156,6 @@ capitalizationAttNameL f Capitalization{..} = (\capitalizationAttName -> Capital -- * Cat --- | 'catDeclawed' Lens -catDeclawedL :: Lens_' Cat (Maybe Bool) -catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed -{-# INLINE catDeclawedL #-} - -- | 'catClassName' Lens catClassNameL :: Lens_' Cat (Text) catClassNameL f Cat{..} = (\catClassName -> Cat { catClassName, ..} ) <$> f catClassName @@ -171,6 +166,11 @@ catColorL :: Lens_' Cat (Maybe Text) catColorL f Cat{..} = (\catColor -> Cat { catColor, ..} ) <$> f catColor {-# INLINE catColorL #-} +-- | 'catDeclawed' Lens +catDeclawedL :: Lens_' Cat (Maybe Bool) +catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed +{-# INLINE catDeclawedL #-} + -- * Category @@ -207,11 +207,6 @@ clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> -- * Dog --- | 'dogBreed' Lens -dogBreedL :: Lens_' Dog (Maybe Text) -dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed -{-# INLINE dogBreedL #-} - -- | 'dogClassName' Lens dogClassNameL :: Lens_' Dog (Text) dogClassNameL f Dog{..} = (\dogClassName -> Dog { dogClassName, ..} ) <$> f dogClassName @@ -222,6 +217,11 @@ dogColorL :: Lens_' Dog (Maybe Text) dogColorL f Dog{..} = (\dogColor -> Dog { dogColor, ..} ) <$> f dogColor {-# INLINE dogColorL #-} +-- | 'dogBreed' Lens +dogBreedL :: Lens_' Dog (Maybe Text) +dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed +{-# INLINE dogBreedL #-} + -- * EnumArrays diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index 7e70cf71a95..74830f44ba2 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -138,9 +138,9 @@ instance Arbitrary Capitalization where instance Arbitrary Cat where arbitrary = Cat - <$> arbitrary -- catDeclawed :: Maybe Bool - <*> arbitrary -- catClassName :: Text + <$> arbitrary -- catClassName :: Text <*> arbitrary -- catColor :: Maybe Text + <*> arbitrary -- catDeclawed :: Maybe Bool instance Arbitrary Category where arbitrary = @@ -161,9 +161,9 @@ instance Arbitrary Client where instance Arbitrary Dog where arbitrary = Dog - <$> arbitrary -- dogBreed :: Maybe Text - <*> arbitrary -- dogClassName :: Text + <$> arbitrary -- dogClassName :: Text <*> arbitrary -- dogColor :: Maybe Text + <*> arbitrary -- dogBreed :: Maybe Text instance Arbitrary EnumArrays where arbitrary = diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index d077ffb477a..afa63656064 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.4-SNAPSHOT \ No newline at end of file +4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/docs/MapTest.md b/samples/client/petstore/javascript-es6/docs/MapTest.md index 152d3fbe8c7..cfa694501fe 100644 --- a/samples/client/petstore/javascript-es6/docs/MapTest.md +++ b/samples/client/petstore/javascript-es6/docs/MapTest.md @@ -13,10 +13,6 @@ Name | Type | Description | Notes ## Enum: {String: String} -* `UPPER` (value: `"UPPER"`) - -* `lower` (value: `"lower"`) - diff --git a/samples/client/petstore/javascript-es6/src/model/Cat.js b/samples/client/petstore/javascript-es6/src/model/Cat.js index 5ad5fb40286..63a40454559 100644 --- a/samples/client/petstore/javascript-es6/src/model/Cat.js +++ b/samples/client/petstore/javascript-es6/src/model/Cat.js @@ -25,7 +25,7 @@ class Cat { * @alias module:model/Cat * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ constructor(className) { Animal.initialize(this, className); diff --git a/samples/client/petstore/javascript-es6/src/model/Dog.js b/samples/client/petstore/javascript-es6/src/model/Dog.js index ba225630e93..6187e031074 100644 --- a/samples/client/petstore/javascript-es6/src/model/Dog.js +++ b/samples/client/petstore/javascript-es6/src/model/Dog.js @@ -25,7 +25,7 @@ class Dog { * @alias module:model/Dog * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ constructor(className) { Animal.initialize(this, className); diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index d077ffb477a..afa63656064 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.4-SNAPSHOT \ No newline at end of file +4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md index 152d3fbe8c7..cfa694501fe 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md +++ b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md @@ -13,10 +13,6 @@ Name | Type | Description | Notes ## Enum: {String: String} -* `UPPER` (value: `"UPPER"`) - -* `lower` (value: `"lower"`) - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Cat.js b/samples/client/petstore/javascript-promise-es6/src/model/Cat.js index 5ad5fb40286..63a40454559 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Cat.js @@ -25,7 +25,7 @@ class Cat { * @alias module:model/Cat * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ constructor(className) { Animal.initialize(this, className); diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Dog.js b/samples/client/petstore/javascript-promise-es6/src/model/Dog.js index ba225630e93..6187e031074 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Dog.js @@ -25,7 +25,7 @@ class Dog { * @alias module:model/Dog * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ constructor(className) { Animal.initialize(this, className); diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index d077ffb477a..afa63656064 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.4-SNAPSHOT \ No newline at end of file +4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/docs/MapTest.md b/samples/client/petstore/javascript-promise/docs/MapTest.md index 152d3fbe8c7..cfa694501fe 100644 --- a/samples/client/petstore/javascript-promise/docs/MapTest.md +++ b/samples/client/petstore/javascript-promise/docs/MapTest.md @@ -13,10 +13,6 @@ Name | Type | Description | Notes ## Enum: {String: String} -* `UPPER` (value: `"UPPER"`) - -* `lower` (value: `"lower"`) - diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 883b148d5ab..0cbcb2bdf52 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 0cf76b87e8d..30e8f390d21 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 1aa120ea66c..8332ec03952 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index db5c71108c3..288a0d0b644 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index 163988f1e6e..a7b39d00b95 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index a353ffa8ff1..4b1c75f0315 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index cb9f8ac3ef1..98adfdead42 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index 39091b1b92a..ebab2e52a22 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 0d48ba4f187..85b0c8ad1bc 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 8e654bb67e2..b0ea85c98c2 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index b828a05a2bd..4c2408dbb39 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index a37b20ccca0..7773e84f85d 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index b8acf5a198a..ae7f27bf608 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index b9a9200a502..3cf01932395 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index a8363bf0330..11631e1fa1d 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index 7d781b51be0..0c69dcec8d1 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -44,7 +44,7 @@ * @class * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ var exports = function(className) { var _this = this; diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index 9512d0bc236..cece26238ae 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 6ae2d532ca1..5f33112dca6 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index d5dd5500fa7..b31d036a9c3 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index 1a9f2e24b45..46d3b994b2c 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -44,7 +44,7 @@ * @class * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ var exports = function(className) { var _this = this; diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index e147e6f5b73..9a48110854a 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index 6548a6a2e3c..bb18bfdbf32 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index c0ab8d67788..f319420f1bc 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/File.js b/samples/client/petstore/javascript-promise/src/model/File.js index 9ce05336134..e04d51513b4 100644 --- a/samples/client/petstore/javascript-promise/src/model/File.js +++ b/samples/client/petstore/javascript-promise/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js index 5863d01f6ad..ad7c546b4d6 100644 --- a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index 3df6cc6cfe4..0a935afc6ef 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 81fcd418208..0f83cecda5c 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index b25bf17304f..1876f98c18d 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index 790f79f35d9..e3d93907130 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 057d7256a65..39d9c3e135b 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index fcc9504c30f..eee04c4f5c2 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index d218626864c..a4ff42ea3f3 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index 44b004b2582..3d58061e6ae 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index bba5fde5c92..146c2fdcc98 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index e455167d94a..f6648210e20 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index e0b1c679b89..bc0bbcea70a 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index 9f3ad94a5fa..dc7f6278f55 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index eb83de036ae..e04148efcaa 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index f9198309e65..8c05245444b 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index a510a12f431..be549e38d9a 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index 0aa84ec6e84..2cb74f37fc0 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index 345e29d95a3..7d505fd62fa 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index d077ffb477a..afa63656064 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.4-SNAPSHOT \ No newline at end of file +4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/docs/MapTest.md b/samples/client/petstore/javascript/docs/MapTest.md index 152d3fbe8c7..cfa694501fe 100644 --- a/samples/client/petstore/javascript/docs/MapTest.md +++ b/samples/client/petstore/javascript/docs/MapTest.md @@ -13,10 +13,6 @@ Name | Type | Description | Notes ## Enum: {String: String} -* `UPPER` (value: `"UPPER"`) - -* `lower` (value: `"lower"`) - diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index 4e33f192e4a..f2369edc403 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index 09dce2f5058..6edf15e9377 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 3fe40393489..34d77cdaa1b 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index 55669c688d4..dad8cc8cd10 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index 6ccf6a102e0..6a354defd8d 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index ef6f1713a7d..6b464fc374d 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index faf8be95f1e..29f834ccc8d 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index 39091b1b92a..ebab2e52a22 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 0d48ba4f187..85b0c8ad1bc 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 8e654bb67e2..b0ea85c98c2 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index b828a05a2bd..4c2408dbb39 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index a37b20ccca0..7773e84f85d 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index b8acf5a198a..ae7f27bf608 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index b9a9200a502..3cf01932395 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index a8363bf0330..11631e1fa1d 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index 7d781b51be0..0c69dcec8d1 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -44,7 +44,7 @@ * @class * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ var exports = function(className) { var _this = this; diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index 9512d0bc236..cece26238ae 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 6ae2d532ca1..5f33112dca6 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index d5dd5500fa7..b31d036a9c3 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index 1a9f2e24b45..46d3b994b2c 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -44,7 +44,7 @@ * @class * @extends module:model/Animal * @implements module:model/Animal - * @param className {} + * @param className {String} */ var exports = function(className) { var _this = this; diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index e147e6f5b73..9a48110854a 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index 6548a6a2e3c..bb18bfdbf32 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index c0ab8d67788..f319420f1bc 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/File.js b/samples/client/petstore/javascript/src/model/File.js index 9ce05336134..e04d51513b4 100644 --- a/samples/client/petstore/javascript/src/model/File.js +++ b/samples/client/petstore/javascript/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js index 5863d01f6ad..ad7c546b4d6 100644 --- a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index 3df6cc6cfe4..0a935afc6ef 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 81fcd418208..0f83cecda5c 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index b25bf17304f..1876f98c18d 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index 790f79f35d9..e3d93907130 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 057d7256a65..39d9c3e135b 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index fcc9504c30f..eee04c4f5c2 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index d218626864c..a4ff42ea3f3 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index 44b004b2582..3d58061e6ae 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index bba5fde5c92..146c2fdcc98 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index e455167d94a..f6648210e20 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index e0b1c679b89..bc0bbcea70a 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index 9f3ad94a5fa..dc7f6278f55 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index eb83de036ae..e04148efcaa 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index f9198309e65..8c05245444b 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index a510a12f431..be549e38d9a 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index 0aa84ec6e84..2cb74f37fc0 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index 345e29d95a3..7d505fd62fa 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.3.4-SNAPSHOT + * OpenAPI Generator version: 4.0.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/test/model/Cat.spec.js b/samples/client/petstore/javascript/test/model/Cat.spec.js index 21b3bc7c40d..e78d2d2ec5a 100644 --- a/samples/client/petstore/javascript/test/model/Cat.spec.js +++ b/samples/client/petstore/javascript/test/model/Cat.spec.js @@ -1,3 +1,18 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.0.0-SNAPSHOT + * + * Do not edit the class manually. + * + */ + (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. @@ -7,15 +22,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OpenAPIPetstore); + factory(root.expect, root.OpenApiPetstore); } -}(this, function(expect, OpenAPIPetstore) { +}(this, function(expect, OpenApiPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new OpenAPIPetstore.Cat(); + instance = new OpenApiPetstore.Cat(); }); var getProperty = function(object, getter, property) { @@ -37,13 +52,13 @@ describe('Cat', function() { it('should create an instance of Cat', function() { // uncomment below and update the code to test Cat - //var instane = new OpenAPIPetstore.Cat(); - //expect(instance).to.be.a(OpenAPIPetstore.Cat); + //var instance = new OpenApiPetstore.Cat(); + //expect(instance).to.be.a(OpenApiPetstore.Cat); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new OpenAPIPetstore.Cat(); + //var instance = new OpenApiPetstore.Cat(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Dog.spec.js b/samples/client/petstore/javascript/test/model/Dog.spec.js index 423632a9c75..ea86b5bcc88 100644 --- a/samples/client/petstore/javascript/test/model/Dog.spec.js +++ b/samples/client/petstore/javascript/test/model/Dog.spec.js @@ -1,3 +1,18 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.0.0-SNAPSHOT + * + * Do not edit the class manually. + * + */ + (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. @@ -7,15 +22,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OpenAPIPetstore); + factory(root.expect, root.OpenApiPetstore); } -}(this, function(expect, OpenAPIPetstore) { +}(this, function(expect, OpenApiPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new OpenAPIPetstore.Dog(); + instance = new OpenApiPetstore.Dog(); }); var getProperty = function(object, getter, property) { @@ -37,13 +52,13 @@ describe('Dog', function() { it('should create an instance of Dog', function() { // uncomment below and update the code to test Dog - //var instane = new OpenAPIPetstore.Dog(); - //expect(instance).to.be.a(OpenAPIPetstore.Dog); + //var instance = new OpenApiPetstore.Dog(); + //expect(instance).to.be.a(OpenApiPetstore.Dog); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new OpenAPIPetstore.Dog(); + //var instance = new OpenApiPetstore.Dog(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/ruby/docs/Cat.md b/samples/client/petstore/ruby/docs/Cat.md index d41bb3660ce..6abb9e1a348 100644 --- a/samples/client/petstore/ruby/docs/Cat.md +++ b/samples/client/petstore/ruby/docs/Cat.md @@ -4,7 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **declawed** | **BOOLEAN** | | [optional] -**class_name** | **String** | | -**color** | **String** | | [optional] [default to 'red'] diff --git a/samples/client/petstore/ruby/docs/Dog.md b/samples/client/petstore/ruby/docs/Dog.md index 0c73ff3baff..2b8d2281a12 100644 --- a/samples/client/petstore/ruby/docs/Dog.md +++ b/samples/client/petstore/ruby/docs/Dog.md @@ -4,7 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **breed** | **String** | | [optional] -**class_name** | **String** | | -**color** | **String** | | [optional] [default to 'red'] diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 300da74d361..be51cd64741 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -16,25 +16,17 @@ module Petstore class Cat < Animal attr_accessor :declawed - attr_accessor :class_name - - attr_accessor :color - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'declawed' => :'declawed', - :'class_name' => :'className', - :'color' => :'color' + :'declawed' => :'declawed' } end # Attribute type mapping. def self.openapi_types { - :'declawed' => :'BOOLEAN', - :'class_name' => :'String', - :'color' => :'String' + :'declawed' => :'BOOLEAN' } end @@ -59,33 +51,18 @@ module Petstore if attributes.has_key?(:'declawed') self.declawed = attributes[:'declawed'] end - - if attributes.has_key?(:'className') - self.class_name = attributes[:'className'] - end - - if attributes.has_key?(:'color') - self.color = attributes[:'color'] - else - self.color = 'red' - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = super - if @class_name.nil? - invalid_properties.push('invalid value for "class_name", class_name cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @class_name.nil? true && super end @@ -94,9 +71,7 @@ module Petstore def ==(o) return true if self.equal?(o) self.class == o.class && - declawed == o.declawed && - class_name == o.class_name && - color == o.color && super(o) + declawed == o.declawed && super(o) end # @see the `==` method @@ -108,7 +83,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [declawed, class_name, color].hash + [declawed].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index ea62445687e..bd06c902fe4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -16,25 +16,17 @@ module Petstore class Dog < Animal attr_accessor :breed - attr_accessor :class_name - - attr_accessor :color - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'breed' => :'breed', - :'class_name' => :'className', - :'color' => :'color' + :'breed' => :'breed' } end # Attribute type mapping. def self.openapi_types { - :'breed' => :'String', - :'class_name' => :'String', - :'color' => :'String' + :'breed' => :'String' } end @@ -59,33 +51,18 @@ module Petstore if attributes.has_key?(:'breed') self.breed = attributes[:'breed'] end - - if attributes.has_key?(:'className') - self.class_name = attributes[:'className'] - end - - if attributes.has_key?(:'color') - self.color = attributes[:'color'] - else - self.color = 'red' - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = super - if @class_name.nil? - invalid_properties.push('invalid value for "class_name", class_name cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @class_name.nil? true && super end @@ -94,9 +71,7 @@ module Petstore def ==(o) return true if self.equal?(o) self.class == o.class && - breed == o.breed && - class_name == o.class_name && - color == o.color && super(o) + breed == o.breed && super(o) end # @see the `==` method @@ -108,7 +83,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [breed, class_name, color].hash + [breed].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/spec/models/cat_spec.rb b/samples/client/petstore/ruby/spec/models/cat_spec.rb index 9875f4b5bfa..07b894ca344 100644 --- a/samples/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_spec.rb @@ -32,22 +32,18 @@ describe 'Cat' do expect(@instance).to be_instance_of(Petstore::Cat) end end - describe 'test attribute "class_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "color"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end describe 'test attribute "declawed"' do it 'should work' do + expect(Cat.new.attributes.inspect).to include("declawed"); # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end + describe 'attribute "declawed"' do + it 'should be the only attribute' do + expect(Cat.new.attributes.inspect).to match_array(["declawed"]); + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end end diff --git a/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/default/model/category.ts b/samples/client/petstore/typescript-angular-v2/default/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/category.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/default/model/order.ts b/samples/client/petstore/typescript-angular-v2/default/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/order.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/default/model/pet.ts b/samples/client/petstore/typescript-angular-v2/default/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/default/model/tag.ts b/samples/client/petstore/typescript-angular-v2/default/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/default/model/user.ts b/samples/client/petstore/typescript-angular-v2/default/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v2/default/model/user.ts +++ b/samples/client/petstore/typescript-angular-v2/default/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/category.ts b/samples/client/petstore/typescript-angular-v2/npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/order.ts b/samples/client/petstore/typescript-angular-v2/npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/user.ts b/samples/client/petstore/typescript-angular-v2/npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/category.ts b/samples/client/petstore/typescript-angular-v4/npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/order.ts b/samples/client/petstore/typescript-angular-v4/npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/user.ts b/samples/client/petstore/typescript-angular-v4/npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/category.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/category.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/order.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/order.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/pet.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/tag.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/user.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/user.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/category.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/order.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/pet.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/tag.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/user.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/category.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/category.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/order.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/order.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/pet.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/tag.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/user.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/user.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/category.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/order.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/pet.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/tag.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/user.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/category.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/category.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/order.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/order.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/pet.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/tag.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/user.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/user.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/category.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/tag.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/user.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/category.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/category.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/order.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/order.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/pet.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/tag.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/user.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/user.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/apiResponse.ts index b57ab72c176..399546a58f4 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/apiResponse.ts @@ -19,3 +19,4 @@ export interface ApiResponse { type?: string; message?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/category.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/category.ts index 6b9023b3b72..3df5396f061 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/category.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/category.ts @@ -18,3 +18,4 @@ export interface Category { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/order.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/order.ts index b73c088ad11..7fe70cfd6a7 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/order.ts @@ -33,3 +33,4 @@ export namespace Order { Delivered: 'delivered' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/pet.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/pet.ts index 902691a8adb..dc15cdd8f45 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/pet.ts @@ -35,3 +35,4 @@ export namespace Pet { Sold: 'sold' as StatusEnum }; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/tag.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/tag.ts index fbe7c1f6ca1..05af7f9d209 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/tag.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/tag.ts @@ -18,3 +18,4 @@ export interface Tag { id?: number; name?: string; } + diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/user.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/user.ts index 65de237217f..c17b58c1845 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/user.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/model/user.ts @@ -27,3 +27,4 @@ export interface User { */ userStatus?: number; } + diff --git a/samples/openapi3/client/petstore/ruby/docs/Cat.md b/samples/openapi3/client/petstore/ruby/docs/Cat.md index d41bb3660ce..6abb9e1a348 100644 --- a/samples/openapi3/client/petstore/ruby/docs/Cat.md +++ b/samples/openapi3/client/petstore/ruby/docs/Cat.md @@ -4,7 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **declawed** | **BOOLEAN** | | [optional] -**class_name** | **String** | | -**color** | **String** | | [optional] [default to 'red'] diff --git a/samples/openapi3/client/petstore/ruby/docs/Dog.md b/samples/openapi3/client/petstore/ruby/docs/Dog.md index 0c73ff3baff..2b8d2281a12 100644 --- a/samples/openapi3/client/petstore/ruby/docs/Dog.md +++ b/samples/openapi3/client/petstore/ruby/docs/Dog.md @@ -4,7 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **breed** | **String** | | [optional] -**class_name** | **String** | | -**color** | **String** | | [optional] [default to 'red'] diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb index 300da74d361..be51cd64741 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb @@ -16,25 +16,17 @@ module Petstore class Cat < Animal attr_accessor :declawed - attr_accessor :class_name - - attr_accessor :color - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'declawed' => :'declawed', - :'class_name' => :'className', - :'color' => :'color' + :'declawed' => :'declawed' } end # Attribute type mapping. def self.openapi_types { - :'declawed' => :'BOOLEAN', - :'class_name' => :'String', - :'color' => :'String' + :'declawed' => :'BOOLEAN' } end @@ -59,33 +51,18 @@ module Petstore if attributes.has_key?(:'declawed') self.declawed = attributes[:'declawed'] end - - if attributes.has_key?(:'className') - self.class_name = attributes[:'className'] - end - - if attributes.has_key?(:'color') - self.color = attributes[:'color'] - else - self.color = 'red' - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = super - if @class_name.nil? - invalid_properties.push('invalid value for "class_name", class_name cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @class_name.nil? true && super end @@ -94,9 +71,7 @@ module Petstore def ==(o) return true if self.equal?(o) self.class == o.class && - declawed == o.declawed && - class_name == o.class_name && - color == o.color && super(o) + declawed == o.declawed && super(o) end # @see the `==` method @@ -108,7 +83,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [declawed, class_name, color].hash + [declawed].hash end # Builds the object from hash diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb index ea62445687e..bd06c902fe4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb @@ -16,25 +16,17 @@ module Petstore class Dog < Animal attr_accessor :breed - attr_accessor :class_name - - attr_accessor :color - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'breed' => :'breed', - :'class_name' => :'className', - :'color' => :'color' + :'breed' => :'breed' } end # Attribute type mapping. def self.openapi_types { - :'breed' => :'String', - :'class_name' => :'String', - :'color' => :'String' + :'breed' => :'String' } end @@ -59,33 +51,18 @@ module Petstore if attributes.has_key?(:'breed') self.breed = attributes[:'breed'] end - - if attributes.has_key?(:'className') - self.class_name = attributes[:'className'] - end - - if attributes.has_key?(:'color') - self.color = attributes[:'color'] - else - self.color = 'red' - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = super - if @class_name.nil? - invalid_properties.push('invalid value for "class_name", class_name cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @class_name.nil? true && super end @@ -94,9 +71,7 @@ module Petstore def ==(o) return true if self.equal?(o) self.class == o.class && - breed == o.breed && - class_name == o.class_name && - color == o.color && super(o) + breed == o.breed && super(o) end # @see the `==` method @@ -108,7 +83,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [breed, class_name, color].hash + [breed].hash end # Builds the object from hash diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb index d01ff50499a..b676e753263 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb @@ -32,21 +32,16 @@ describe 'Cat' do expect(@instance).to be_instance_of(Petstore::Cat) end end - describe 'test attribute "class_name"' do + + describe 'test attribute_map' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + expect(Petstore::Cat.attribute_map).to eq({:'declawed' => :'declawed'}); end end - describe 'test attribute "color"' do + describe 'test parent "animal"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "declawed"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + expect(Petstore::Cat.superclass.name).to eq("Petstore::Animal"); end end diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index f9db1a3f09a..5870b90fab9 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -95,9 +95,9 @@ CREATE TABLE IF NOT EXISTS `Capitalization` ( -- CREATE TABLE IF NOT EXISTS `Cat` ( - `declawed` TINYINT(1) DEFAULT NULL, `className` TEXT NOT NULL, - `color` TEXT + `color` TEXT, + `declawed` TINYINT(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -131,9 +131,9 @@ CREATE TABLE IF NOT EXISTS `Client` ( -- CREATE TABLE IF NOT EXISTS `Dog` ( - `breed` TEXT DEFAULT NULL, `className` TEXT NOT NULL, - `color` TEXT + `color` TEXT, + `breed` TEXT DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- diff --git a/samples/server/petstore/php-slim/lib/Model/Cat.php b/samples/server/petstore/php-slim/lib/Model/Cat.php index 8f7b6cd9b00..9a800c02979 100644 --- a/samples/server/petstore/php-slim/lib/Model/Cat.php +++ b/samples/server/petstore/php-slim/lib/Model/Cat.php @@ -10,12 +10,12 @@ namespace OpenAPIServer\Model; class Cat { - /** @var bool $declawed */ - private $declawed; - /** @var string $className */ private $className; /** @var string $color */ private $color; + + /** @var bool $declawed */ + private $declawed; } diff --git a/samples/server/petstore/php-slim/lib/Model/Dog.php b/samples/server/petstore/php-slim/lib/Model/Dog.php index 183cc27b6d5..2af41c927e4 100644 --- a/samples/server/petstore/php-slim/lib/Model/Dog.php +++ b/samples/server/petstore/php-slim/lib/Model/Dog.php @@ -10,12 +10,12 @@ namespace OpenAPIServer\Model; class Dog { - /** @var string $breed */ - private $breed; - /** @var string $className */ private $className; /** @var string $color */ private $color; + + /** @var string $breed */ + private $breed; } diff --git a/samples/server/petstore/php-ze-ph/src/App/DTO/Cat.php b/samples/server/petstore/php-ze-ph/src/App/DTO/Cat.php index 006c072a855..e1596de8ede 100644 --- a/samples/server/petstore/php-ze-ph/src/App/DTO/Cat.php +++ b/samples/server/petstore/php-ze-ph/src/App/DTO/Cat.php @@ -8,12 +8,6 @@ use Articus\DataTransfer\Annotation as DTA; */ class Cat { - /** - * @DTA\Data(field="declawed", nullable=true) - * @DTA\Validator(name="Type", options={"type":"bool"}) - * @var bool - */ - public $declawed; /** * @DTA\Data(field="className") * @DTA\Validator(name="Type", options={"type":"string"}) @@ -26,4 +20,10 @@ class Cat * @var string */ public $color; + /** + * @DTA\Data(field="declawed", nullable=true) + * @DTA\Validator(name="Type", options={"type":"bool"}) + * @var bool + */ + public $declawed; } diff --git a/samples/server/petstore/php-ze-ph/src/App/DTO/Dog.php b/samples/server/petstore/php-ze-ph/src/App/DTO/Dog.php index 0c5417d5b50..74482a9a33e 100644 --- a/samples/server/petstore/php-ze-ph/src/App/DTO/Dog.php +++ b/samples/server/petstore/php-ze-ph/src/App/DTO/Dog.php @@ -8,12 +8,6 @@ use Articus\DataTransfer\Annotation as DTA; */ class Dog { - /** - * @DTA\Data(field="breed", nullable=true) - * @DTA\Validator(name="Type", options={"type":"string"}) - * @var string - */ - public $breed; /** * @DTA\Data(field="className") * @DTA\Validator(name="Type", options={"type":"string"}) @@ -26,4 +20,10 @@ class Dog * @var string */ public $color; + /** + * @DTA\Data(field="breed", nullable=true) + * @DTA\Validator(name="Type", options={"type":"string"}) + * @var string + */ + public $breed; } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index 640a8773dd2..0daa05e4dbf 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -185,10 +185,6 @@ impl Capitalization { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Cat { - #[serde(rename = "declawed")] - #[serde(skip_serializing_if="Option::is_none")] - pub declawed: Option, - #[serde(rename = "className")] pub class_name: String, @@ -196,14 +192,18 @@ pub struct Cat { #[serde(skip_serializing_if="Option::is_none")] pub color: Option, + #[serde(rename = "declawed")] + #[serde(skip_serializing_if="Option::is_none")] + pub declawed: Option, + } impl Cat { pub fn new(class_name: String, ) -> Cat { Cat { - declawed: None, class_name: class_name, color: Some("red".to_string()), + declawed: None, } } } @@ -265,10 +265,6 @@ impl Client { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Dog { - #[serde(rename = "breed")] - #[serde(skip_serializing_if="Option::is_none")] - pub breed: Option, - #[serde(rename = "className")] pub class_name: String, @@ -276,14 +272,18 @@ pub struct Dog { #[serde(skip_serializing_if="Option::is_none")] pub color: Option, + #[serde(rename = "breed")] + #[serde(skip_serializing_if="Option::is_none")] + pub breed: Option, + } impl Dog { pub fn new(class_name: String, ) -> Dog { Dog { - breed: None, class_name: class_name, color: Some("red".to_string()), + breed: None, } } }