Skip to content

docs_gen: render config snippets with benthos TemplateData once rp-connect-docs reads the generated docs #4924

Description

@JakeSCahill

cmd/tools/docs_gen builds the Common and Advanced config snippets itself (fields.go and yaml.go), reproducing the formatting of the docs pipeline it replaces so pages don't reflow during the migration. Benthos already renders these snippets through ConfigView.TemplateData() (CommonConfigYAML and AdvancedConfigYAML).

Once rp-connect-docs reads the generated docs from the release asset, switch docs_gen to the benthos snippets and accept a one-time reformat diff, so snippet rules aren't copied here by hand.

Two things the hand-built snippets fix that benthos doesn't yet, which need to move to benthos first or be dropped deliberately:

  • Common snippets leave out advanced nested fields.
  • Components whose config is a single value, a list, or an empty object (resource, fallback, drop) get snippets.

Raised in review of #4863.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions