encode method

  1. @override
void encode(
  1. KeyedArchive object
)
override

Implementation

@override
void encode(KeyedArchive object) {
  super.encode(object);

  if (schemas.isNotEmpty) object.encodeObjectMap("schemas", schemas);
  if (responses.isNotEmpty) object.encodeObjectMap("responses", responses);
  if (parameters.isNotEmpty) object.encodeObjectMap("parameters", parameters);
//    object.encodeObjectMap("examples", examples);
  if (requestBodies.isNotEmpty) {
    object.encodeObjectMap("requestBodies", requestBodies);
  }
  if (headers.isNotEmpty) object.encodeObjectMap("headers", headers);
  if (securitySchemes.isNotEmpty) {
    object.encodeObjectMap("securitySchemes", securitySchemes);
  }

//    object.encodeObjectMap("links", links);
  if (callbacks.isNotEmpty) object.encodeObjectMap("callbacks", callbacks);
}