Skip to content

Reference external proto enum types#1265

Draft
jwils wants to merge 3 commits into
joshuaw/protobuf-schema-generationfrom
joshuaw/protobuf-external-types
Draft

Reference external proto enum types#1265
jwils wants to merge 3 commits into
joshuaw/protobuf-schema-generationfrom
joshuaw/protobuf-external-types

Conversation

@jwils

@jwils jwils commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Why

Some schemas already have canonical protobuf enum definitions, and generating duplicate enums in schema.proto makes Java consumers deal with parallel types.

What

  • Add proto_external_types to import and reference existing proto enum types
  • Validate external enum references against exactly one option-free proto_enum_mappings source
  • Preserve generated local definitions for transformed, curated, multi-source, or non-enum types
  • Document the enum-only API and add focused generator/error coverage

Risk Assessment

Low — this only affects the unreleased elasticgraph-protobuf extension from #1080, and external references are opt-in with validation.

References

@jwils jwils force-pushed the joshuaw/protobuf-schema-generation branch 2 times, most recently from e9902f1 to f069179 Compare June 29, 2026 19:47
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.

1 participant