encode method

void encode(
  1. KeyedArchive object
)
override

Implementation

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

  if (responses == null) {
    throw ArgumentError(
        "Invalid specification. APIOperation must have non-null values for: 'responses'.");
  }

  object.encode("tags", tags);
  object.encode("summary", summary);
  object.encode("description", description);
  object.encode("operationId", id);
  object.encodeObjects("parameters", parameters);
  object.encodeObject("requestBody", requestBody);
  object.encodeObjectMap("responses", responses);
  object.encodeObjectMap("callbacks", callbacks);
  object.encode("deprecated", _deprecated);
  object.encodeObjects("security", security);
  object.encodeObjects("servers", servers);
}