From 367c20ab78603016892e5f4d36182bbe231f375a Mon Sep 17 00:00:00 2001 From: rtweed Date: Tue, 31 Oct 2023 18:50:10 +0000 Subject: [PATCH 1/2] Add required fields to documentation examples for gcp pubsub source --- src/sources/gcp_pubsub.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sources/gcp_pubsub.rs b/src/sources/gcp_pubsub.rs index f30b0bb54488a..59912dcd7abc0 100644 --- a/src/sources/gcp_pubsub.rs +++ b/src/sources/gcp_pubsub.rs @@ -131,9 +131,11 @@ static CLIENT_ID: Lazy = 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. From be08311214326fe9d8548cf499edd9275300741f Mon Sep 17 00:00:00 2001 From: rtweed Date: Wed, 1 Nov 2023 12:19:21 +0000 Subject: [PATCH 2/2] Add cue generated documentation changes --- website/cue/reference/components/sources/base/gcp_pubsub.cue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/cue/reference/components/sources/base/gcp_pubsub.cue b/website/cue/reference/components/sources/base/gcp_pubsub.cue index 0b1914852cef4..5e9adedbdac9d 100644 --- a/website/cue/reference/components/sources/base/gcp_pubsub.cue +++ b/website/cue/reference/components/sources/base/gcp_pubsub.cue @@ -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 @@ -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."