decode method

void decode(
  1. KeyedArchive object
)
override

Implementation

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

  version = object["swagger"];
  host = object["host"];
  basePath = object["basePath"];
  schemes = object["schemes"];
  consumes = object["consumes"];
  produces = object["produces"];
  security = object["security"];

  info = object.decodeObject("info", () => APIInfo()) as APIInfo;
  tags = object.decodeObjects("tags", () => APITag()) as List<APITag>;
  paths = object.decodeObjectMap("paths", () => APIPath())
      as Map<String, APIPath>;
  responses = object.decodeObjectMap("responses", () => APIResponse())
      as Map<String, APIResponse>;
  parameters = object.decodeObjectMap("parameters", () => APIParameter())
      as Map<String, APIParameter>;
  definitions = object.decodeObjectMap("definitions", () => APISchemaObject())
      as Map<String, APISchemaObject>;
  securityDefinitions =
      object.decodeObjectMap("securityDefinitions", () => APISecurityScheme())
          as Map<String, APISecurityScheme>;
}