GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Home Home
Alex Wichmann edited this page
The AsyncAPI.NET library is a document object model (DOM) for an AsyncAPI description document. It provides a set of classes for constructing semantically valid AsyncAPI specifications. The library also includes a writer for serializing the DOM into JSON or YAML AsyncAPI specifications var myFirstAsyncApi = new AsyncApiDocument { Info = new AsyncApiInfo { Title = "my first asyncapi" }, Channels = new Dictionary<string, AsyncApiChannel> { { "users", new AsyncApiChannel { Subscribe = new AsyncApiOperation { OperationId = "users", Description = "my users channel" } } } } }; var yaml = myFirstAsyncApi.SerializeAsYaml(); //asyncapi: '2.6.0' // info: // title: my first asyncapi // channels: // users: // subscribe: // operationId: users // description: my users channel var httpClient = new HttpClient { BaseAddress = new Uri("https://raw.githubusercontent.com/asyncapi/spec/"), }; var stream = await httpClient.GetStreamAsync("master/examples/streetlights-kafka.yml"); var asyncApiDocument = new AsyncApiStreamReader().Read(stream, out var diagnostic); You can read more about more advanced ways to of reading or writing in the Wiki Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |