public void ParseSwaggerPaths() { var swaggerDoc = new OpenApiDocument(); swaggerDoc.AddPath("foo", p => { p.AddOperation("get", "fooget"); }); swaggerDoc.AddPath("bar", p => { p.AddOperation("get", "barget"); }); swaggerDoc.AddPath("baz", p => { p.AddOperation("get", "bazget"); p.AddOperation("put", "bazput"); }); var swaggerstring = swaggerDoc.ToString(); _Output.WriteLine(swaggerstring); var newDoc = new OpenApiDocument(); JsonStreamingParser.ParseStream(swaggerstring.ToMemoryStream(), newDoc, OpenApiVocab.Create()); }