Skip to content

Commit

Permalink
docs(gcp_pubsub source): Add required fields to documentation examples (
Browse files Browse the repository at this point in the history
vectordotdev#18998)

* Add required fields to documentation examples for gcp pubsub source

* Add cue generated documentation changes
  • Loading branch information
RichardoC authored and AndrooTheChen committed Sep 23, 2024
1 parent 8de303f commit 5bfd73b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/sources/gcp_pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ static CLIENT_ID: Lazy<String> = Lazy::new(|| uuid::Uuid::new_v4().to_string());
#[serde(deny_unknown_fields)]
pub struct PubsubConfig {
/// The project name from which to pull logs.
#[configurable(metadata(docs::examples = "my-log-source-project"))]
pub project: String,

/// The subscription within the project which is configured to receive logs.
#[configurable(metadata(docs::examples = "my-vector-source-subscription"))]
pub subscription: String,

/// The endpoint from which to pull data.
Expand Down
4 changes: 2 additions & 2 deletions website/cue/reference/components/sources/base/gcp_pubsub.cue
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ base: components: sources: gcp_pubsub: configuration: {
project: {
description: "The project name from which to pull logs."
required: true
type: string: {}
type: string: examples: ["my-log-source-project"]
}
retry_delay_seconds: {
deprecated: true
Expand All @@ -376,7 +376,7 @@ base: components: sources: gcp_pubsub: configuration: {
subscription: {
description: "The subscription within the project which is configured to receive logs."
required: true
type: string: {}
type: string: examples: ["my-vector-source-subscription"]
}
tls: {
description: "TLS configuration."
Expand Down

0 comments on commit 5bfd73b

Please sign in to comment.