mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
Rename datatype to dataType in CodegenProperty (#69)
This commit is contained in:
parent
9b05bd60d5
commit
a1ff502411
@ -121,6 +121,12 @@ Some examples:
|
|||||||
| `swagger.codegen.undertow.modelpackage` | `openapi.codegen.undertow.modelpackage` |
|
| `swagger.codegen.undertow.modelpackage` | `openapi.codegen.undertow.modelpackage` |
|
||||||
|
|
||||||
|
|
||||||
|
### Renamed Mustache Template Variables
|
||||||
|
|
||||||
|
The template variable `{{datatype}}` was renamed to `{{dataType}}` for consistency reason.
|
||||||
|
Corresponding java code: `CodegenProperty.datatype` is renamed to `CodegenProperty.datatype`.
|
||||||
|
|
||||||
|
|
||||||
### Ignore file
|
### Ignore file
|
||||||
|
|
||||||
`.swagger-codegen-ignore` is replaced by `.openapi-generator-ignore`.
|
`.swagger-codegen-ignore` is replaced by `.openapi-generator-ignore`.
|
||||||
|
@ -24,7 +24,7 @@ import java.util.Map;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class CodegenProperty implements Cloneable {
|
public class CodegenProperty implements Cloneable {
|
||||||
public String baseName, complexType, getter, setter, description, datatype,
|
public String baseName, complexType, getter, setter, description, dataType,
|
||||||
datatypeWithEnum, dataFormat, name, min, max, defaultValue, defaultValueWithParam,
|
datatypeWithEnum, dataFormat, name, min, max, defaultValue, defaultValueWithParam,
|
||||||
baseType, containerType, title;
|
baseType, containerType, title;
|
||||||
|
|
||||||
@ -121,12 +121,21 @@ public class CodegenProperty implements Cloneable {
|
|||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated since version 3.0.0, use {@link #getDataType()} instead.<br>
|
||||||
|
* May be removed with the next major release (4.0)
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public String getDatatype() {
|
public String getDatatype() {
|
||||||
return datatype;
|
return getDataType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataType() {
|
||||||
|
return dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDatatype(String datatype) {
|
public void setDatatype(String datatype) {
|
||||||
this.datatype = datatype;
|
this.dataType = datatype;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDatatypeWithEnum() {
|
public String getDatatypeWithEnum() {
|
||||||
@ -408,7 +417,7 @@ public class CodegenProperty implements Cloneable {
|
|||||||
result = prime * result + ((baseType == null) ? 0 : baseType.hashCode());
|
result = prime * result + ((baseType == null) ? 0 : baseType.hashCode());
|
||||||
result = prime * result + ((complexType == null) ? 0 : complexType.hashCode());
|
result = prime * result + ((complexType == null) ? 0 : complexType.hashCode());
|
||||||
result = prime * result + ((containerType == null) ? 0 : containerType.hashCode());
|
result = prime * result + ((containerType == null) ? 0 : containerType.hashCode());
|
||||||
result = prime * result + ((datatype == null) ? 0 : datatype.hashCode());
|
result = prime * result + ((dataType == null) ? 0 : dataType.hashCode());
|
||||||
result = prime * result + ((datatypeWithEnum == null) ? 0 : datatypeWithEnum.hashCode());
|
result = prime * result + ((datatypeWithEnum == null) ? 0 : datatypeWithEnum.hashCode());
|
||||||
result = prime * result + ((dataFormat == null) ? 0 : dataFormat.hashCode());
|
result = prime * result + ((dataFormat == null) ? 0 : dataFormat.hashCode());
|
||||||
result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode());
|
result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode());
|
||||||
@ -500,7 +509,7 @@ public class CodegenProperty implements Cloneable {
|
|||||||
if ((this.title == null) ? (other.title != null) : !this.title.equals(other.title)) {
|
if ((this.title == null) ? (other.title != null) : !this.title.equals(other.title)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.datatype == null) ? (other.datatype != null) : !this.datatype.equals(other.datatype)) {
|
if ((this.dataType == null) ? (other.dataType != null) : !this.dataType.equals(other.dataType)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.datatypeWithEnum == null) ? (other.datatypeWithEnum != null) : !this.datatypeWithEnum.equals(other.datatypeWithEnum)) {
|
if ((this.datatypeWithEnum == null) ? (other.datatypeWithEnum != null) : !this.datatypeWithEnum.equals(other.datatypeWithEnum)) {
|
||||||
@ -708,7 +717,7 @@ public class CodegenProperty implements Cloneable {
|
|||||||
", getter='" + getter + '\'' +
|
", getter='" + getter + '\'' +
|
||||||
", setter='" + setter + '\'' +
|
", setter='" + setter + '\'' +
|
||||||
", description='" + description + '\'' +
|
", description='" + description + '\'' +
|
||||||
", datatype='" + datatype + '\'' +
|
", datatype='" + dataType + '\'' +
|
||||||
", datatypeWithEnum='" + datatypeWithEnum + '\'' +
|
", datatypeWithEnum='" + datatypeWithEnum + '\'' +
|
||||||
", dataFormat='" + dataFormat + '\'' +
|
", dataFormat='" + dataFormat + '\'' +
|
||||||
", name='" + name + '\'' +
|
", name='" + name + '\'' +
|
||||||
|
@ -1820,7 +1820,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property.datatype = getTypeDeclaration(p);
|
property.dataType = getTypeDeclaration(p);
|
||||||
property.dataFormat = p.getFormat();
|
property.dataFormat = p.getFormat();
|
||||||
property.baseType = getSchemaType(p);
|
property.baseType = getSchemaType(p);
|
||||||
|
|
||||||
@ -1829,7 +1829,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
property.datatypeWithEnum = toEnumName(property);
|
property.datatypeWithEnum = toEnumName(property);
|
||||||
property.enumName = toEnumName(property);
|
property.enumName = toEnumName(property);
|
||||||
} else {
|
} else {
|
||||||
property.datatypeWithEnum = property.datatype;
|
property.datatypeWithEnum = property.dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ModelUtils.isArraySchema(p)) {
|
if (ModelUtils.isArraySchema(p)) {
|
||||||
@ -2166,7 +2166,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// generate examples
|
// generate examples
|
||||||
op.examples = new ExampleGenerator(schemas, openAPI).generateFromResponseSchema(responseSchema, getProducesInfo(openAPI, operation));
|
op.examples = new ExampleGenerator(schemas, openAPI).generateFromResponseSchema(responseSchema, getProducesInfo(openAPI, operation));
|
||||||
op.defaultResponse = toDefaultValue(responseSchema);
|
op.defaultResponse = toDefaultValue(responseSchema);
|
||||||
op.returnType = cm.datatype;
|
op.returnType = cm.dataType;
|
||||||
op.hasReference = schemas != null && schemas.containsKey(op.returnBaseType);
|
op.hasReference = schemas != null && schemas.containsKey(op.returnBaseType);
|
||||||
|
|
||||||
// lookup discriminator
|
// lookup discriminator
|
||||||
@ -2418,7 +2418,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r.dataType = cp.datatype;
|
r.dataType = cp.dataType;
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(cp.isString) && Boolean.TRUE.equals(cp.isUuid)) {
|
if (Boolean.TRUE.equals(cp.isString) && Boolean.TRUE.equals(cp.isUuid)) {
|
||||||
r.isUuid = true;
|
r.isUuid = true;
|
||||||
@ -2453,7 +2453,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
} else if (Boolean.TRUE.equals(cp.isDateTime)) {
|
} else if (Boolean.TRUE.equals(cp.isDateTime)) {
|
||||||
r.isDateTime = true;
|
r.isDateTime = true;
|
||||||
} else {
|
} else {
|
||||||
LOGGER.debug("Property type is not primitive: " + cp.datatype);
|
LOGGER.debug("Property type is not primitive: " + cp.dataType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cp.isContainer) {
|
if (cp.isContainer) {
|
||||||
@ -2530,7 +2530,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat;
|
collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat;
|
||||||
CodegenProperty codegenProperty = fromProperty("inner", inner);
|
CodegenProperty codegenProperty = fromProperty("inner", inner);
|
||||||
codegenParameter.items = codegenProperty;
|
codegenParameter.items = codegenProperty;
|
||||||
codegenParameter.baseType = codegenProperty.datatype;
|
codegenParameter.baseType = codegenProperty.dataType;
|
||||||
codegenParameter.isContainer = true;
|
codegenParameter.isContainer = true;
|
||||||
codegenParameter.isListContainer = true;
|
codegenParameter.isListContainer = true;
|
||||||
|
|
||||||
@ -2544,7 +2544,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
} else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter
|
} else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter
|
||||||
CodegenProperty codegenProperty = fromProperty("inner", (Schema) parameterSchema.getAdditionalProperties());
|
CodegenProperty codegenProperty = fromProperty("inner", (Schema) parameterSchema.getAdditionalProperties());
|
||||||
codegenParameter.items = codegenProperty;
|
codegenParameter.items = codegenProperty;
|
||||||
codegenParameter.baseType = codegenProperty.datatype;
|
codegenParameter.baseType = codegenProperty.dataType;
|
||||||
codegenParameter.isContainer = true;
|
codegenParameter.isContainer = true;
|
||||||
codegenParameter.isMapContainer = true;
|
codegenParameter.isMapContainer = true;
|
||||||
|
|
||||||
@ -2578,7 +2578,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
if (parameterDataType != null) {
|
if (parameterDataType != null) {
|
||||||
codegenParameter.dataType = parameterDataType;
|
codegenParameter.dataType = parameterDataType;
|
||||||
} else {
|
} else {
|
||||||
codegenParameter.dataType = codegenProperty.datatype;
|
codegenParameter.dataType = codegenProperty.dataType;
|
||||||
}
|
}
|
||||||
codegenParameter.dataFormat = codegenProperty.dataFormat;
|
codegenParameter.dataFormat = codegenProperty.dataFormat;
|
||||||
codegenParameter.required = codegenProperty.required;
|
codegenParameter.required = codegenProperty.required;
|
||||||
@ -3674,7 +3674,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
parameter.isDateTime = true;
|
parameter.isDateTime = true;
|
||||||
parameter.isPrimitiveType = true;
|
parameter.isPrimitiveType = true;
|
||||||
} else {
|
} else {
|
||||||
LOGGER.debug("Property type is not primitive: " + property.datatype);
|
LOGGER.debug("Property type is not primitive: " + property.dataType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(property.isFile)) {
|
if (Boolean.TRUE.equals(property.isFile)) {
|
||||||
@ -3720,8 +3720,8 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
enumName = value.toString();
|
enumName = value.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enumVar.put("name", toEnumVarName(enumName, var.datatype));
|
enumVar.put("name", toEnumVarName(enumName, var.dataType));
|
||||||
enumVar.put("value", toEnumValue(value.toString(), var.datatype));
|
enumVar.put("value", toEnumValue(value.toString(), var.dataType));
|
||||||
enumVars.add(enumVar);
|
enumVars.add(enumVar);
|
||||||
}
|
}
|
||||||
allowableValues.put("enumVars", enumVars);
|
allowableValues.put("enumVars", enumVars);
|
||||||
@ -3730,7 +3730,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
if (var.defaultValue != null) {
|
if (var.defaultValue != null) {
|
||||||
String enumName = null;
|
String enumName = null;
|
||||||
for (Map<String, String> enumVar : enumVars) {
|
for (Map<String, String> enumVar : enumVars) {
|
||||||
if (toEnumValue(var.defaultValue, var.datatype).equals(enumVar.get("value"))) {
|
if (toEnumValue(var.defaultValue, var.dataType).equals(enumVar.get("value"))) {
|
||||||
enumName = enumVar.get("name");
|
enumName = enumVar.get("name");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4084,7 +4084,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
codegenParameter = fromFormProperty(entry.getKey(), inner, imports);
|
codegenParameter = fromFormProperty(entry.getKey(), inner, imports);
|
||||||
CodegenProperty codegenProperty = fromProperty("inner", inner);
|
CodegenProperty codegenProperty = fromProperty("inner", inner);
|
||||||
codegenParameter.items = codegenProperty;
|
codegenParameter.items = codegenProperty;
|
||||||
codegenParameter.baseType = codegenProperty.datatype;
|
codegenParameter.baseType = codegenProperty.dataType;
|
||||||
codegenParameter.isPrimitiveType = false;
|
codegenParameter.isPrimitiveType = false;
|
||||||
codegenParameter.isContainer = true;
|
codegenParameter.isContainer = true;
|
||||||
codegenParameter.isListContainer = true;
|
codegenParameter.isListContainer = true;
|
||||||
@ -4131,7 +4131,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
codegenParameter.baseName = codegenProperty.baseName;
|
codegenParameter.baseName = codegenProperty.baseName;
|
||||||
codegenParameter.paramName = toParamName((codegenParameter.baseName));
|
codegenParameter.paramName = toParamName((codegenParameter.baseName));
|
||||||
codegenParameter.baseType = codegenProperty.baseType;
|
codegenParameter.baseType = codegenProperty.baseType;
|
||||||
codegenParameter.dataType = codegenProperty.datatype;
|
codegenParameter.dataType = codegenProperty.dataType;
|
||||||
codegenParameter.dataFormat = codegenProperty.dataFormat;
|
codegenParameter.dataFormat = codegenProperty.dataFormat;
|
||||||
codegenParameter.description = escapeText(codegenProperty.description);
|
codegenParameter.description = escapeText(codegenProperty.description);
|
||||||
codegenParameter.unescapedDescription = codegenProperty.getDescription();
|
codegenParameter.unescapedDescription = codegenProperty.getDescription();
|
||||||
@ -4317,7 +4317,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
codegenParameter.baseName = codegenProperty.baseType;
|
codegenParameter.baseName = codegenProperty.baseType;
|
||||||
codegenParameter.baseType = codegenProperty.baseType;
|
codegenParameter.baseType = codegenProperty.baseType;
|
||||||
codegenParameter.dataType = codegenProperty.datatype;
|
codegenParameter.dataType = codegenProperty.dataType;
|
||||||
codegenParameter.description = codegenProperty.description;
|
codegenParameter.description = codegenProperty.description;
|
||||||
codegenParameter.paramName = toParamName(codegenProperty.baseType);
|
codegenParameter.paramName = toParamName(codegenProperty.baseType);
|
||||||
|
|
||||||
@ -4339,7 +4339,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
codegenParameter.isPrimitiveType = true;
|
codegenParameter.isPrimitiveType = true;
|
||||||
codegenParameter.baseType = codegenProperty.baseType;
|
codegenParameter.baseType = codegenProperty.baseType;
|
||||||
codegenParameter.dataType = codegenProperty.datatype;
|
codegenParameter.dataType = codegenProperty.dataType;
|
||||||
codegenParameter.description = codegenProperty.description;
|
codegenParameter.description = codegenProperty.description;
|
||||||
codegenParameter.paramName = toParamName(codegenParameter.baseName);
|
codegenParameter.paramName = toParamName(codegenParameter.baseName);
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg
|
|||||||
if (methodResponse != null && ModelUtils.getSchemaFromResponse(methodResponse) != null) {
|
if (methodResponse != null && ModelUtils.getSchemaFromResponse(methodResponse) != null) {
|
||||||
CodegenProperty cm = fromProperty("response", ModelUtils.getSchemaFromResponse(methodResponse));
|
CodegenProperty cm = fromProperty("response", ModelUtils.getSchemaFromResponse(methodResponse));
|
||||||
op.vendorExtensions.put("x-codegen-response", cm);
|
op.vendorExtensions.put("x-codegen-response", cm);
|
||||||
if ("HttpContent".equals(cm.datatype)) {
|
if ("HttpContent".equals(cm.dataType)) {
|
||||||
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -498,9 +498,9 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg
|
|||||||
item = p.items;
|
item = p.items;
|
||||||
}
|
}
|
||||||
if (item != null && !item.isString && !item.isPrimitiveType && !item.isContainer && !item.isInteger) {
|
if (item != null && !item.isString && !item.isPrimitiveType && !item.isContainer && !item.isInteger) {
|
||||||
if (!d.contains(item.datatype)) {
|
if (!d.contains(item.dataType)) {
|
||||||
// LOGGER.info("Model " + m.name + " uses " + p.datatype);
|
// LOGGER.info("Model " + m.name + " uses " + p.datatype);
|
||||||
d.add(item.datatype);
|
d.add(item.dataType);
|
||||||
}
|
}
|
||||||
isModel = true;
|
isModel = true;
|
||||||
}
|
}
|
||||||
|
@ -412,11 +412,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
CodegenModel model = ModelUtils.getModelByName(swaggerName, models);
|
CodegenModel model = ModelUtils.getModelByName(swaggerName, models);
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
for (CodegenProperty var : model.allVars) {
|
for (CodegenProperty var : model.allVars) {
|
||||||
if (enumRefs.containsKey(var.datatype)) {
|
if (enumRefs.containsKey(var.dataType)) {
|
||||||
// Handle any enum properties referred to by $ref.
|
// Handle any enum properties referred to by $ref.
|
||||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||||
// while enums in many other languages are true objects.
|
// while enums in many other languages are true objects.
|
||||||
CodegenModel refModel = enumRefs.get(var.datatype);
|
CodegenModel refModel = enumRefs.get(var.dataType);
|
||||||
var.allowableValues = refModel.allowableValues;
|
var.allowableValues = refModel.allowableValues;
|
||||||
var.isEnum = true;
|
var.isEnum = true;
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ public class ApexClientCodegen extends AbstractJavaCodegen {
|
|||||||
|
|
||||||
String type = p.baseType;
|
String type = p.baseType;
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
type = p.datatype;
|
type = p.dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(p.isInteger)) {
|
if (Boolean.TRUE.equals(p.isInteger)) {
|
||||||
@ -607,7 +607,7 @@ public class ApexClientCodegen extends AbstractJavaCodegen {
|
|||||||
super.updateCodegenPropertyEnum(var);
|
super.updateCodegenPropertyEnum(var);
|
||||||
if (var.isEnum && var.example != null) {
|
if (var.isEnum && var.example != null) {
|
||||||
String example = var.example.replace("'", "");
|
String example = var.example.replace("'", "");
|
||||||
example = toEnumVarName(example, var.datatype);
|
example = toEnumVarName(example, var.dataType);
|
||||||
var.example = toEnumDefaultValue(example, var.datatypeWithEnum);
|
var.example = toEnumDefaultValue(example, var.datatypeWithEnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
if (response != null) {
|
if (response != null) {
|
||||||
CodegenProperty cm = fromProperty("response", response);
|
CodegenProperty cm = fromProperty("response", response);
|
||||||
op.vendorExtensions.put("x-codegen-response", cm);
|
op.vendorExtensions.put("x-codegen-response", cm);
|
||||||
if ("HttpContent".equals(cm.datatype)) {
|
if ("HttpContent".equals(cm.dataType)) {
|
||||||
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
|
|||||||
if (response != null) {
|
if (response != null) {
|
||||||
CodegenProperty cm = fromProperty("response", response);
|
CodegenProperty cm = fromProperty("response", response);
|
||||||
op.vendorExtensions.put("x-codegen-response", cm);
|
op.vendorExtensions.put("x-codegen-response", cm);
|
||||||
if ("HttpContent".equals(cm.datatype)) {
|
if ("HttpContent".equals(cm.dataType)) {
|
||||||
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
public CodegenProperty fromProperty(String name, Schema p) {
|
public CodegenProperty fromProperty(String name, Schema p) {
|
||||||
final CodegenProperty property = super.fromProperty(name, p);
|
final CodegenProperty property = super.fromProperty(name, p);
|
||||||
|
|
||||||
final String dataType = property.isEnum ? property.baseName : property.datatype;
|
final String dataType = property.isEnum ? property.baseName : property.dataType;
|
||||||
addEncoderAndDecoder(property.vendorExtensions, dataType, property.isMapContainer, property.isPrimitiveType && !property.isEnum);
|
addEncoderAndDecoder(property.vendorExtensions, dataType, property.isMapContainer, property.isPrimitiveType && !property.isEnum);
|
||||||
if (property.isEnum) {
|
if (property.isEnum) {
|
||||||
property.vendorExtensions.put(X_UNION_TYPE, property.datatypeWithEnum);
|
property.vendorExtensions.put(X_UNION_TYPE, property.datatypeWithEnum);
|
||||||
|
@ -1202,7 +1202,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
|||||||
for (CodegenProperty var : cm.vars) {
|
for (CodegenProperty var : cm.vars) {
|
||||||
String datatype = genEnums && !StringUtils.isBlank(var.datatypeWithEnum)
|
String datatype = genEnums && !StringUtils.isBlank(var.datatypeWithEnum)
|
||||||
? var.datatypeWithEnum
|
? var.datatypeWithEnum
|
||||||
: var.datatype;
|
: var.dataType;
|
||||||
var.vendorExtensions.put(X_DATA_TYPE, datatype);
|
var.vendorExtensions.put(X_DATA_TYPE, datatype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1261,7 +1261,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
|||||||
paramNameType = toDedupedModelName(paramNameType, enumValues, false);
|
paramNameType = toDedupedModelName(paramNameType, enumValues, false);
|
||||||
var.datatypeWithEnum = paramNameType;
|
var.datatypeWithEnum = paramNameType;
|
||||||
updateCodegenPropertyEnum(var);
|
updateCodegenPropertyEnum(var);
|
||||||
addEnumToUniques(paramNameType, var.datatype, enumValues, var.allowableValues, var.description);
|
addEnumToUniques(paramNameType, var.dataType, enumValues, var.allowableValues, var.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
return paramNameType;
|
return paramNameType;
|
||||||
|
@ -711,7 +711,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
|
|
||||||
String type = p.baseType;
|
String type = p.baseType;
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
type = p.datatype;
|
type = p.dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(p.isInteger)) {
|
if (Boolean.TRUE.equals(p.isInteger)) {
|
||||||
@ -877,7 +877,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
|
|
||||||
private boolean isModelledType(CodegenProperty cp) {
|
private boolean isModelledType(CodegenProperty cp) {
|
||||||
// N.B. enums count as modelled types, file is not modelled (SuperAgent uses some 3rd party library).
|
// N.B. enums count as modelled types, file is not modelled (SuperAgent uses some 3rd party library).
|
||||||
return cp.isEnum || !languageSpecificPrimitives.contains(cp.baseType == null ? cp.datatype : cp.baseType);
|
return cp.isEnum || !languageSpecificPrimitives.contains(cp.baseType == null ? cp.dataType : cp.baseType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getJSDocType(CodegenParameter cp) {
|
private String getJSDocType(CodegenParameter cp) {
|
||||||
|
@ -493,7 +493,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
String type = p.baseType;
|
String type = p.baseType;
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
type = p.datatype;
|
type = p.dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(p.isInteger)) {
|
if (Boolean.TRUE.equals(p.isInteger)) {
|
||||||
|
@ -422,18 +422,18 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
|
|||||||
|
|
||||||
// Simplify model var type
|
// Simplify model var type
|
||||||
for (CodegenProperty var : model.vars) {
|
for (CodegenProperty var : model.vars) {
|
||||||
if (var.datatype != null) {
|
if (var.dataType != null) {
|
||||||
// Determine if the parameter type is supported as a type hint and make it available
|
// Determine if the parameter type is supported as a type hint and make it available
|
||||||
// to the templating engine
|
// to the templating engine
|
||||||
String typeHint = getTypeHint(var.datatype);
|
String typeHint = getTypeHint(var.dataType);
|
||||||
if (!typeHint.isEmpty()) {
|
if (!typeHint.isEmpty()) {
|
||||||
var.vendorExtensions.put("x-parameterType", typeHint);
|
var.vendorExtensions.put("x-parameterType", typeHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a variable to display the correct data type in comments for models
|
// Create a variable to display the correct data type in comments for models
|
||||||
var.vendorExtensions.put("x-commentType", var.datatype);
|
var.vendorExtensions.put("x-commentType", var.dataType);
|
||||||
if (var.isContainer) {
|
if (var.isContainer) {
|
||||||
var.vendorExtensions.put("x-commentType", var.datatype + "[]");
|
var.vendorExtensions.put("x-commentType", var.dataType + "[]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -698,14 +698,14 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (CodegenProperty header : rsp.headers) {
|
for (CodegenProperty header : rsp.headers) {
|
||||||
if (header.datatype.equals("uuid::Uuid")) {
|
if (header.dataType.equals("uuid::Uuid")) {
|
||||||
additionalProperties.put("apiUsesUuid", true);
|
additionalProperties.put("apiUsesUuid", true);
|
||||||
}
|
}
|
||||||
header.nameInCamelCase = toModelName(header.baseName);
|
header.nameInCamelCase = toModelName(header.baseName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (CodegenProperty header : op.responseHeaders) {
|
for (CodegenProperty header : op.responseHeaders) {
|
||||||
if (header.datatype.equals("uuid::Uuid")) {
|
if (header.dataType.equals("uuid::Uuid")) {
|
||||||
additionalProperties.put("apiUsesUuid", true);
|
additionalProperties.put("apiUsesUuid", true);
|
||||||
}
|
}
|
||||||
header.nameInCamelCase = toModelName(header.baseName);
|
header.nameInCamelCase = toModelName(header.baseName);
|
||||||
@ -873,7 +873,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
CodegenModel model = entry.getValue();
|
CodegenModel model = entry.getValue();
|
||||||
|
|
||||||
for (CodegenProperty prop : model.vars) {
|
for (CodegenProperty prop : model.vars) {
|
||||||
String xmlName = modelXmlNames.get(prop.datatype);
|
String xmlName = modelXmlNames.get(prop.dataType);
|
||||||
if (xmlName != null) {
|
if (xmlName != null) {
|
||||||
prop.vendorExtensions.put("itemXmlName", xmlName);
|
prop.vendorExtensions.put("itemXmlName", xmlName);
|
||||||
}
|
}
|
||||||
@ -939,22 +939,22 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
@Override
|
@Override
|
||||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||||
super.postProcessModelProperty(model, property);
|
super.postProcessModelProperty(model, property);
|
||||||
if (!languageSpecificPrimitives.contains(property.datatype)) {
|
if (!languageSpecificPrimitives.contains(property.dataType)) {
|
||||||
// If we use a more qualified model name, then only camelize the actual type, not the qualifier.
|
// If we use a more qualified model name, then only camelize the actual type, not the qualifier.
|
||||||
if (property.datatype.contains(":")) {
|
if (property.dataType.contains(":")) {
|
||||||
int position = property.datatype.lastIndexOf(":");
|
int position = property.dataType.lastIndexOf(":");
|
||||||
property.datatype = property.datatype.substring(0, position) + camelize(property.datatype.substring(position));
|
property.dataType = property.dataType.substring(0, position) + camelize(property.dataType.substring(position));
|
||||||
} else {
|
} else {
|
||||||
property.datatype = camelize(property.datatype, false);
|
property.dataType = camelize(property.dataType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("integer".equals(property.baseType)) {
|
if ("integer".equals(property.baseType)) {
|
||||||
// custom integer formats (legacy)
|
// custom integer formats (legacy)
|
||||||
if ("uint32".equals(property.dataFormat)) {
|
if ("uint32".equals(property.dataFormat)) {
|
||||||
property.datatype = "u32";
|
property.dataType = "u32";
|
||||||
} else if ("uint64".equals(property.dataFormat)) {
|
} else if ("uint64".equals(property.dataFormat)) {
|
||||||
property.datatype = "u64";
|
property.dataType = "u64";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// match int type to schema constraints
|
// match int type to schema constraints
|
||||||
@ -974,21 +974,21 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
switch (property.dataFormat == null ? NO_FORMAT : property.dataFormat) {
|
switch (property.dataFormat == null ? NO_FORMAT : property.dataFormat) {
|
||||||
// standard swagger formats
|
// standard swagger formats
|
||||||
case "int32":
|
case "int32":
|
||||||
property.datatype = unsigned ? "u32" : "i32";
|
property.dataType = unsigned ? "u32" : "i32";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "int64":
|
case "int64":
|
||||||
property.datatype = unsigned ? "u64" : "i64";
|
property.dataType = unsigned ? "u64" : "i64";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NO_FORMAT:
|
case NO_FORMAT:
|
||||||
property.datatype = matchingIntType(unsigned, inclusiveMinimum, inclusiveMaximum);
|
property.dataType = matchingIntType(unsigned, inclusiveMinimum, inclusiveMaximum);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// unknown format
|
// unknown format
|
||||||
LOGGER.warn("The integer format '{}' is not recognized and will be ignored.", property.dataFormat);
|
LOGGER.warn("The integer format '{}' is not recognized and will be ignored.", property.dataFormat);
|
||||||
property.datatype = matchingIntType(unsigned, inclusiveMinimum, inclusiveMaximum);
|
property.dataType = matchingIntType(unsigned, inclusiveMinimum, inclusiveMaximum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ package {{package}}.Models is
|
|||||||
type {{classname}} is
|
type {{classname}} is
|
||||||
record
|
record
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{name}} : {{datatype}};
|
{{name}} : {{dataType}};
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ feature --Access
|
|||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isInherited}}
|
{{^isInherited}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
{{name}}: {{{datatype}}}
|
{{name}}: {{{dataType}}}
|
||||||
{{#description}}-- {{{description}}}{{/description}}
|
{{#description}}-- {{{description}}}{{/description}}
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
@ -37,7 +37,7 @@ feature --Access
|
|||||||
{{#description}}-- {{{description}}}{{/description}}
|
{{#description}}-- {{{description}}}{{/description}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
{{name}}: detachable {{{datatype}}}
|
{{name}}: detachable {{{dataType}}}
|
||||||
{{#description}}-- {{{description}}}{{/description}}
|
{{#description}}-- {{{description}}}{{/description}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -13,7 +13,7 @@ class {{classname}} {
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{{datatype}}} {{name}} = {{{defaultValue}}}
|
{{{dataType}}} {{name}} = {{{defaultValue}}}
|
||||||
|
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
|
@ -12,16 +12,16 @@
|
|||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
{{#jackson}}
|
{{#jackson}}
|
||||||
@JsonValue
|
@JsonValue
|
||||||
{{/jackson}}
|
{{/jackson}}
|
||||||
public {{{datatype}}} getValue() {
|
public {{{dataType}}} getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException {
|
public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException {
|
||||||
{{{datatype}}} value = jsonReader.{{#isInteger}}nextInt(){{/isInteger}}{{^isInteger}}next{{{datatype}}}(){{/isInteger}};
|
{{{dataType}}} value = jsonReader.{{#isInteger}}nextInt(){{/isInteger}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}};
|
||||||
return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue(String.valueOf(value));
|
return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue(String.valueOf(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
|||||||
// Is a container wrapped={{isXmlWrapped}}
|
// Is a container wrapped={{isXmlWrapped}}
|
||||||
{{#items}}
|
{{#items}}
|
||||||
// items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}}
|
// items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}}
|
||||||
// items.example={{example}} items.type={{datatype}}
|
// items.example={{example}} items.type={{dataType}}
|
||||||
@XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
|
@XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
|
||||||
{{/items}}
|
{{/items}}
|
||||||
{{#isXmlWrapped}}
|
{{#isXmlWrapped}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
@XmlType(name="{{datatypeWithEnum}}")
|
@XmlType(name="{{datatypeWithEnum}}")
|
||||||
@XmlEnum({{datatype}}.class)
|
@XmlEnum({{dataType}}.class)
|
||||||
public enum {{datatypeWithEnum}} {
|
public enum {{datatypeWithEnum}} {
|
||||||
|
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}@XmlEnumValue({{{value}}}) {{name}}({{datatype}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
{{#enumVars}}@XmlEnumValue({{{value}}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|
||||||
|
|
||||||
private {{datatype}} value;
|
private {{dataType}} value;
|
||||||
|
|
||||||
{{datatypeWithEnum}} ({{datatype}} v) {
|
{{datatypeWithEnum}} ({{dataType}} v) {
|
||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
@XmlType(name="{{datatypeWithEnum}}")
|
@XmlType(name="{{datatypeWithEnum}}")
|
||||||
@XmlEnum({{datatype}}.class)
|
@XmlEnum({{dataType}}.class)
|
||||||
public enum {{datatypeWithEnum}} {
|
public enum {{datatypeWithEnum}} {
|
||||||
|
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{datatype}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
{{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|
||||||
|
|
||||||
private {{datatype}} value;
|
private {{dataType}} value;
|
||||||
|
|
||||||
{{datatypeWithEnum}} ({{datatype}} v) {
|
{{datatypeWithEnum}} ({{dataType}} v) {
|
||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public {{datatype}} value() {
|
public {{dataType}} value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
|
|||||||
{{#vendorExtensions.extraAnnotation}}
|
{{#vendorExtensions.extraAnnotation}}
|
||||||
{{{vendorExtensions.extraAnnotation}}}
|
{{{vendorExtensions.extraAnnotation}}}
|
||||||
{{/vendorExtensions.extraAnnotation}}
|
{{/vendorExtensions.extraAnnotation}}
|
||||||
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{datatype}} {{getter}}() {
|
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{dataType}} {{getter}}() {
|
||||||
if ({{name}} == null) {
|
if ({{name}} == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
{{/-last}}
|
{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
private {{datatype}} value;
|
private {{dataType}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{datatype}} value) {
|
{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
{{/-last}}
|
{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
private {{datatype}} value;
|
private {{dataType}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{datatype}} value) {
|
{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
public enum {{datatypeWithEnum}} {
|
public enum {{datatypeWithEnum}} {
|
||||||
|
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}{{name}}({{datatype}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
{{#enumVars}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|
||||||
|
|
||||||
private {{datatype}} value;
|
private {{dataType}} value;
|
||||||
|
|
||||||
{{datatypeWithEnum}} ({{datatype}} v) {
|
{{datatypeWithEnum}} ({{dataType}} v) {
|
||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private final {{{datatype}}} value;
|
private final {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ goog.provide('{{package}}.{{name}}');
|
|||||||
* {{{description}}}
|
* {{{description}}}
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{! Explicitly force types to be non-nullable using !. This is redundant but valid }}
|
{{! Explicitly force types to be non-nullable using !. This is redundant but valid }}
|
||||||
* @type {!{{{datatype}}}}
|
* @type {!{{{dataType}}}}
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
{{package}}.{{classname}}.prototype.{{name}};
|
{{package}}.{{classname}}.prototype.{{name}};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ case class {{classname}} (
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{{name}}}: {{^required}}Option[{{/required}}{{^isEnum}}{{datatype}}{{/isEnum}}{{#isEnum}}{{classname}}Enums.{{datatypeWithEnum}}{{/isEnum}}{{^required}}]{{/required}}{{#hasMore}},{{/hasMore}}
|
{{{name}}}: {{^required}}Option[{{/required}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isEnum}}{{classname}}Enums.{{datatypeWithEnum}}{{/isEnum}}{{^required}}]{{/required}}{{#hasMore}},{{/hasMore}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
) extends ApiModel
|
) extends ApiModel
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#seriali
|
|||||||
@SerializedName("{{baseName}}")
|
@SerializedName("{{baseName}}")
|
||||||
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}}
|
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}}
|
||||||
@SerializedName("{{baseName}}")
|
@SerializedName("{{baseName}}")
|
||||||
private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}}
|
private {{{dataType}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
/**{{#description}}
|
/**{{#description}}
|
||||||
|
@ -20,7 +20,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
|
|||||||
@SerializedName("{{baseName}}")
|
@SerializedName("{{baseName}}")
|
||||||
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}}
|
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}}
|
||||||
@SerializedName("{{baseName}}")
|
@SerializedName("{{baseName}}")
|
||||||
private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}}
|
private {{{dataType}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
/**{{#description}}
|
/**{{#description}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace {{packageName}}.Models
|
|||||||
public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }
|
public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
public {{{datatype}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
|
public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{#hasMore}}
|
{{#hasMore}}
|
||||||
{{/hasMore}}
|
{{/hasMore}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{title}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{title}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -88,7 +88,7 @@ h2. Models
|
|||||||
{{#model}}
|
{{#model}}
|
||||||
h3. {{classname}}
|
h3. {{classname}}
|
||||||
||Field Name||Required||Type||Description||
|
||Field Name||Required||Type||Description||
|
||||||
{{#vars}} |{{name}} |{{#isNotRequired}}(x){{/isNotRequired}} |{{datatype}} |{{description}} |
|
{{#vars}} |{{name}} |{{#isNotRequired}}(x){{/isNotRequired}} |{{dataType}} |{{description}} |
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
@ -49,19 +49,19 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// {{description}}
|
/// {{description}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{^isNotContainer}}{{{datatype}}}& {{getter}}();
|
{{^isNotContainer}}{{{dataType}}}& {{getter}}();
|
||||||
{{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{getter}}() const;
|
{{/isNotContainer}}{{#isNotContainer}}{{{dataType}}} {{getter}}() const;
|
||||||
{{/isNotContainer}}{{^required}}bool {{nameInCamelCase}}IsSet() const;
|
{{/isNotContainer}}{{^required}}bool {{nameInCamelCase}}IsSet() const;
|
||||||
void unset{{name}}();
|
void unset{{name}}();
|
||||||
{{/required}}
|
{{/required}}
|
||||||
void {{setter}}({{{datatype}}} value);
|
void {{setter}}({{{dataType}}} value);
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isInherited}}
|
{{^isInherited}}
|
||||||
{{{datatype}}} m_{{name}};
|
{{{dataType}}} m_{{name}};
|
||||||
{{^required}}bool m_{{name}}IsSet;
|
{{^required}}bool m_{{name}}IsSet;
|
||||||
{{/required}}
|
{{/required}}
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
|
@ -252,7 +252,7 @@ void {{classname}}::fromJson(web::json::value& val)
|
|||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
if(!val[utility::conversions::to_string_t("{{baseName}}")].is_null())
|
if(!val[utility::conversions::to_string_t("{{baseName}}")].is_null())
|
||||||
{
|
{
|
||||||
{{{datatype}}} newItem({{{defaultValue}}});
|
{{{dataType}}} newItem({{{defaultValue}}});
|
||||||
newItem->fromJson(val[utility::conversions::to_string_t("{{baseName}}")]);
|
newItem->fromJson(val[utility::conversions::to_string_t("{{baseName}}")]);
|
||||||
{{setter}}( newItem );
|
{{setter}}( newItem );
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ void {{classname}}::fromJson(web::json::value& val)
|
|||||||
{{setter}}(ModelBase::fileFromJson(val[utility::conversions::to_string_t("{{baseName}}")]));
|
{{setter}}(ModelBase::fileFromJson(val[utility::conversions::to_string_t("{{baseName}}")]));
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
{{^vendorExtensions.x-codegen-file}}
|
{{^vendorExtensions.x-codegen-file}}
|
||||||
{{{datatype}}} new{{name}}({{{defaultValue}}});
|
{{{dataType}}} new{{name}}({{{defaultValue}}});
|
||||||
new{{name}}->fromJson(val[utility::conversions::to_string_t("{{baseName}}")]);
|
new{{name}}->fromJson(val[utility::conversions::to_string_t("{{baseName}}")]);
|
||||||
{{setter}}( new{{name}} );
|
{{setter}}( new{{name}} );
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
@ -515,7 +515,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
if(multipart->hasContent(utility::conversions::to_string_t("{{baseName}}")))
|
if(multipart->hasContent(utility::conversions::to_string_t("{{baseName}}")))
|
||||||
{
|
{
|
||||||
{{{datatype}}} newItem({{{defaultValue}}});
|
{{{dataType}}} newItem({{{defaultValue}}});
|
||||||
newItem->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
newItem->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
||||||
{{setter}}( newItem );
|
{{setter}}( newItem );
|
||||||
}
|
}
|
||||||
@ -536,7 +536,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{setter}}(multipart->getContent(utility::conversions::to_string_t("{{baseName}}")));
|
{{setter}}(multipart->getContent(utility::conversions::to_string_t("{{baseName}}")));
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
{{^vendorExtensions.x-codegen-file}}
|
{{^vendorExtensions.x-codegen-file}}
|
||||||
{{{datatype}}} new{{name}}({{{defaultValue}}});
|
{{{dataType}}} new{{name}}({{{defaultValue}}});
|
||||||
new{{name}}->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
new{{name}}->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
||||||
{{setter}}( new{{name}} );
|
{{setter}}( new{{name}} );
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
@ -552,25 +552,25 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isInherited}}
|
{{^isInherited}}
|
||||||
{{^isNotContainer}}
|
{{^isNotContainer}}
|
||||||
{{{datatype}}}& {{classname}}::{{getter}}()
|
{{{dataType}}}& {{classname}}::{{getter}}()
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
|
|
||||||
void {{classname}}::{{setter}}({{{datatype}}} value)
|
void {{classname}}::{{setter}}({{{dataType}}} value)
|
||||||
{
|
{
|
||||||
m_{{name}} = value;
|
m_{{name}} = value;
|
||||||
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
||||||
}
|
}
|
||||||
{{/isNotContainer}}
|
{{/isNotContainer}}
|
||||||
{{#isNotContainer}}
|
{{#isNotContainer}}
|
||||||
{{{datatype}}} {{classname}}::{{getter}}() const
|
{{{dataType}}} {{classname}}::{{getter}}() const
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void {{classname}}::{{setter}}({{{datatype}}} value)
|
void {{classname}}::{{setter}}({{{dataType}}} value)
|
||||||
{
|
{
|
||||||
m_{{name}} = value;
|
m_{{name}} = value;
|
||||||
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
||||||
|
@ -21,7 +21,7 @@ namespace {{modelPackage}} {
|
|||||||
/// <value>{{{description}}}</value>{{/description}}
|
/// <value>{{{description}}}</value>{{/description}}
|
||||||
[DataMember(Name="{{baseName}}", EmitDefaultValue=false)]
|
[DataMember(Name="{{baseName}}", EmitDefaultValue=false)]
|
||||||
[JsonProperty(PropertyName = "{{baseName}}")]
|
[JsonProperty(PropertyName = "{{baseName}}")]
|
||||||
public {{{datatype}}} {{name}} { get; set; }
|
public {{{dataType}}} {{name}} { get; set; }
|
||||||
|
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{datatype}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{datatype}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -106,7 +106,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
|||||||
/// <value>{{description}}</value>{{/description}}
|
/// <value>{{description}}</value>{{/description}}
|
||||||
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]{{#isDate}}
|
[DataMember(Name="{{baseName}}", EmitDefaultValue={{emitDefaultValue}})]{{#isDate}}
|
||||||
[JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}}
|
[JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}}
|
||||||
public {{{datatype}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
|
public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
|||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#hasValidation}}
|
{{#hasValidation}}
|
||||||
{{#maxLength}}
|
{{#maxLength}}
|
||||||
// {{{name}}} ({{{datatype}}}) maxLength
|
// {{{name}}} ({{{dataType}}}) maxLength
|
||||||
if(this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}})
|
if(this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}})
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" });
|
||||||
@ -261,7 +261,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
|||||||
|
|
||||||
{{/maxLength}}
|
{{/maxLength}}
|
||||||
{{#minLength}}
|
{{#minLength}}
|
||||||
// {{{name}}} ({{{datatype}}}) minLength
|
// {{{name}}} ({{{dataType}}}) minLength
|
||||||
if(this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}})
|
if(this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}})
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" });
|
||||||
@ -269,16 +269,16 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
|||||||
|
|
||||||
{{/minLength}}
|
{{/minLength}}
|
||||||
{{#maximum}}
|
{{#maximum}}
|
||||||
// {{{name}}} ({{{datatype}}}) maximum
|
// {{{name}}} ({{{dataType}}}) maximum
|
||||||
if(this.{{{name}}} > ({{{datatype}}}){{maximum}})
|
if(this.{{{name}}} > ({{{dataType}}}){{maximum}})
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/maximum}}
|
{{/maximum}}
|
||||||
{{#minimum}}
|
{{#minimum}}
|
||||||
// {{{name}}} ({{{datatype}}}) minimum
|
// {{{name}}} ({{{dataType}}}) minimum
|
||||||
if(this.{{{name}}} < ({{{datatype}}}){{minimum}})
|
if(this.{{{name}}} < ({{{dataType}}}){{minimum}})
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
|||||||
{{/minimum}}
|
{{/minimum}}
|
||||||
{{#pattern}}
|
{{#pattern}}
|
||||||
{{^isByteArray}}
|
{{^isByteArray}}
|
||||||
// {{{name}}} ({{{datatype}}}) pattern
|
// {{{name}}} ({{{dataType}}}) pattern
|
||||||
Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}});
|
Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}});
|
||||||
if (false == regex{{{name}}}.Match(this.{{{name}}}).Success)
|
if (false == regex{{{name}}}.Match(this.{{{name}}}).Success)
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#parent}}
|
{{#parent}}
|
||||||
{{#parentVars}}
|
{{#parentVars}}
|
||||||
**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/parentVars}}
|
{{/parentVars}}
|
||||||
{{/parent}}
|
{{/parent}}
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
class {{classname}} {
|
class {{classname}} {
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#description}}/* {{{description}}} */{{/description}}
|
{{#description}}/* {{{description}}} */{{/description}}
|
||||||
{{{datatype}}} {{name}} = {{{defaultValue}}};
|
{{{dataType}}} {{name}} = {{{defaultValue}}};
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{
|
{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
]
|
]
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
@type t :: %__MODULE__{
|
||||||
{{#vars}}:"{{baseName}}" => {{{datatype}}}{{#hasMore}},
|
{{#vars}}:"{{baseName}}" => {{{dataType}}}{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -23,7 +23,7 @@ defimpl Poison.Decoder, for: {{moduleName}}.Model.{{classname}} do
|
|||||||
value
|
value
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
{{#datatype}}|> deserialize(:"{{baseName}}", {{#isListContainer}}:list, {{moduleName}}.Model.{{items.datatype}}{{/isListContainer}}{{#isMapContainer}}:map, {{moduleName}}.Model.{{items.datatype}}{{/isMapContainer}}{{#isDate}}:date, nil{{/isDate}}{{#isDateTime}}:date, nil{{/isDateTime}}{{^isDate}}{{^isDateTime}}{{^isMapContainer}}{{^isListContainer}}:struct, {{moduleName}}.Model.{{datatype}}{{/isListContainer}}{{/isMapContainer}}{{/isDateTime}}{{/isDate}}, options)
|
{{#datatype}}|> deserialize(:"{{baseName}}", {{#isListContainer}}:list, {{moduleName}}.Model.{{items.datatype}}{{/isListContainer}}{{#isMapContainer}}:map, {{moduleName}}.Model.{{items.datatype}}{{/isMapContainer}}{{#isDate}}:date, nil{{/isDate}}{{#isDateTime}}:date, nil{{/isDateTime}}{{^isDate}}{{^isDateTime}}{{^isMapContainer}}{{^isListContainer}}:struct, {{moduleName}}.Model.{{dataType}}{{/isListContainer}}{{/isMapContainer}}{{/isDateTime}}{{/isDate}}, options)
|
||||||
{{/datatype}}
|
{{/datatype}}
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
type alias {{classname}} =
|
type alias {{classname}} =
|
||||||
{ {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{/required}}{{#isContainer}}(List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{datatype}}{{/isEnum}}{{#isContainer}}){{/isContainer}}
|
{ {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{/required}}{{#isContainer}}(List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isContainer}}){{/isContainer}}
|
||||||
{{/vars}} }
|
{{/vars}} }
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-export_type([{{classname}}/0]).
|
-export_type([{{classname}}/0]).
|
||||||
|
|
||||||
-type {{classname}}() ::
|
-type {{classname}}() ::
|
||||||
#{ {{#vars}}'{{name}}' {{#required}}:={{/required}}{{^required}}=>{{/required}} {{{datatype}}}{{#hasMore}},
|
#{ {{#vars}}'{{name}}' {{#required}}:={{/required}}{{^required}}=>{{/required}} {{{dataType}}}{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import {{packageName}}._
|
|||||||
* @param {{name}} {{{description}}}
|
* @param {{name}} {{{description}}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
*/
|
*/
|
||||||
case class {{classname}}({{#vars}}{{name}}: {{^required}}Option[{{{datatype}}}]{{/required}}{{#required}}{{{datatype}}}{{/required}}{{^-last}},{{/-last}}
|
case class {{classname}}({{#vars}}{{name}}: {{^required}}Option[{{{dataType}}}]{{/required}}{{#required}}{{{dataType}}}{{/required}}{{^-last}},{{/-last}}
|
||||||
{{/vars}})
|
{{/vars}})
|
||||||
|
|
||||||
object {{classname}} {
|
object {{classname}} {
|
||||||
|
@ -18,7 +18,7 @@ package {{package}} {
|
|||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}[XmlElement(name="{{baseName}}")]
|
{{^isContainer}}[XmlElement(name="{{baseName}}")]
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
public var {{name}}: {{{datatype}}} = {{{defaultValue}}};
|
public var {{name}}: {{{dataType}}} = {{{defaultValue}}};
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
public function toString(): String {
|
public function toString(): String {
|
||||||
|
@ -27,17 +27,17 @@ class {{classname}}(Model):
|
|||||||
{{/-last}}
|
{{/-last}}
|
||||||
{{/enumVars}}{{/allowableValues}}
|
{{/enumVars}}{{/allowableValues}}
|
||||||
|
|
||||||
def __init__(self{{#vars}}, {{name}}{{^supportPython2}}: {{datatype}}{{/supportPython2}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
|
def __init__(self{{#vars}}, {{name}}{{^supportPython2}}: {{dataType}}{{/supportPython2}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
|
||||||
"""{{classname}} - a model defined in OpenAPI
|
"""{{classname}} - a model defined in OpenAPI
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
|
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
|
||||||
:type {{name}}: {{datatype}}
|
:type {{name}}: {{dataType}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
"""
|
"""
|
||||||
self.openapi_types = {
|
self.openapi_types = {
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
'{{name}}': {{{datatype}}}{{#hasMore}},{{/hasMore}}
|
'{{name}}': {{{dataType}}}{{#hasMore}},{{/hasMore}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class {{classname}}(Model):
|
|||||||
|
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
@property
|
@property
|
||||||
def {{name}}(self){{^supportPython2}} -> {{datatype}}{{/supportPython2}}:
|
def {{name}}(self){{^supportPython2}} -> {{dataType}}{{/supportPython2}}:
|
||||||
"""Gets the {{name}} of this {{classname}}.
|
"""Gets the {{name}} of this {{classname}}.
|
||||||
|
|
||||||
{{#description}}
|
{{#description}}
|
||||||
@ -72,12 +72,12 @@ class {{classname}}(Model):
|
|||||||
{{/description}}
|
{{/description}}
|
||||||
|
|
||||||
:return: The {{name}} of this {{classname}}.
|
:return: The {{name}} of this {{classname}}.
|
||||||
:rtype: {{datatype}}
|
:rtype: {{dataType}}
|
||||||
"""
|
"""
|
||||||
return self._{{name}}
|
return self._{{name}}
|
||||||
|
|
||||||
@{{name}}.setter
|
@{{name}}.setter
|
||||||
def {{name}}(self, {{name}}{{^supportPython2}}: {{datatype}}{{/supportPython2}}):
|
def {{name}}(self, {{name}}{{^supportPython2}}: {{dataType}}{{/supportPython2}}):
|
||||||
"""Sets the {{name}} of this {{classname}}.
|
"""Sets the {{name}} of this {{classname}}.
|
||||||
|
|
||||||
{{#description}}
|
{{#description}}
|
||||||
@ -85,7 +85,7 @@ class {{classname}}(Model):
|
|||||||
{{/description}}
|
{{/description}}
|
||||||
|
|
||||||
:param {{name}}: The {{name}} of this {{classname}}.
|
:param {{name}}: The {{name}} of this {{classname}}.
|
||||||
:type {{name}}: {{datatype}}
|
:type {{name}}: {{dataType}}
|
||||||
"""
|
"""
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
||||||
|
@ -19,6 +19,6 @@ const (
|
|||||||
type {{classname}} struct {
|
type {{classname}} struct {
|
||||||
{{#vars}}{{#description}}
|
{{#vars}}{{#description}}
|
||||||
// {{{description}}}{{/description}}
|
// {{{description}}}{{/description}}
|
||||||
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{datatype}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"`
|
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"`
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}{{/isEnum}}{{/model}}{{/models}}
|
}{{/isEnum}}{{/model}}{{/models}}
|
||||||
|
@ -35,7 +35,7 @@ type {{classname}} struct {
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
// {{{description}}}
|
// {{{description}}}
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{datatype}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}"{{/withXml}}`
|
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}"{{/withXml}}`
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{datatype}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{datatype}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -96,7 +96,7 @@ instance Arbitrary {{classname}} where
|
|||||||
arbitrary =
|
arbitrary =
|
||||||
{{#isAlias}}{{classname}} <$> arbitrary{{/isAlias}}{{^isAlias}}{{^hasVars}}
|
{{#isAlias}}{{classname}} <$> arbitrary{{/isAlias}}{{^isAlias}}{{^hasVars}}
|
||||||
pure {{/hasVars}}{{classname}}
|
pure {{/hasVars}}{{classname}}
|
||||||
{{#hasVars}} <$>{{/hasVars}} {{#vars}}arbitrary -- {{name}} :: {{^required}}Maybe {{/required}}{{datatype}}
|
{{#hasVars}} <$>{{/hasVars}} {{#vars}}arbitrary -- {{name}} :: {{^required}}Maybe {{/required}}{{dataType}}
|
||||||
{{#hasMore}} <*> {{/hasMore}}{{/vars}}{{/isAlias}}
|
{{#hasMore}} <*> {{/hasMore}}{{/vars}}{{/isAlias}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{/model}}
|
{{/model}}
|
||||||
|
@ -29,7 +29,7 @@ import Data.Function ((&))
|
|||||||
{{^vendorExtensions.x-customNewtype}}
|
{{^vendorExtensions.x-customNewtype}}
|
||||||
{{^parent}}
|
{{^parent}}
|
||||||
{{vendorExtensions.x-data}} {{classname}} = {{classname}}
|
{{vendorExtensions.x-data}} {{classname}} = {{classname}}
|
||||||
{ {{#vars}}{{& name}} :: {{datatype}} -- ^ {{& description}}{{#hasMore}}
|
{ {{#vars}}{{& name}} :: {{dataType}} -- ^ {{& description}}{{#hasMore}}
|
||||||
, {{/hasMore}}{{/vars}}
|
, {{/hasMore}}{{/vars}}
|
||||||
} deriving (Show, Eq, Generic)
|
} deriving (Show, Eq, Generic)
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@
|
|||||||
<h3><a name="{{name}}"><code>{{name}}</code>{{#title}} - {{title}}{{/title}}</a> <a class="up" href="#__Models">Up</a></h3>
|
<h3><a name="{{name}}"><code>{{name}}</code>{{#title}} - {{title}}{{/title}}</a> <a class="up" href="#__Models">Up</a></h3>
|
||||||
{{#unescapedDescription}}<div class='model-description'>{{unescapedDescription}}</div>{{/unescapedDescription}}
|
{{#unescapedDescription}}<div class='model-description'>{{unescapedDescription}}</div>{{/unescapedDescription}}
|
||||||
<div class="field-items">
|
<div class="field-items">
|
||||||
{{#vars}}<div class="param">{{name}} {{^required}}(optional){{/required}}</div><div class="param-desc"><span class="param-type">{{^isPrimitiveType}}<a href="#{{complexType}}">{{datatype}}</a>{{/isPrimitiveType}}</span> {{unescapedDescription}} {{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>
|
{{#vars}}<div class="param">{{name}} {{^required}}(optional){{/required}}</div><div class="param-desc"><span class="param-type">{{^isPrimitiveType}}<a href="#{{complexType}}">{{dataType}}</a>{{/isPrimitiveType}}</span> {{unescapedDescription}} {{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
<div class="param-enum-header">Enum:</div>
|
<div class="param-enum-header">Enum:</div>
|
||||||
{{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}}
|
{{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}}
|
||||||
|
@ -381,7 +381,7 @@
|
|||||||
{{#headers}}
|
{{#headers}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{#name}}{{name}}{{/name}}</td>
|
<td>{{#name}}{{name}}{{/name}}</td>
|
||||||
<td>{{#datatype}}{{datatype}}{{/datatype}}</td>
|
<td>{{#datatype}}{{dataType}}{{/datatype}}</td>
|
||||||
<td>{{#dataFormat}}{{dataFormat}}{{/dataFormat}}</td>
|
<td>{{#dataFormat}}{{dataFormat}}{{/dataFormat}}</td>
|
||||||
<td>{{#description}}{{description}}{{/description}}</td>
|
<td>{{#description}}{{description}}{{/description}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ data class {{classname}} (
|
|||||||
* {{{description}}}
|
* {{{description}}}
|
||||||
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||||
*/
|
*/
|
||||||
enum class {{nameInCamelCase}}(val value: {{datatype}}){
|
enum class {{nameInCamelCase}}(val value: {{dataType}}){
|
||||||
{{#allowableValues}}{{#enumVars}}
|
{{#allowableValues}}{{#enumVars}}
|
||||||
@Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
@Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||||
{{/enumVars}}{{/allowableValues}}
|
{{/enumVars}}{{/allowableValues}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
|
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
|
@ -1,4 +1,4 @@
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}
|
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#vars}}{{#isEnum}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
|
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
|
@ -1,4 +1,4 @@
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
/* {{{description}}} */
|
/* {{{description}}} */
|
||||||
{{/description}}
|
{{/description}}
|
||||||
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}
|
val {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{datatype}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{datatype}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -43,7 +43,7 @@ __PACKAGE__->class_documentation({description => '{{description}}',
|
|||||||
__PACKAGE__->method_documentation({
|
__PACKAGE__->method_documentation({
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
'{{name}}' => {
|
'{{name}}' => {
|
||||||
datatype => '{{datatype}}',
|
datatype => '{{dataType}}',
|
||||||
base_name => '{{baseName}}',
|
base_name => '{{baseName}}',
|
||||||
description => '{{description}}',
|
description => '{{description}}',
|
||||||
format => '{{format}}',
|
format => '{{format}}',
|
||||||
@ -53,7 +53,7 @@ __PACKAGE__->method_documentation({
|
|||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->openapi_types( {
|
__PACKAGE__->openapi_types( {
|
||||||
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{{dataType}}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ use {{moduleName}}::Object::{{classname}};
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -137,7 +137,7 @@ class {{controllerName}} extends Controller
|
|||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
{{#isBodyParam}}
|
{{#isBodyParam}}
|
||||||
${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}{{#items}}array<{{datatype}}>{{/items}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', $inputFormat);
|
${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}{{#items}}array<{{dataType}}>{{/items}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', $inputFormat);
|
||||||
{{/isBodyParam}}
|
{{/isBodyParam}}
|
||||||
{{^isBodyParam}}
|
{{^isBodyParam}}
|
||||||
${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}array<{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}{{^collectionFormat}}csv{{/collectionFormat}},{{dataType}}>{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', 'string');
|
${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}array<{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}{{^collectionFormat}}csv{{/collectionFormat}},{{dataType}}>{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', 'string');
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
{{#items}}
|
{{#items}}
|
||||||
$asserts[] = new Assert\All([
|
$asserts[] = new Assert\All([
|
||||||
new Assert\Type("{{datatype}}")
|
new Assert\Type("{{dataType}}")
|
||||||
]);
|
]);
|
||||||
{{/items}}
|
{{/items}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
* @Assert\All({
|
* @Assert\All({
|
||||||
{{#items}}
|
{{#items}}
|
||||||
* @Assert\Type("{{datatype}}")
|
* @Assert\Type("{{dataType}}")
|
||||||
{{/items}}
|
{{/items}}
|
||||||
* })
|
* })
|
||||||
{{#items}}
|
{{#items}}
|
||||||
* @Type("array<{{datatype}}>")
|
* @Type("array<{{dataType}}>")
|
||||||
{{/items}}
|
{{/items}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
@ -41,8 +41,8 @@
|
|||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{^isDate}}
|
{{^isDate}}
|
||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
* @Assert\Type("{{datatype}}")
|
* @Assert\Type("{{dataType}}")
|
||||||
* @Type("{{datatype}}")
|
* @Type("{{dataType}}")
|
||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -15,7 +15,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
protected static $openAPITypes = [
|
protected static $openAPITypes = [
|
||||||
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{{dataType}}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
/**
|
/**
|
||||||
* Gets {{name}}
|
* Gets {{name}}
|
||||||
*
|
*
|
||||||
* @return {{datatype}}
|
* @return {{dataType}}
|
||||||
*/
|
*/
|
||||||
public function {{getter}}()
|
public function {{getter}}()
|
||||||
{
|
{
|
||||||
@ -277,7 +277,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
/**
|
/**
|
||||||
* Sets {{name}}
|
* Sets {{name}}
|
||||||
*
|
*
|
||||||
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
* @param {{dataType}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
@ -43,9 +43,9 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// {{description}}
|
/// {{description}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{^isNotContainer}}{{{datatype}}}& {{getter}}();
|
{{^isNotContainer}}{{{dataType}}}& {{getter}}();
|
||||||
{{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{getter}}() const;
|
{{/isNotContainer}}{{#isNotContainer}}{{{dataType}}} {{getter}}() const;
|
||||||
void {{setter}}({{{datatype}}} value);
|
void {{setter}}({{{dataType}}} value);
|
||||||
{{/isNotContainer}}{{^required}}bool {{nameInCamelCase}}IsSet() const;
|
{{/isNotContainer}}{{^required}}bool {{nameInCamelCase}}IsSet() const;
|
||||||
void unset{{name}}();
|
void unset{{name}}();
|
||||||
{{/required}}
|
{{/required}}
|
||||||
@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}} m_{{name}};
|
{{{dataType}}} m_{{name}};
|
||||||
{{^required}}
|
{{^required}}
|
||||||
bool m_{{name}}IsSet;{{/required}}
|
bool m_{{name}}IsSet;{{/required}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
@ -99,7 +99,7 @@ void {{classname}}::fromJson(nlohmann::json& val)
|
|||||||
{{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(val.at("{{baseName}}"));
|
{{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(val.at("{{baseName}}"));
|
||||||
{{/isDateTime}}{{^isDateTime}}if(!val["{{baseName}}"].is_null())
|
{{/isDateTime}}{{^isDateTime}}if(!val["{{baseName}}"].is_null())
|
||||||
{
|
{
|
||||||
{{{datatype}}} newItem({{{defaultValue}}});
|
{{{dataType}}} newItem({{{defaultValue}}});
|
||||||
newItem->fromJson(val["{{baseName}}"]);
|
newItem->fromJson(val["{{baseName}}"]);
|
||||||
{{setter}}( newItem );
|
{{setter}}( newItem );
|
||||||
}
|
}
|
||||||
@ -111,15 +111,15 @@ void {{classname}}::fromJson(nlohmann::json& val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{{#vars}}{{^isNotContainer}}{{{datatype}}}& {{classname}}::{{getter}}()
|
{{#vars}}{{^isNotContainer}}{{{dataType}}}& {{classname}}::{{getter}}()
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
{{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{classname}}::{{getter}}() const
|
{{/isNotContainer}}{{#isNotContainer}}{{{dataType}}} {{classname}}::{{getter}}() const
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
void {{classname}}::{{setter}}({{{datatype}}} value)
|
void {{classname}}::{{setter}}({{{dataType}}} value)
|
||||||
{
|
{
|
||||||
m_{{name}} = value;
|
m_{{name}} = value;
|
||||||
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
||||||
|
@ -5,7 +5,7 @@ function New-{{{classname}}} {
|
|||||||
Param (
|
Param (
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true{{#required}}, Mandatory = $true{{/required}})]
|
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true{{#required}}, Mandatory = $true{{/required}})]
|
||||||
[{{#isString}}{{{datatype}}}{{/isString}}{{^isString}}{{^required}}System.Nullable[{{/required}}{{datatype}}{{^required}}]{{/required}}{{/isString}}]
|
[{{#isString}}{{{dataType}}}{{/isString}}{{^isString}}{{^required}}System.Nullable[{{/required}}{{dataType}}{{^required}}]{{/required}}{{/isString}}]
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
${<%name%>}<%^-last%>,<%/-last%>
|
${<%name%>}<%^-last%>,<%/-last%>
|
||||||
<%={{ }}=%>
|
<%={{ }}=%>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -38,7 +38,7 @@ class {{classname}}(object):
|
|||||||
"""
|
"""
|
||||||
openapi_types = {
|
openapi_types = {
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
'{{name}}': '{{{datatype}}}'{{#hasMore}},{{/hasMore}}
|
'{{name}}': '{{{dataType}}}'{{#hasMore}},{{/hasMore}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class {{classname}}(object):
|
|||||||
{{/description}}
|
{{/description}}
|
||||||
|
|
||||||
:return: The {{name}} of this {{classname}}. # noqa: E501
|
:return: The {{name}} of this {{classname}}. # noqa: E501
|
||||||
:rtype: {{datatype}}
|
:rtype: {{dataType}}
|
||||||
"""
|
"""
|
||||||
return self._{{name}}
|
return self._{{name}}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class {{classname}}(object):
|
|||||||
{{/description}}
|
{{/description}}
|
||||||
|
|
||||||
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
|
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
|
||||||
:type: {{datatype}}
|
:type: {{dataType}}
|
||||||
"""
|
"""
|
||||||
{{#required}}
|
{{#required}}
|
||||||
if {{name}} is None:
|
if {{name}} is None:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -203,12 +203,12 @@ QJsonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}}
|
{{{dataType}}}
|
||||||
{{classname}}::{{getter}}() {
|
{{classname}}::{{getter}}() {
|
||||||
return {{name}};
|
return {{name}};
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
{{classname}}::{{setter}}({{{datatype}}} {{name}}) {
|
{{classname}}::{{setter}}({{{dataType}}} {{name}}) {
|
||||||
this->{{name}} = {{name}};
|
this->{{name}} = {{name}};
|
||||||
this->m_{{name}}_isSet = true;
|
this->m_{{name}}_isSet = true;
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ public:
|
|||||||
{{classname}}* fromJson(QString jsonString) override;
|
{{classname}}* fromJson(QString jsonString) override;
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}} {{getter}}();
|
{{{dataType}}} {{getter}}();
|
||||||
void {{setter}}({{{datatype}}} {{name}});
|
void {{setter}}({{{dataType}}} {{name}});
|
||||||
|
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}} {{name}};
|
{{{dataType}}} {{name}};
|
||||||
bool m_{{name}}_isSet;
|
bool m_{{name}}_isSet;
|
||||||
|
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
@ -80,13 +80,13 @@
|
|||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
{{#isListContainer}}
|
{{#isListContainer}}
|
||||||
self$`{{baseName}}` <- lapply({{classname}}Object$`{{baseName}}`, function(x) {
|
self$`{{baseName}}` <- lapply({{classname}}Object$`{{baseName}}`, function(x) {
|
||||||
{{baseName}}Object <- {{datatype}}$new()
|
{{baseName}}Object <- {{dataType}}$new()
|
||||||
{{baseName}}Object$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))
|
{{baseName}}Object$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))
|
||||||
{{baseName}}Object
|
{{baseName}}Object
|
||||||
})
|
})
|
||||||
{{/isListContainer}}
|
{{/isListContainer}}
|
||||||
{{^isListContainer}}
|
{{^isListContainer}}
|
||||||
{{baseName}}Object <- {{datatype}}$new()
|
{{baseName}}Object <- {{dataType}}$new()
|
||||||
{{baseName}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE))
|
{{baseName}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE))
|
||||||
self$`{{baseName}}` <- {{baseName}}Object
|
self$`{{baseName}}` <- {{baseName}}Object
|
||||||
{{/isListContainer}}
|
{{/isListContainer}}
|
||||||
@ -124,11 +124,11 @@
|
|||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
{{#isListContainer}}
|
{{#isListContainer}}
|
||||||
self$`{{baseName}}` <- lapply({{classname}}Object$`{{baseName}}`, function(x) {{datatype}}$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)))
|
self$`{{baseName}}` <- lapply({{classname}}Object$`{{baseName}}`, function(x) {{dataType}}$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)))
|
||||||
{{/isListContainer}}
|
{{/isListContainer}}
|
||||||
{{^isListContainer}}
|
{{^isListContainer}}
|
||||||
{{datatype}}Object <- {{datatype}}$new()
|
{{dataType}}Object <- {{dataType}}$new()
|
||||||
self$`{{baseName}}` <- {{datatype}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE))
|
self$`{{baseName}}` <- {{dataType}}Object$fromJSON(jsonlite::toJSON({{classname}}Object${{baseName}}, auto_unbox = TRUE))
|
||||||
{{/isListContainer}}
|
{{/isListContainer}}
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{datatype}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{datatype}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -6,7 +6,7 @@ class InitTables < ActiveRecord::Migration
|
|||||||
def change{{#models}}{{#model}}
|
def change{{#models}}{{#model}}
|
||||||
create_table "{{classFilename}}".pluralize.to_sym, id: false do |t|{{#vars}}{{#isContainer}}
|
create_table "{{classFilename}}".pluralize.to_sym, id: false do |t|{{#vars}}{{#isContainer}}
|
||||||
t.string :{{name}}{{/isContainer}}{{^isContainer}}
|
t.string :{{name}}{{/isContainer}}{{^isContainer}}
|
||||||
t.{{datatype}} :{{{name}}}{{/isContainer}}{{/vars}}
|
t.{{dataType}} :{{{name}}}{{/isContainer}}{{/vars}}
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
@ -37,13 +37,13 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// {{description}}
|
/// {{description}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{{datatype}}} {{getter}}() const;
|
{{{dataType}}} {{getter}}() const;
|
||||||
void {{setter}}({{{datatype}}} value);
|
void {{setter}}({{{dataType}}} value);
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}} m_{{name}};
|
{{{dataType}}} m_{{name}};
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,11 +74,11 @@ void {{classname}}::fromJsonString(std::string const& jsonString)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{{datatype}}} {{classname}}::{{getter}}() const
|
{{{dataType}}} {{classname}}::{{getter}}() const
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
void {{classname}}::{{setter}}({{{datatype}}} value)
|
void {{classname}}::{{setter}}({{{dataType}}} value)
|
||||||
{
|
{
|
||||||
m_{{name}} = value;
|
m_{{name}} = value;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
{{/model}}{{/models}}
|
{{/model}}{{/models}}
|
||||||
|
@ -31,7 +31,7 @@ describe '{{classname}}' do
|
|||||||
it 'should work' do
|
it 'should work' do
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||||
# validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
# validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
||||||
# validator.allowable_values.each do |value|
|
# validator.allowable_values.each do |value|
|
||||||
# expect { @instance.{{name}} = value }.not_to raise_error
|
# expect { @instance.{{name}} = value }.not_to raise_error
|
||||||
# end
|
# end
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
def self.openapi_types
|
def self.openapi_types
|
||||||
{
|
{
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
:'{{{name}}}' => :'{{{datatype}}}'{{#hasMore}},{{/hasMore}}
|
:'{{{name}}}' => :'{{{dataType}}}'{{#hasMore}},{{/hasMore}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -150,7 +150,7 @@
|
|||||||
{{/required}}
|
{{/required}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
{{{name}}}_validator = EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
{{{name}}}_validator = EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
||||||
return false unless {{{name}}}_validator.valid?(@{{{name}}})
|
return false unless {{{name}}}_validator.valid?(@{{{name}}})
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
@ -187,7 +187,7 @@
|
|||||||
# Custom attribute writer method checking allowed values (enum).
|
# Custom attribute writer method checking allowed values (enum).
|
||||||
# @param [Object] {{{name}}} Object to be assigned
|
# @param [Object] {{{name}}} Object to be assigned
|
||||||
def {{{name}}}=({{{name}}})
|
def {{{name}}}=({{{name}}})
|
||||||
validator = EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
validator = EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
||||||
unless validator.valid?({{{name}}})
|
unless validator.valid?({{{name}}})
|
||||||
fail ArgumentError, 'invalid value for "{{{name}}}", must be one of #{validator.allowable_values}.'
|
fail ArgumentError, 'invalid value for "{{{name}}}", must be one of #{validator.allowable_values}.'
|
||||||
end
|
end
|
||||||
|
@ -318,7 +318,7 @@ impl<C> Api<C> for Client where C: Has<XSpanIdString> {{#hasAuthMethods}}+ Has<O
|
|||||||
match response.status().as_u16() {
|
match response.status().as_u16() {
|
||||||
{{#responses}}
|
{{#responses}}
|
||||||
{{code}} => {
|
{{code}} => {
|
||||||
{{#headers}} header! { (Response{{nameInCamelCase}}, "{{baseName}}") => [{{{datatype}}}] }
|
{{#headers}} header! { (Response{{nameInCamelCase}}, "{{baseName}}") => [{{{dataType}}}] }
|
||||||
let response_{{name}} = match response.headers().get::<Response{{nameInCamelCase}}>() {
|
let response_{{name}} = match response.headers().get::<Response{{nameInCamelCase}}>() {
|
||||||
Some(response_{{name}}) => response_{{name}}.0.clone(),
|
Some(response_{{name}}) => response_{{name}}.0.clone(),
|
||||||
None => return Box::new(future::err(ApiError(String::from("Required response header {{baseName}} for response {{code}} was not found.")))) as Box<Future<Item=_, Error=_>>,
|
None => return Box::new(future::err(ApiError(String::from("Required response header {{baseName}} for response {{code}} was not found.")))) as Box<Future<Item=_, Error=_>>,
|
||||||
|
@ -42,7 +42,7 @@ pub const API_VERSION: &'static str = "{{appVersion}}";
|
|||||||
pub enum {{operationId}}Response {
|
pub enum {{operationId}}Response {
|
||||||
{{#responses}}
|
{{#responses}}
|
||||||
{{#message}} /// {{message}}{{/message}}
|
{{#message}} /// {{message}}{{/message}}
|
||||||
{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}} {{#dataType}}{{^headers}}( {{{dataType}}} ) {{/headers}}{{#headers}}{{#-first}}{ body: {{{dataType}}}{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}} { {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}: {{{datatype}}}{{#-last}} } {{/-last}}{{/headers}},
|
{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}} {{#dataType}}{{^headers}}( {{{dataType}}} ) {{/headers}}{{#headers}}{{#-first}}{ body: {{{dataType}}}{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}} { {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}: {{{dataType}}}{{#-last}} } {{/-last}}{{/headers}},
|
||||||
{{/responses}}
|
{{/responses}}
|
||||||
}
|
}
|
||||||
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user