Emitter Options
All options live under options."@lars-artmann/typespec-asyncapi" in tspconfig.yaml, or on the command line via --option @lars-artmann/typespec-asyncapi.<option>=<value>.
Options
Section titled “Options”| Option | Type | Default | Purpose |
|---|---|---|---|
output-file |
string |
asyncapi |
Base filename (without extension) |
file-type |
string or object |
yaml |
"json", "yaml", "yml", or { format: "json", pretty: true, indent: 2 } |
split-schemas |
boolean |
false |
Split schemas into individual files under schemas/ |
asyncapi-id |
string |
unset | Root document id (e.g. "urn:com:example:api"); omitted when unset |
version |
string |
unset | Overrides info.version (highest precedence) |
Examples
Section titled “Examples”Pretty JSON:
options: "@lars-artmann/typespec-asyncapi": file-type: { format: "json", pretty: true, indent: 2 }Split schemas with a URN id:
options: "@lars-artmann/typespec-asyncapi": split-schemas: true asyncapi-id: "urn:com:example:api"Output location
Section titled “Output location”Output lands in tsp-output/@lars-artmann/typespec-asyncapi/ by convention (emitter-output-dir from the package manifest). With split-schemas, schema files land in a schemas/ subdirectory with all $ref pointers rewritten.
Where to go next
Section titled “Where to go next”- Multi-File Output — split schemas in depth
- Versioning — the
versionprecedence chain - Installation — wiring the emitter