public IEnumerable <OpenApiDocument> GetDocuments() { var client = ClientFactory.CreateClient(); var spec = client.GetStringAsync(Uri).Result; yield return(OpenApiDocumentUtils.ReadSpec(spec)); }
private static OpenApiDocument ConvertToSpec(Task <string> spec) { if (spec.IsCompleted && spec.Result != null) { return(OpenApiDocumentUtils.ReadSpec(spec.Result)); } else { return(null); } }
public IEnumerable <OpenApiDocument> GetDocuments() { var text = File.ReadAllText(Uri); yield return(OpenApiDocumentUtils.ReadSpec(text)); }