Writes an AsyncAPI 3.0 document to a file.
mix async_api_spex.gen --spec MyApp.AsyncApi --output asyncapi.json--spec is a module implementing AsyncApiSpex.Spec; --output defaults to
asyncapi.json. The document is validated first, and an invalid document
stops the task with the validation errors.