decode method

void decode(
  1. KeyedArchive object
)
override

Implementation

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

  summary = object.decode("summary");
  description = object.decode("description");
  parameters = object.decodeObjects("parameters", () => APIParameter.empty());

  final methodNames = [
    "get",
    "put",
    "post",
    "delete",
    "options",
    "head",
    "patch",
    "trace"
  ];
  methodNames.forEach((methodName) {
    if (!object.containsKey(methodName)) {
      return;
    }
    operations[methodName] =
        object.decodeObject(methodName, () => APIOperation.empty());
  });
}