Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Reading
The AsyncApiReader is a component in the .NET library that can be used to deserialize AsyncAPI specifications from either JSON or YAML formats. The deserialized AsyncAPI document can then be manipulated in memory as a C# object.
To use any of the AsyncApiReaders, you first need to create an instance.
There are 3 types of readers, which all have the same API
AsyncApiStringReaderAsyncApiStreamReaderAsyncApiTextReader
To use any of the AsyncApiReaders, you first need to create an instance.
varreader=newAsyncApiStringReader();vardoc=reader.Read(yaml,outvardiagnostic);You can override default reader settings by passing in an AsyncApiReaderSettings object.
or overriding settings
varsettings=newAsyncApiReaderSettings();varreader=newAsyncApiStringReader(settings);When calling .Read() the reader will output any and all Diagnostics errors and warnings. These can be both from Serialization errors/warnings (if the specification is not proper json/yaml) or from validation errors/warnings
All diagnostic messages will contain a pointer to what failed, see example under ValidationRules