Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(config): add subcommand to generate configuration schema #12224

Closed
tobz opened this issue Apr 14, 2022 · 3 comments · Fixed by #14316
Closed

chore(config): add subcommand to generate configuration schema #12224

tobz opened this issue Apr 14, 2022 · 3 comments · Fixed by #14316
Labels
domain: config Anything related to configuring Vector

Comments

@tobz
Copy link
Contributor

tobz commented Apr 14, 2022

(This issue is a task related to #12141: Implement configuration schema RFC)

Once #12223 is complete, we'll need a way to start easily and consistently emitting the resulting configuration schema that we get for the primary Vector configuration. We'll provide this capability by adding a Vector subcommand -- vector generate-config-schema -- that provides the simple glue logic for actually utilizing Configurable and outputting a valid JSONSchema document.

List of outcomes/acceptance criteria:

  • vector generate-schema will emit a valid JSONSchema document
  • the schema document will include top-level metadata that includes the information about the Vector release itself (whether an official release version (v0.20.0, etc) or a commit hash in the case of a local or nightly build)
@tobz tobz added the domain: config Anything related to configuring Vector label Apr 14, 2022
@spencergilbert
Copy link
Contributor

Now that we have at least three "generating" commands would it make sense to reorganize them under vector generate?

  • vector generate: produces a populated Vector configuration
  • vector generate-config-schema: produces the entire schema of Vector's configuration
  • vector config: produces a single JSON object from the provided configuration files
  • I thought there were issues for command/s to generate the schemas for Vector Native codecs (both protobuf and JSON schema)

@tobz
Copy link
Contributor Author

tobz commented Apr 15, 2022 via email

@tobz
Copy link
Contributor Author

tobz commented Sep 7, 2022

We're going to defer the bit about Vector version, etc, being top-level metadata as it depends on more sophisticated logic for parsing the metadata helper attributes and passing things other than flags/string literals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: config Anything related to configuring Vector
Projects
None yet
2 participants