decode method

void decode(
  1. KeyedArchive object
)
override

Implementation

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

  schemas = object.decodeObjectMap("schemas", () => new APISchemaObject())
      as Map<String, APISchemaObject>;
  responses = object.decodeObjectMap(
      "responses", () => new APIResponse.empty()) as Map<String, APIResponse>;
  parameters =
      object.decodeObjectMap("parameters", () => new APIParameter.empty())
          as Map<String, APIParameter>;
//    examples = object.decodeObjectMap("examples", () => new APIExample());
  requestBodies = object.decodeObjectMap(
          "requestBodies", () => new APIRequestBody.empty())
      as Map<String, APIRequestBody>;
  headers = object.decodeObjectMap("headers", () => new APIHeader())
      as Map<String, APIHeader>;

  securitySchemes =
      object.decodeObjectMap("securitySchemes", () => new APISecurityScheme())
          as Map<String, APISecurityScheme>;
//    links = object.decodeObjectMap("links", () => new APILink());
  callbacks = object.decodeObjectMap("callbacks", () => new APICallback())
      as Map<String, APICallback>;
}