Skip to content

feature/protobuf schema artifacts#144

Merged
bascunansalvador merged 34 commits into
mainfrom
feature/protobuf-schema-artifacts
Jun 18, 2026
Merged

feature/protobuf schema artifacts#144
bascunansalvador merged 34 commits into
mainfrom
feature/protobuf-schema-artifacts

Conversation

@bascunansalvador

@bascunansalvador bascunansalvador commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Add native Protobuf schema artifact generation for AsyncAPI multi-format schema payloads.

Previously, the generator could recognize Protobuf schemaFormat values, but there was no dedicated generator capability that consumed native Protobuf schemas and wrote .proto artifacts. This meant Protobuf schemas were preserved by the parser, but they could not be emitted as generator output through the core generator, CLI, Maven plugin, or Gradle plugin.

The proposed solution adds native Protobuf as an explicit schema generation capability. When a schema uses schemaFormat: application/vnd.google.protobuf;version=3, the generator now treats the schema content as .proto text and writes it to the configured resource output directory. If the .proto content declares a package, for example package com.example.protobuf;, that package is used to create the output path, such as com/example/protobuf/UserCreated.proto.

The generator configuration model now includes schemas.nativeProtobuf, and the generation planner routes that configuration to a dedicated native Protobuf artifact task. The core generator writes Protobuf schemas as resource artifacts, not source artifacts.

The configuration frontend was also wired through all supported entry points.

bascunansalvador and others added 30 commits June 12, 2026 22:22
Introduce shared message header analysis so generated Spring Kafka producers and consumers can use typed header DTOs when AsyncAPI message headers are defined.

The Spring Kafka model preparation now carries header type metadata through the analyzer, payload model, Java/Kotlin factories, and templates. Generated producer and consumer APIs now include typed header parameters for messages with headers, while no-header messages keep the existing simpler signatures.

Producer templates now map non-null typed header values into Kafka record headers, and consumer templates expose the generated header type in handler signatures.

Add tests covering header analysis, Java Spring Kafka generation, and
Kotlin Spring Kafka generation so typed header imports, method
signatures, and producer header mapping remain stable.
@bascunansalvador bascunansalvador merged commit b681d50 into main Jun 18, 2026
1 check passed
@bascunansalvador bascunansalvador deleted the feature/protobuf-schema-artifacts branch June 18, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add native Protobuf schema artifact support from Multi Format Schema payloads

1 participant