Info
AppInfo is the info section of the document: the title and the version, a description and the terms of service.
AppInfo::new takes the title and the version, which every document carries.
description and terms_of_service fill two optional fields.
The contact, the license, the tags and the external docs are pages of their own.
A field left empty is left out of the document.
The app is built from the same AppInfo, so the service's logs and its document name it the same way.
The example runs with cargo test --example asyncapi_info --no-default-features --features asyncapi.
Example
/// What the service is, who owns it, and under what terms it runs.
fn info() -> AppInfo {
AppInfo::new("payments", "1.4.0")
.description("Everything the payment domain publishes.")
.terms_of_service("https://example.com/terms")
.contact(contact())
.license(license())
.tag(tag())
.external_docs(external_docs())
}