encode method Null safety
- KeyedArchive object
override
Implementation
@override
void encode(KeyedArchive object) {
super.encode(object);
object.encode("title", title);
object.encode("maximum", maximum);
object.encode("exclusiveMaximum", exclusiveMaximum);
object.encode("minimum", minimum);
object.encode("exclusiveMinimum", exclusiveMinimum);
object.encode("maxLength", maxLength);
object.encode("minLength", minLength);
object.encode("pattern", pattern);
object.encode("maxItems", maxItems);
object.encode("minItems", minItems);
object.encode("uniqueItems", uniqueItems);
object.encode("multipleOf", multipleOf);
object.encode("enum", enumerated);
object.encode("minProperties", minProperties);
object.encode("maxProperties", maxProperties);
object.encode("required", isRequired);
//
object.encode("type", APITypeCodec.encode(type));
object.encodeObjects("allOf", allOf);
object.encodeObjects("anyOf", anyOf);
object.encodeObjects("oneOf", oneOf);
object.encodeObject("not", not);
object.encodeObject("items", items);
if (additionalPropertyPolicy != null || additionalPropertySchema != null) {
if (additionalPropertyPolicy ==
APISchemaAdditionalPropertyPolicy.disallowed) {
object.encode("additionalProperties", false);
} else if (additionalPropertyPolicy ==
APISchemaAdditionalPropertyPolicy.freeForm) {
object.encode("additionalProperties", true);
} else {
object.encodeObject("additionalProperties", additionalPropertySchema);
}
}
object.encodeObjectMap("properties", properties);
object.encode("description", description);
object.encode("format", format);
object.encode("default", defaultValue);
object.encode("nullable", _nullable);
object.encode("readOnly", _readOnly);
object.encode("writeOnly", _writeOnly);
object.encode("deprecated", deprecated);
}