Supported capabilities

This reference summarizes the production workflows supported by asyncapi-generator. The implemented parser profile supports the AsyncAPI 3.0 specification line, so 3.0.x documents are accepted, including suffixed versions such as 3.0.0-rc1. AsyncAPI 3.1.x is recognized but rejected because that parser profile is not implemented. Support is not extended automatically when a new AsyncAPI version is published.

The matrix describes supported workflow boundaries rather than every AsyncAPI field or JSON Schema keyword. See the linked references for configuration and the linked approvals or focused tests for executable examples.

Capability Supported input Result Important limitations Verified example
Input documents UTF-8 YAML (.yaml or .yml) and JSON (.json) documents declaring AsyncAPI 3.0.x. A source-aware AsyncAPI domain model after structural parsing and semantic validation. Format is selected by extension. Unsupported extensions, malformed input, duplicate keys, invalid UTF-8, and resource-limit violations fail explicitly. See the parser contract. AsyncApiDocumentLoaderTest loads equivalent YAML and JSON and verifies the unsupported 3.1.x diagnostic.
Local and external references Internal JSON Pointers, relative local paths, and file: URIs to complete AsyncAPI documents, selected fragments, and supported native schema assets. References are loaded eagerly, resolved relative to the owning source, and tracked in the load result with their canonical source files. Files that reference each other and repeated targets are loaded once; a $ref chain that never reaches an object fails with AAS3-REFERENCE-CYCLE. HTTP and other remote schemes are not supported. Raw external containers require a pointer to the requested object; unrelated surrounding content is not imported. Referenced local files are trusted build input and are not restricted to a project root. The focused external/main.yaml fixture and ExternalReferenceLoaderTest cover local resolution, fragments, identity, cycles, and failures.
Structured diagnostics and semantic validation Reader failures, parser failures, unresolved references, semantic validation errors, and advisories from the root document or loaded external sources. Parser failures expose a stable category and code, path, actual and expected values where applicable, and source location. Validation findings expose a rule code, authority, severity, path, and source location; warnings are returned without preventing generation. Rendered prose is for people; callers should use structured fields for programmatic handling. Output-specific incompatibilities that depend on the requested target are reported during generation rather than by coercing or rejecting the parsed contract; see Generation compatibility errors. AsyncApiDocumentLoaderTest verifies structured parser locations, validation errors, external warnings, and warning formatting.
Document bundling A parsed and validated AsyncAPI 3.0.x model whose supported local references have been loaded. A self-contained domain document: supported external objects are inlined, references to root component schemas are kept, and component schemas and recursive schemas from other files are promoted to components.schemas under their own names. Code generated from the bundle equals code generated from the original files. Bundling does not fetch remote references or import unrelated content from foreign documents. Identical copies of a schema are reused; the same name with different content fails instead of overwriting a component. BundledDocumentApprovalTest protects fixture-backed multi-file, fragment, recursive, component-catalog, and interoperability outputs.
Kotlin models Supported component Schema Objects, discovered message payload schemas, and supported object-valued Kafka key schemas. Kotlin data classes, enums, and sealed interfaces with nullability, schema defaults, JVM type mappings, Jakarta Validation annotations where supported, and Jackson annotations that keep the contract's JSON wire format (enum values, property names, access, discriminators). Requires the kotlin profile and modelPackage; kotlin-data-class is its only regular model shape. Applications provide the JSON mapper and invoke validation. Inline schemas with the same generated name but different types fail, and so do model names that generated code already uses; see Generation compatibility errors. Configuration and schema restrictions are listed in Model types. JSON-compatible Kotlin DTO links the source fixture, approval test, and complete approved model.
Java classes and records Supported component Schema Objects, discovered message payload schemas, and supported object-valued Kafka key schemas. Java classes by default, or Java records with modelConfig.modelType=java-record, including supported JVM type, validation-annotation, and wire-format Jackson annotation mappings. Requires the java profile and modelPackage. Schema default values are not applied. Records are immutable and do not have generated no-argument constructors or setters. Reserved model names fail, as for Kotlin (details). Java record is fixture-backed; the same approval test also protects the complete default Java class.
Spring Kafka producer and consumer contracts Supported Kafka channels and messages, including supported payload, record-key, header, and channel-parameter schemas. Java or Kotlin producer and consumer interfaces with typed methods, topic expressions, headers, and optional configured validation annotations. Producer and consumer interfaces can be enabled independently. Requires a Java or Kotlin source profile, both package fields, clientType=spring-kafka, and clientContract=interface. AsyncAPI operation actions do not select producer or consumer generation. Applications implement the interfaces and supply Spring and Kafka runtime wiring. Client settings without clientPackage are ignored with the unused-client-config warning in every frontend; see Configuration warnings. Spring Kafka contracts with typed headers links the contract, approvals, and complete producer and consumer interfaces.
Additional serialized producer payload methods A supported Spring Kafka producer contract plus byte-array, string, or both in producer.additionalPayloadTypes. Additional producer methods accepting byte-array and/or string payloads alongside the typed-model method. The methods are additive and duplicate settings are removed. The application is responsible for serialization; payload validation annotations are not applied to these additional methods. SpringKafkaClientApprovalTest protects complete Java and Kotlin producers with both additional payload forms.
Avro Projection The supported projection subset of AsyncAPI Schema Objects. .avsc schema artifacts through generatorName=avro-schema. Projection maps supported AsyncAPI schema structure to Avro; it is not native Avro passthrough and does not generate SpecificRecord source. schemaPackage is required. Property names and enum values that are not valid Avro names fail instead of being renamed; number maps to double. Avro Projection from an AsyncAPI Schema Object links the fixture, approval test, and complete .avsc output.
Native Avro Native Avro payloads embedded by an AsyncAPI Multi Format Schema Object or loaded from a local schema asset. Native .avsc artifacts; modelType=avro-specific-record additionally generates Java SpecificRecord source with either Java or Kotlin source profile. SpecificRecord generation has a package rule: see Native Avro and Protobuf models. Generated runtime models are Java source, and the application must provide the Avro runtime. The schema-only avro-schema profile does not generate SpecificRecords. Native Avro schema and SpecificRecord links the contract, approval test, and both approved artifacts.
Native Protobuf Native Protobuf payloads embedded by an AsyncAPI Multi Format Schema Object or loaded from a local schema asset. .proto artifacts through protobuf-schema; modelType=protobuf-message additionally generates Java messages, plus the official Kotlin DSL for the Kotlin source profile. Runtime-model generation has package and java_multiple_files requirements: see Native Avro and Protobuf models. Message generation runs protoc: see Protobuf compiler. schemaPackage controls the output path but does not rewrite declarations. Native Protobuf schema artifact links the contract, approval test, and complete .proto output. The system tests also compile the generated runtime models through every frontend.
JSON Schema Supported AsyncAPI Schema Objects and supported native JSON Schema Draft 7 payloads. Draft 7 .schema.json artifacts through generatorName=json-schema. schemaPackage is required. This profile emits schemas without runtime model source and does not promise complete JSON Schema keyword coverage. Unsupported generation features fail at the compatibility boundary. JsonSchemaApprovalTest protects the complete approved Draft 7 schema.
Maven frontend One configured plugin execution with an input document, generator profile, and the output fields required by that profile. Generated sources and resources under the configured directory, registered with the Maven project; bundled document output is written to outputFile when configured. Files an execution no longer generates are removed. Each execution is one generation request. Configuration uses the public Maven XML shape in the generator configuration reference. The system-test scenarios run real Maven builds that generate and compile models, clients, every schema family, and YAML/JSON documents, and check the configuration diagnostics.
Gradle frontend One or more named Gradle executions with an input document, generator profile, and compatible output fields. One task per execution plus an aggregate task; generated JVM sources and schema resources are registered by artifact type. Tasks support the configuration cache, and files an execution no longer generates are removed. clientConfig is shared by all executions. Each execution has its own default output directory. Supported Gradle versions are listed in the Gradle requirements. See the frontend mapping. The system-test scenarios run real Gradle builds with the Kotlin and Groovy DSLs; GradleIncrementalBuildSystemTest covers the configuration cache and up-to-date checks.
CLI frontend One invocation with an input document, generator profile, and compatible output options. The same core models, contracts, schemas, and bundled documents as the build-tool frontends, written below the selected output paths. The CLI does not register generated files with a build tool and never deletes stale generated files. It has no named executions or shared configuration block; repeatable options form lists and maps for one request. See the frontend mapping. The system-test scenarios run every scenario, including the configuration diagnostics, through the CLI as well as Maven and Gradle.
Bundled YAML and JSON documents Any supported, successfully loaded and validated contract, including supported multi-file local references. asyncapi-yaml and asyncapi-json write one self-contained document to outputFile. Source and schema profiles can also write an optional bundled YAML document. Document-only profiles require outputFile and reject model, client, and schema configuration. Serialization preserves parsed semantics, not comments, anchors, quoting, or collection style; see the YAML output contract. The complete-configuration system-test scenario writes both document profiles; the bundler approvals contain complete self-contained outputs.

Generation compatibility errors

Generation rejects some contracts even though they are valid AsyncAPI. The generated code or schema would be wrong, or two outputs would overwrite each other, so the generator fails instead of renaming or dropping contract data. These errors depend on the requested output; the same contract can generate for another profile. They are different from configuration errors, which come from the frontend settings, and from validation rules, which check the contract itself.

The first column gives the cause. The message names the schema, path, or channel involved and says what to change in the contract. The last column links a system-test scenario that fails with that error in every frontend, where one exists.

Cause Applies to Failure System-test scenario
A model is named like a type the generated code already uses, such as UUID. java, kotlin models Model 'UUID' has the name of a type that generated Kotlin code already uses. Rename the schema. diagnostics-reserved-model-name
Two different inline schemas get the same generated name. java, kotlin models Inline schema at <location> would be generated as '<name>', which is already used by the different schema at <location>. Give one a distinct title, or define it once under components.schemas. diagnostics-inline-name-collision
Properties of one schema become the same source identifier, such as account-id and accountId. java, kotlin models Schema '<name>' has properties [...] that all become the source identifier '<id>'. diagnostics-property-name-collision
Kafka header names collide after normalization, or a header is named like a fixed method parameter (payload, receivedTopic, receivedKey, messageKey). Spring Kafka clients Kafka header generation failed for '<contract>'. Rename the header. diagnostics-header-name-collision
A property schema is false, so no value satisfies it. java, kotlin models, avro-schema ... cannot represent schema '<name>'. Incompatible feature: a property schema 'false', which no value satisfies. diagnostics-false-property
Tuple-form items (an array of schemas), items: false, or an enum without type that holds non-string values. java, kotlin models, avro-schema ... cannot represent schema '<name>'. Incompatible feature: tuple-form 'items'. (or the matching feature). None
A pattern that Java cannot compile. java, kotlin models ... Incompatible feature: a 'pattern' that Java cannot compile. None
A property or schema that accepts any value, which Avro has no type for. avro-schema Avro schema generation failed: <location> accepts any value, and Avro has no type for that. Give it a type. diagnostics-avro-untyped-value
A property name or enum value that is not a valid Avro name ([A-Za-z_][A-Za-z0-9_]*). avro-schema Avro schema generation failed: <kind> '<name>' in <location> is not a valid Avro name. The generator does not rename. diagnostics-invalid-avro-name
A channel has no address. Spring Kafka clients The AsyncAPI channel has no address. None
A channel declares no messages. Spring Kafka clients The channel does not declare any messages. None
Channel IDs that become the same PascalCase contract name. Spring Kafka clients channel IDs collide after normalization; names the contracts that would be written twice. None
Messages in one channel that become the same method name. Spring Kafka clients Channel messages [...] resolve to generated client method '<name>'. Give each message a unique name. None

Other generation errors, such as a payload format the selected output cannot consume, name the payload and its schemaFormat; see Schema formats.

A component key with unsupported characters, such as Bad name!, is a contract validation error (AAS3-COMPONENT-NAME-FORMAT in validation rules), not a generation error. The diagnostics-invalid-component-name scenario covers it.

Non-goals

The project does not promise complete AsyncAPI or JSON Schema coverage, and generated code does not configure the application runtime. See Scope boundaries for the full list.