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);
     }
 }
示例#3
0
        public IEnumerable <OpenApiDocument> GetDocuments()
        {
            var text = File.ReadAllText(Uri);

            yield return(OpenApiDocumentUtils.ReadSpec(text));
        }