private static Payload Map(IDictionary <string, object> payload) { if (payload == null) { return(null); } return(new Payload(payload["mediaType"] as string, ShapeMapper.Map(payload["schema"] as IDictionary <string, object>))); }
internal static Request Map(IDictionary <string, object> request) { if (request == null) { return(null); } return(new Request(ParameterMapper.Map(request["queryParameters"] as object[]), ParameterMapper.Map(request["headers"] as object[]), PayloadMapper.Map(request["payloads"] as object[]), ShapeMapper.Map(request["queryString"] as IDictionary <string, object>))); }
private static PropertyShape Map(IDictionary <string, object> prop) { if (prop == null) { return(null); } return(new PropertyShape(prop["path"] as string, ShapeMapper.Map(prop["range"] as IDictionary <string, object>), prop["inheritanceProvenance"] as string, ParameterMapperUtils.MapInt(prop, "minCount"), ParameterMapperUtils.MapInt(prop, "maxCount"))); }
private static Parameter Map(IDictionary <string, object> doc) { if (doc == null) { return(null); } var required = doc["required"] != null?Convert.ToBoolean(doc["required"]) : false; return(new Parameter(doc["name"] as string, doc["description"] as string, required, doc["binding"] as string, ShapeMapper.Map(doc["schema"] as IDictionary <string, object>))); }
internal static SecurityScheme Map(IDictionary <string, object> security) { if (security == null) { return(null); } return(new SecurityScheme(security["name"] as string, security["type"] as string, security["displayName"] as string, security["description"] as string, ParameterMapper.Map(security["headers"] as object[]), ParameterMapper.Map(security["queryParameters"] as object[]), ResponseMapper.Map(security["responses"] as object[]), SettingsMapper.Map(security["settings"] as IDictionary <string, object>), ShapeMapper.Map(security["queryString"] as IDictionary <string, object>))); }