decode method
Implementation
void decode(KeyedArchive object) {
super.decode(object);
type = APISecuritySchemeTypeCodec.decode(object.decode("type"));
description = object.decode("description");
switch (type!) {
case APISecuritySchemeType.apiKey:
{
name = object.decode("name");
location = APIParameterLocationCodec.decode(object.decode("in"));
}
break;
case APISecuritySchemeType.oauth2:
{
flows = object.decodeObjectMap(
"flows", () => new APISecuritySchemeOAuth2Flow.empty())
as Map<String, APISecuritySchemeOAuth2Flow>?;
}
break;
case APISecuritySchemeType.http:
{
scheme = object.decode("scheme");
format = object.decode("bearerFormat");
}
break;
case APISecuritySchemeType.openID:
{
connectURL = object.decode("openIdConnectUrl");
}
break;
}
}