Skip to content

chore(external docs): deduplicate codec/framing schemas in generated Cue docs#25364

Draft
thomasqueirozb wants to merge 2 commits intomasterfrom
consolidate-cue-codecs
Draft

chore(external docs): deduplicate codec/framing schemas in generated Cue docs#25364
thomasqueirozb wants to merge 2 commits intomasterfrom
consolidate-cue-codecs

Conversation

@thomasqueirozb
Copy link
Copy Markdown
Contributor

@thomasqueirozb thomasqueirozb commented May 4, 2026

Summary

The doc generator was inlining the full DeserializerConfig, SerializerConfig, and both FramingConfig schemas into every component Cue file that uses decoding, encoding, or framing. This meant adding a new codec variant touched every source or sink file instead of one place.

The generator now walks each component's resolved schema recursively, detects codec/framing schemas by structure (tag-field description text and decoder-only enum variants), extracts them into three shared files, and replaces them with small per-component Cue conjunctions that contribute only the per-component variation (required, default).

Shared definitions appear in decoders.cue, encoders.cue, and framing.cue; component files reference them with 2–4 line conjunctions instead of hundreds of inlined lines. Net: −23,741 lines across 67 component files.

Vector configuration

NA

How did you test this PR?

Ran make generate-component-docs and compared jq -S . website/data/docs.json before and after. The diff is nearly identical, with only the added definitions as a diff.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

NA

@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label May 4, 2026
@github-actions github-actions Bot added domain: external docs Anything related to Vector's external, public documentation docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. labels May 4, 2026
@thomasqueirozb thomasqueirozb changed the title chore(docs): deduplicate codec/framing schemas in generated Cue docs chore(external docs): deduplicate codec/framing schemas in generated Cue docs May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: external docs Anything related to Vector's external, public documentation no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant