Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions scripts/generate-component-docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,16 @@ def resolve_schema(root_schema, schema)
resolved['required'] = is_required_field
end

# Resolve any warnings attached to this option.
#
# Warnings can be specified in Rust via `#[configurable(metadata(docs::warnings = "..."))]`.
# Multiple warnings can be specified by repeating the attribute, and they will be emitted as an
# array in the CUE output.
warnings = get_schema_metadata(schema, 'docs::warnings')
if !warnings.nil?
resolved['warnings'] = warnings.is_a?(Array) ? warnings : [warnings]
end

# Reconcile the resolve schema, which essentially gives us a chance to, once the schema is
# entirely resolved, check it for logical inconsistencies, fix up anything that we reasonably can,
# and so on.
Expand Down
1 change: 1 addition & 0 deletions src/config/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use vector_lib::configurable::configurable_component;

/// API options.
#[configurable_component(global_option("api"))]
#[configurable(metadata(docs::warnings = "The API has no authentication and exposes all event data flowing through Vector. It must not be exposed to untrusted clients."))]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[serde(default, deny_unknown_fields)]
pub struct Options {
Expand Down
1 change: 1 addition & 0 deletions website/cue/reference/generated/configuration.cue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ generated: configuration: configuration: {
}
}
description: "API options."
warnings: ["The API has no authentication and exposes all event data flowing through Vector. It must not be exposed to untrusted clients."]
}
enrichment_tables: {
type: object: options: {
Expand Down
Loading