From 61c8af3d71cd393b66d2b880e038c20d69e2531c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haris=20Osmanagi=C4=87?= Date: Tue, 12 Mar 2024 19:36:21 +0100 Subject: [PATCH] Update links about referencing fields in processors (#1424) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update links about referecing fields in processors * update link to referencing fields in all processors * rename processor example test files, update base64.decode doc --------- Co-authored-by: Lovro Mažgon --- .../processor/builtin/impl/avro/decode.go | 4 +++- .../builtin/impl/avro/decode_paramgen.go | 2 +- .../processor/builtin/impl/avro/encode.go | 2 ++ .../builtin/impl/avro/encode_paramgen.go | 2 +- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ .../processor/builtin/impl/base64/decode.go | 6 ++++-- .../builtin/impl/base64/decode_paramgen.go | 2 +- .../processor/builtin/impl/base64/encode.go | 6 ++++-- .../builtin/impl/base64/encode_paramgen.go | 2 +- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ .../processor/builtin/impl/field/convert.go | 7 +++++-- .../builtin/impl/field/convert_paramgen.go | 2 +- .../processor/builtin/impl/field/exclude.go | 4 +++- .../builtin/impl/field/exclude_paramgen.go | 2 +- .../processor/builtin/impl/field/rename.go | 8 ++++++-- .../builtin/impl/field/rename_paramgen.go | 2 +- pkg/plugin/processor/builtin/impl/field/set.go | 6 ++++-- .../builtin/impl/field/set_paramgen.go | 2 +- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ pkg/plugin/processor/builtin/impl/filter.go | 8 +++++--- .../processor/builtin/impl/json/decode.go | 6 ++++-- .../builtin/impl/json/decode_paramgen.go | 2 +- .../processor/builtin/impl/json/encode.go | 6 ++++-- .../builtin/impl/json/encode_paramgen.go | 2 +- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ .../processor/builtin/impl/unwrap/debezium.go | 5 +++-- .../builtin/impl/unwrap/debezium_paramgen.go | 2 +- .../builtin/impl/unwrap/kafka_connect.go | 5 +++-- .../impl/unwrap/kafka_connect_paramgen.go | 2 +- .../processor/builtin/impl/unwrap/opencdc.go | 5 +++-- .../builtin/impl/unwrap/opencdc_paramgen.go | 2 +- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ .../processor/builtin/impl/webhook/http.go | 17 +++++++++-------- .../builtin/impl/webhook/http_paramgen.go | 6 +++--- ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ ...rter_test.go => z_examples_exporter_test.go} | 0 .../{examples_test.go => z_examples_test.go} | 3 +++ .../internal/exampleutil/specs/avro.decode.json | 2 +- .../internal/exampleutil/specs/avro.encode.json | 2 +- .../exampleutil/specs/base64.decode.json | 2 +- .../exampleutil/specs/base64.encode.json | 2 +- .../exampleutil/specs/field.convert.json | 2 +- .../exampleutil/specs/field.exclude.json | 2 +- .../exampleutil/specs/field.rename.json | 2 +- .../internal/exampleutil/specs/field.set.json | 2 +- .../internal/exampleutil/specs/filter.json | 2 +- .../internal/exampleutil/specs/json.decode.json | 2 +- .../internal/exampleutil/specs/json.encode.json | 2 +- .../exampleutil/specs/unwrap.debezium.json | 2 +- .../exampleutil/specs/unwrap.kafkaconnect.json | 2 +- .../exampleutil/specs/unwrap.opencdc.json | 2 +- .../exampleutil/specs/webhook.http.json | 6 +++--- 60 files changed, 119 insertions(+), 66 deletions(-) rename pkg/plugin/processor/builtin/impl/avro/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/avro/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/base64/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/base64/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/custom/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/custom/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/field/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/field/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/json/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/json/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/unwrap/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/unwrap/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/webhook/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/webhook/{examples_test.go => z_examples_test.go} (82%) rename pkg/plugin/processor/builtin/impl/{examples_exporter_test.go => z_examples_exporter_test.go} (100%) rename pkg/plugin/processor/builtin/impl/{examples_test.go => z_examples_test.go} (82%) diff --git a/pkg/plugin/processor/builtin/impl/avro/decode.go b/pkg/plugin/processor/builtin/impl/avro/decode.go index 80a317624..95a5eeca3 100644 --- a/pkg/plugin/processor/builtin/impl/avro/decode.go +++ b/pkg/plugin/processor/builtin/impl/avro/decode.go @@ -34,7 +34,9 @@ type decoder interface { } type decodeConfig struct { - // The field that will be encoded. + // The field that will be decoded. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" default:".Payload.After"` // URL of the schema registry (e.g. http://localhost:8085) diff --git a/pkg/plugin/processor/builtin/impl/avro/decode_paramgen.go b/pkg/plugin/processor/builtin/impl/avro/decode_paramgen.go index f8ca9ad3f..abe265bbd 100644 --- a/pkg/plugin/processor/builtin/impl/avro/decode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/avro/decode_paramgen.go @@ -23,7 +23,7 @@ func (decodeConfig) Parameters() map[string]config.Parameter { }, "field": { Default: ".Payload.After", - Description: "The field that will be encoded.", + Description: "The field that will be decoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, diff --git a/pkg/plugin/processor/builtin/impl/avro/encode.go b/pkg/plugin/processor/builtin/impl/avro/encode.go index fd784c8b5..867f40c59 100644 --- a/pkg/plugin/processor/builtin/impl/avro/encode.go +++ b/pkg/plugin/processor/builtin/impl/avro/encode.go @@ -36,6 +36,8 @@ type encoder interface { type encodeConfig struct { // The field that will be encoded. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" default:".Payload.After"` // URL of the schema registry (e.g. http://localhost:8085) diff --git a/pkg/plugin/processor/builtin/impl/avro/encode_paramgen.go b/pkg/plugin/processor/builtin/impl/avro/encode_paramgen.go index a8e661952..29f1fd73d 100644 --- a/pkg/plugin/processor/builtin/impl/avro/encode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/avro/encode_paramgen.go @@ -23,7 +23,7 @@ func (encodeConfig) Parameters() map[string]config.Parameter { }, "field": { Default: ".Payload.After", - Description: "The field that will be encoded.", + Description: "The field that will be encoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, diff --git a/pkg/plugin/processor/builtin/impl/avro/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/avro/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/avro/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/avro/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/avro/examples_test.go b/pkg/plugin/processor/builtin/impl/avro/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/avro/examples_test.go rename to pkg/plugin/processor/builtin/impl/avro/z_examples_test.go index 22b23b1f4..f1e88c24e 100644 --- a/pkg/plugin/processor/builtin/impl/avro/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/avro/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package avro diff --git a/pkg/plugin/processor/builtin/impl/base64/decode.go b/pkg/plugin/processor/builtin/impl/base64/decode.go index 7ad2a192f..d43db0b6a 100644 --- a/pkg/plugin/processor/builtin/impl/base64/decode.go +++ b/pkg/plugin/processor/builtin/impl/base64/decode.go @@ -34,8 +34,10 @@ type decodeProcessor struct { } type decodeConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // Note that it is not allowed to base64 decode the `.Position` field. + // Field is the reference to the target field. Note that it is not allowed to + // base64 decode the `.Position` field. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,exclusion=.Position"` } diff --git a/pkg/plugin/processor/builtin/impl/base64/decode_paramgen.go b/pkg/plugin/processor/builtin/impl/base64/decode_paramgen.go index 08d534960..a70272526 100644 --- a/pkg/plugin/processor/builtin/impl/base64/decode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/base64/decode_paramgen.go @@ -11,7 +11,7 @@ func (decodeConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to base64 decode the `.Position` field.", + Description: "Field is the reference to the target field. Note that it is not allowed to\nbase64 decode the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/base64/encode.go b/pkg/plugin/processor/builtin/impl/base64/encode.go index 8861696b4..73a1e78d6 100644 --- a/pkg/plugin/processor/builtin/impl/base64/encode.go +++ b/pkg/plugin/processor/builtin/impl/base64/encode.go @@ -35,8 +35,10 @@ type encodeProcessor struct { } type encodeConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // Note that it is not allowed to base64 encode the `.Position` field. + // Field is a reference to the target field. Note that it is not allowed to + // base64 encode the `.Position` field. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,exclusion=.Position"` } diff --git a/pkg/plugin/processor/builtin/impl/base64/encode_paramgen.go b/pkg/plugin/processor/builtin/impl/base64/encode_paramgen.go index 603796ce9..cf6315f52 100644 --- a/pkg/plugin/processor/builtin/impl/base64/encode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/base64/encode_paramgen.go @@ -11,7 +11,7 @@ func (encodeConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to base64 encode the `.Position` field.", + Description: "Field is a reference to the target field. Note that it is not allowed to\nbase64 encode the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/base64/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/base64/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/base64/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/base64/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/base64/examples_test.go b/pkg/plugin/processor/builtin/impl/base64/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/base64/examples_test.go rename to pkg/plugin/processor/builtin/impl/base64/z_examples_test.go index 165c16065..60ba59aaa 100644 --- a/pkg/plugin/processor/builtin/impl/base64/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/base64/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package base64 diff --git a/pkg/plugin/processor/builtin/impl/custom/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/custom/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/custom/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/custom/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/custom/examples_test.go b/pkg/plugin/processor/builtin/impl/custom/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/custom/examples_test.go rename to pkg/plugin/processor/builtin/impl/custom/z_examples_test.go index 7fa68d704..356cc39d2 100644 --- a/pkg/plugin/processor/builtin/impl/custom/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/custom/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package custom diff --git a/pkg/plugin/processor/builtin/impl/field/convert.go b/pkg/plugin/processor/builtin/impl/field/convert.go index 23f496e1f..ff9dd0bab 100644 --- a/pkg/plugin/processor/builtin/impl/field/convert.go +++ b/pkg/plugin/processor/builtin/impl/field/convert.go @@ -39,8 +39,11 @@ func NewConvertProcessor(log.CtxLogger) sdk.Processor { } type convertConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // you can only convert fields that are under `.Key` and `.Payload`, and said fields should contain structured data. + // Field is the target field that should be converted. + // Note that you can only convert fields in structured data under `.Key` and + // `.Payload`. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,regex=^\\.(Payload|Key).*"` // Type is the target field type after conversion, available options are: string, int, float, bool. Type string `json:"type" validate:"required,inclusion=string|int|float|bool"` diff --git a/pkg/plugin/processor/builtin/impl/field/convert_paramgen.go b/pkg/plugin/processor/builtin/impl/field/convert_paramgen.go index a43511c24..d4b5454bd 100644 --- a/pkg/plugin/processor/builtin/impl/field/convert_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/field/convert_paramgen.go @@ -13,7 +13,7 @@ func (convertConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only convert fields that are under `.Key` and `.Payload`, and said fields should contain structured data.", + Description: "Field is the target field that should be converted.\nNote that you can only convert fields in structured data under `.Key` and\n`.Payload`.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/field/exclude.go b/pkg/plugin/processor/builtin/impl/field/exclude.go index 67ff91f4b..336bce141 100644 --- a/pkg/plugin/processor/builtin/impl/field/exclude.go +++ b/pkg/plugin/processor/builtin/impl/field/exclude.go @@ -38,7 +38,9 @@ func NewExcludeProcessor(log.CtxLogger) sdk.Processor { } type excludeConfig struct { - // Fields is a comma separated list of target fields, as they would be addressed in a Go template (e.g. `.Metadata,.Payload.After.foo`). + // Fields is a comma separated list of target fields which should be excluded. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Fields []string `json:"fields" validate:"required"` } diff --git a/pkg/plugin/processor/builtin/impl/field/exclude_paramgen.go b/pkg/plugin/processor/builtin/impl/field/exclude_paramgen.go index 72ed28693..83d55b812 100644 --- a/pkg/plugin/processor/builtin/impl/field/exclude_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/field/exclude_paramgen.go @@ -11,7 +11,7 @@ func (excludeConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "fields": { Default: "", - Description: "Fields is a comma separated list of target fields, as they would be addressed in a Go template (e.g. `.Metadata,.Payload.After.foo`).", + Description: "Fields is a comma separated list of target fields which should be excluded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/field/rename.go b/pkg/plugin/processor/builtin/impl/field/rename.go index 74a88a0b4..bbe497407 100644 --- a/pkg/plugin/processor/builtin/impl/field/rename.go +++ b/pkg/plugin/processor/builtin/impl/field/rename.go @@ -40,8 +40,12 @@ func NewRenameProcessor(log.CtxLogger) sdk.Processor { } type renameConfig struct { - // Mapping is a comma separated list of keys and values for fields and their new names (keys and values - // are separated by colons ":"). For example: `.Metadata.key:id,.Payload.After.foo:bar`. + // Mapping is a comma separated list of keys and values for fields and their + // new names (keys and values are separated by colons ":"). + // + // For example: `.Metadata.key:id,.Payload.After.foo:bar`. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Mapping []string `json:"mapping" validate:"required"` } diff --git a/pkg/plugin/processor/builtin/impl/field/rename_paramgen.go b/pkg/plugin/processor/builtin/impl/field/rename_paramgen.go index 03917f233..eb8f255cd 100644 --- a/pkg/plugin/processor/builtin/impl/field/rename_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/field/rename_paramgen.go @@ -11,7 +11,7 @@ func (renameConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "mapping": { Default: "", - Description: "Mapping is a comma separated list of keys and values for fields and their new names (keys and values\nare separated by colons \":\"). For example: `.Metadata.key:id,.Payload.After.foo:bar`.", + Description: "Mapping is a comma separated list of keys and values for fields and their\nnew names (keys and values are separated by colons \":\").\n\nFor example: `.Metadata.key:id,.Payload.After.foo:bar`.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/field/set.go b/pkg/plugin/processor/builtin/impl/field/set.go index 4f946e239..031a4ee6b 100644 --- a/pkg/plugin/processor/builtin/impl/field/set.go +++ b/pkg/plugin/processor/builtin/impl/field/set.go @@ -40,8 +40,10 @@ func NewSetProcessor(log.CtxLogger) sdk.Processor { } type setConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // Note that it is not allowed to set the `.Position` field. + // Field is the target field that will be set. Note that it is not allowed + // to set the `.Position` field. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,exclusion=.Position"` // Value is a Go template expression which will be evaluated and stored in `field` (e.g. `{{ .Payload.After }}`). Value string `json:"value" validate:"required"` diff --git a/pkg/plugin/processor/builtin/impl/field/set_paramgen.go b/pkg/plugin/processor/builtin/impl/field/set_paramgen.go index 62c0d3217..dcf0b629d 100644 --- a/pkg/plugin/processor/builtin/impl/field/set_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/field/set_paramgen.go @@ -11,7 +11,7 @@ func (setConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to set the `.Position` field.", + Description: "Field is the target field that will be set. Note that it is not allowed\nto set the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/field/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/field/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/field/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/field/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/field/examples_test.go b/pkg/plugin/processor/builtin/impl/field/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/field/examples_test.go rename to pkg/plugin/processor/builtin/impl/field/z_examples_test.go index d3143e94b..98a932a63 100644 --- a/pkg/plugin/processor/builtin/impl/field/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/field/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package field diff --git a/pkg/plugin/processor/builtin/impl/filter.go b/pkg/plugin/processor/builtin/impl/filter.go index 2a91c4c51..a49538d10 100644 --- a/pkg/plugin/processor/builtin/impl/filter.go +++ b/pkg/plugin/processor/builtin/impl/filter.go @@ -35,10 +35,12 @@ func (p *filterProcessor) Specification() (sdk.Specification, error) { return sdk.Specification{ Name: "filter", Summary: "Acknowledges all records that get passed to the filter.", - Description: `Acknowledges all records that get passed to the filter, so the records will be filtered out if -the condition provided to the processor is evaluated to "true". + Description: `Acknowledges all records that get passed to the filter, so +the records will be filtered out if the condition provided to the processor is +evaluated to ` + "`true`" + `. -**Important:** Make sure to add a condition to this processor, otherwise all records will be filtered out.`, +**Important:** Make sure to add a [condition](https://conduit.io/docs/processors/conditions) +to this processor, otherwise all records will be filtered out.`, Version: "v0.1.0", Author: "Meroxa, Inc.", Parameters: map[string]config.Parameter{}, diff --git a/pkg/plugin/processor/builtin/impl/json/decode.go b/pkg/plugin/processor/builtin/impl/json/decode.go index 099b4bc40..ade509fdb 100644 --- a/pkg/plugin/processor/builtin/impl/json/decode.go +++ b/pkg/plugin/processor/builtin/impl/json/decode.go @@ -37,8 +37,10 @@ func NewDecodeProcessor(log.CtxLogger) sdk.Processor { } type decodeConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // you can only decode fields that are under `.Key` and `.Payload`. + // Field is a reference to the target field. Only fields that are under + // `.Key` and `.Payload` can be decoded. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,regex=^\\.(Payload|Key).*,exclusion=.Payload"` } diff --git a/pkg/plugin/processor/builtin/impl/json/decode_paramgen.go b/pkg/plugin/processor/builtin/impl/json/decode_paramgen.go index 17eb1792c..70527ccf9 100644 --- a/pkg/plugin/processor/builtin/impl/json/decode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/json/decode_paramgen.go @@ -13,7 +13,7 @@ func (decodeConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only decode fields that are under `.Key` and `.Payload`.", + Description: "Field is a reference to the target field. Only fields that are under\n`.Key` and `.Payload` can be decoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/json/encode.go b/pkg/plugin/processor/builtin/impl/json/encode.go index 21886a69f..c04e8df22 100644 --- a/pkg/plugin/processor/builtin/impl/json/encode.go +++ b/pkg/plugin/processor/builtin/impl/json/encode.go @@ -37,8 +37,10 @@ func NewEncodeProcessor(log.CtxLogger) sdk.Processor { } type encodeConfig struct { - // Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`). - // you can only encode fields that are under `.Key`, `.Payload.Before` and `.Payload.After`. + // Field is a reference to the target field. Only fields that are under + // `.Key` and `.Payload` can be encoded. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"required,regex=^\\.(Payload|Key).*,exclusion=.Payload"` } diff --git a/pkg/plugin/processor/builtin/impl/json/encode_paramgen.go b/pkg/plugin/processor/builtin/impl/json/encode_paramgen.go index addaccdf1..ef7491b22 100644 --- a/pkg/plugin/processor/builtin/impl/json/encode_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/json/encode_paramgen.go @@ -13,7 +13,7 @@ func (encodeConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: "", - Description: "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only encode fields that are under `.Key`, `.Payload.Before` and `.Payload.After`.", + Description: "Field is a reference to the target field. Only fields that are under\n`.Key` and `.Payload` can be encoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRequired{}, diff --git a/pkg/plugin/processor/builtin/impl/json/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/json/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/json/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/json/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/json/examples_test.go b/pkg/plugin/processor/builtin/impl/json/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/json/examples_test.go rename to pkg/plugin/processor/builtin/impl/json/z_examples_test.go index 920708ad0..1a5c8100b 100644 --- a/pkg/plugin/processor/builtin/impl/json/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/json/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package json diff --git a/pkg/plugin/processor/builtin/impl/unwrap/debezium.go b/pkg/plugin/processor/builtin/impl/unwrap/debezium.go index 46f97ddad..a0fe338f4 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/debezium.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/debezium.go @@ -45,8 +45,9 @@ const ( ) type debeziumConfig struct { - // Field is a reference to the field which contains the Debezium record - // (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). + // Field is a reference to the field that contains the Debezium record. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"regex=^.Payload" default:".Payload.After"` } diff --git a/pkg/plugin/processor/builtin/impl/unwrap/debezium_paramgen.go b/pkg/plugin/processor/builtin/impl/unwrap/debezium_paramgen.go index 3e1bfb161..18f62ef54 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/debezium_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/debezium_paramgen.go @@ -13,7 +13,7 @@ func (debeziumConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: ".Payload.After", - Description: "Field is a reference to the field which contains the Debezium record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + Description: "Field is a reference to the field that contains the Debezium record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRegex{Regex: regexp.MustCompile("^.Payload")}, diff --git a/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect.go b/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect.go index 51a0c3ef3..b906cc69e 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect.go @@ -28,8 +28,9 @@ import ( ) type kafkaConnectConfig struct { - // Field is a reference to the field which contains the Kafka Connect record - // (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). + // Field is a reference to the field that contains the Kafka Connect record. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" validate:"regex=^.Payload" default:".Payload.After"` } diff --git a/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect_paramgen.go b/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect_paramgen.go index 8f32a87e5..9b41b9a59 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/kafka_connect_paramgen.go @@ -13,7 +13,7 @@ func (kafkaConnectConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: ".Payload.After", - Description: "Field is a reference to the field which contains the Kafka Connect record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + Description: "Field is a reference to the field that contains the Kafka Connect record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{ config.ValidationRegex{Regex: regexp.MustCompile("^.Payload")}, diff --git a/pkg/plugin/processor/builtin/impl/unwrap/opencdc.go b/pkg/plugin/processor/builtin/impl/unwrap/opencdc.go index 8ba7602d3..d72870b8f 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/opencdc.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/opencdc.go @@ -29,8 +29,9 @@ import ( ) type openCDCConfig struct { - // Field is a reference to the field which contains the OpenCDC record - // (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). + // Field is a reference to the field that contains the OpenCDC record. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). Field string `json:"field" default:".Payload.After"` } diff --git a/pkg/plugin/processor/builtin/impl/unwrap/opencdc_paramgen.go b/pkg/plugin/processor/builtin/impl/unwrap/opencdc_paramgen.go index 6c4da79cb..7a3a33dfb 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/opencdc_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/opencdc_paramgen.go @@ -11,7 +11,7 @@ func (openCDCConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ "field": { Default: ".Payload.After", - Description: "Field is a reference to the field which contains the OpenCDC record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + Description: "Field is a reference to the field that contains the OpenCDC record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, diff --git a/pkg/plugin/processor/builtin/impl/unwrap/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/unwrap/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/unwrap/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/unwrap/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/unwrap/examples_test.go b/pkg/plugin/processor/builtin/impl/unwrap/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/unwrap/examples_test.go rename to pkg/plugin/processor/builtin/impl/unwrap/z_examples_test.go index 3108bcaf5..2e54c6c06 100644 --- a/pkg/plugin/processor/builtin/impl/unwrap/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/unwrap/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package unwrap diff --git a/pkg/plugin/processor/builtin/impl/webhook/http.go b/pkg/plugin/processor/builtin/impl/webhook/http.go index e41b762f2..8f6898fd5 100644 --- a/pkg/plugin/processor/builtin/impl/webhook/http.go +++ b/pkg/plugin/processor/builtin/impl/webhook/http.go @@ -50,17 +50,18 @@ type httpConfig struct { BackoffRetryMax time.Duration `json:"backoffRetry.max" default:"5s"` // Specifies which field from the input record should be used as the body in - // the HTTP request. The value of this parameter should be a valid record - // field reference (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). + // the HTTP request. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). RequestBodyRef string `json:"request.body" default:"."` // Specifies in which field should the response body be saved. - // The value of this parameter should be a valid record field reference - // (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). ResponseBodyRef string `json:"response.body" default:".Payload.After"` - // Specifies in which field should the response status be saved. - // The value of this parameter should be a valid record field reference - // (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)). - // If no value is set, then the response status will NOT be saved. + // Specifies in which field should the response status be saved. If no value + // is set, then the response status will NOT be saved. + // + // For more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields). ResponseStatusRef string `json:"response.status"` } diff --git a/pkg/plugin/processor/builtin/impl/webhook/http_paramgen.go b/pkg/plugin/processor/builtin/impl/webhook/http_paramgen.go index 951f835ec..a0c2894db 100644 --- a/pkg/plugin/processor/builtin/impl/webhook/http_paramgen.go +++ b/pkg/plugin/processor/builtin/impl/webhook/http_paramgen.go @@ -39,7 +39,7 @@ func (httpConfig) Parameters() map[string]config.Parameter { }, "request.body": { Default: ".", - Description: "Specifies which field from the input record should be used as the body in\nthe HTTP request. The value of this parameter should be a valid record\nfield reference (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + Description: "Specifies which field from the input record should be used as the body in\nthe HTTP request.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, @@ -65,13 +65,13 @@ func (httpConfig) Parameters() map[string]config.Parameter { }, "response.body": { Default: ".Payload.After", - Description: "Specifies in which field should the response body be saved.\nThe value of this parameter should be a valid record field reference\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + Description: "Specifies in which field should the response body be saved.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, "response.status": { Default: "", - Description: "Specifies in which field should the response status be saved.\nThe value of this parameter should be a valid record field reference\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).\nIf no value is set, then the response status will NOT be saved.", + Description: "Specifies in which field should the response status be saved. If no value\nis set, then the response status will NOT be saved.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", Type: config.ParameterTypeString, Validations: []config.Validation{}, }, diff --git a/pkg/plugin/processor/builtin/impl/webhook/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/webhook/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/webhook/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/webhook/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/webhook/examples_test.go b/pkg/plugin/processor/builtin/impl/webhook/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/webhook/examples_test.go rename to pkg/plugin/processor/builtin/impl/webhook/z_examples_test.go index a68cd1cf3..b55916996 100644 --- a/pkg/plugin/processor/builtin/impl/webhook/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/webhook/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package webhook diff --git a/pkg/plugin/processor/builtin/impl/examples_exporter_test.go b/pkg/plugin/processor/builtin/impl/z_examples_exporter_test.go similarity index 100% rename from pkg/plugin/processor/builtin/impl/examples_exporter_test.go rename to pkg/plugin/processor/builtin/impl/z_examples_exporter_test.go diff --git a/pkg/plugin/processor/builtin/impl/examples_test.go b/pkg/plugin/processor/builtin/impl/z_examples_test.go similarity index 82% rename from pkg/plugin/processor/builtin/impl/examples_test.go rename to pkg/plugin/processor/builtin/impl/z_examples_test.go index 1f6965d0b..6702f3b4c 100644 --- a/pkg/plugin/processor/builtin/impl/examples_test.go +++ b/pkg/plugin/processor/builtin/impl/z_examples_test.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// This file is here only to contain the go:generate statement. It's named with +// a "z_" prefix to ensure it's processed last by go generate. + //go:generate go test -count=1 -tags export_processors . package impl diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.decode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.decode.json index 0c0f832a1..3e4bafd6e 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.decode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.decode.json @@ -20,7 +20,7 @@ }, "field": { "default": ".Payload.After", - "description": "The field that will be encoded.", + "description": "The field that will be decoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] }, diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.encode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.encode.json index ca9248c48..f1cce4b83 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.encode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/avro.encode.json @@ -20,7 +20,7 @@ }, "field": { "default": ".Payload.After", - "description": "The field that will be encoded.", + "description": "The field that will be encoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] }, diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.decode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.decode.json index 772282b12..eeaee6e5b 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.decode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.decode.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to base64 decode the `.Position` field.", + "description": "Field is the reference to the target field. Note that it is not allowed to\nbase64 decode the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.encode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.encode.json index 624487d51..e08a4726b 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.encode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/base64.encode.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to base64 encode the `.Position` field.", + "description": "Field is a reference to the target field. Note that it is not allowed to\nbase64 encode the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.convert.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.convert.json index 6d5b49429..c7657a462 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.convert.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.convert.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only convert fields that are under `.Key` and `.Payload`, and said fields should contain structured data.", + "description": "Field is the target field that should be converted.\nNote that you can only convert fields in structured data under `.Key` and\n`.Payload`.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.exclude.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.exclude.json index 83412e361..1fdb6504c 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.exclude.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.exclude.json @@ -8,7 +8,7 @@ "parameters": { "fields": { "default": "", - "description": "Fields is a comma separated list of target fields, as they would be addressed in a Go template (e.g. `.Metadata,.Payload.After.foo`).", + "description": "Fields is a comma separated list of target fields which should be excluded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.rename.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.rename.json index 6f63cfa27..de70b1467 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.rename.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.rename.json @@ -8,7 +8,7 @@ "parameters": { "mapping": { "default": "", - "description": "Mapping is a comma separated list of keys and values for fields and their new names (keys and values\nare separated by colons \":\"). For example: `.Metadata.key:id,.Payload.After.foo:bar`.", + "description": "Mapping is a comma separated list of keys and values for fields and their\nnew names (keys and values are separated by colons \":\").\n\nFor example: `.Metadata.key:id,.Payload.After.foo:bar`.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.set.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.set.json index 5f12244df..53f3e0670 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.set.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/field.set.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nNote that it is not allowed to set the `.Position` field.", + "description": "Field is the target field that will be set. Note that it is not allowed\nto set the `.Position` field.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/filter.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/filter.json index e15b8f375..f3db98b12 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/filter.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/filter.json @@ -2,7 +2,7 @@ "specification": { "name": "filter", "summary": "Acknowledges all records that get passed to the filter.", - "description": "Acknowledges all records that get passed to the filter, so the records will be filtered out if \nthe condition provided to the processor is evaluated to \"true\".\n\n**Important:** Make sure to add a condition to this processor, otherwise all records will be filtered out.", + "description": "Acknowledges all records that get passed to the filter, so\nthe records will be filtered out if the condition provided to the processor is\nevaluated to `true`.\n\n**Important:** Make sure to add a [condition](https://conduit.io/docs/processors/conditions)\nto this processor, otherwise all records will be filtered out.", "version": "v0.1.0", "author": "Meroxa, Inc.", "parameters": {} diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.decode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.decode.json index 26d85a35c..995e2db44 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.decode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.decode.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only decode fields that are under `.Key` and `.Payload`.", + "description": "Field is a reference to the target field. Only fields that are under\n`.Key` and `.Payload` can be decoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.encode.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.encode.json index 50300908a..5ec4a94d9 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.encode.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/json.encode.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": "", - "description": "Field is the target field, as it would be addressed in a Go template (e.g. `.Payload.After.foo`).\nyou can only encode fields that are under `.Key`, `.Payload.Before` and `.Payload.After`.", + "description": "Field is a reference to the target field. Only fields that are under\n`.Key` and `.Payload` can be encoded.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.debezium.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.debezium.json index 5bfc00b7b..85da2cbd5 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.debezium.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.debezium.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": ".Payload.After", - "description": "Field is a reference to the field which contains the Debezium record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + "description": "Field is a reference to the field that contains the Debezium record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.kafkaconnect.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.kafkaconnect.json index 913c66716..5dbc09ef9 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.kafkaconnect.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.kafkaconnect.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": ".Payload.After", - "description": "Field is a reference to the field which contains the Kafka Connect record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + "description": "Field is a reference to the field that contains the Kafka Connect record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [ { diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.opencdc.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.opencdc.json index 8aa00de6e..d9c39d9f9 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.opencdc.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/unwrap.opencdc.json @@ -8,7 +8,7 @@ "parameters": { "field": { "default": ".Payload.After", - "description": "Field is a reference to the field which contains the OpenCDC record\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + "description": "Field is a reference to the field that contains the OpenCDC record.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] } diff --git a/pkg/plugin/processor/builtin/internal/exampleutil/specs/webhook.http.json b/pkg/plugin/processor/builtin/internal/exampleutil/specs/webhook.http.json index a84fe6421..16cec270c 100644 --- a/pkg/plugin/processor/builtin/internal/exampleutil/specs/webhook.http.json +++ b/pkg/plugin/processor/builtin/internal/exampleutil/specs/webhook.http.json @@ -42,7 +42,7 @@ }, "request.body": { "default": ".", - "description": "Specifies which field from the input record should be used as the body in\nthe HTTP request. The value of this parameter should be a valid record\nfield reference (see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + "description": "Specifies which field from the input record should be used as the body in\nthe HTTP request.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] }, @@ -71,13 +71,13 @@ }, "response.body": { "default": ".Payload.After", - "description": "Specifies in which field should the response body be saved.\nThe value of this parameter should be a valid record field reference\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).", + "description": "Specifies in which field should the response body be saved.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] }, "response.status": { "default": "", - "description": "Specifies in which field should the response status be saved.\nThe value of this parameter should be a valid record field reference\n(see [`sdk.NewReferenceResolver`](https://github.com/ConduitIO/conduit-processor-sdk/blob/02b60dc7acad11a2fcdf0a0188a13cf573648650/util.go#L53-L66)).\nIf no value is set, then the response status will NOT be saved.", + "description": "Specifies in which field should the response status be saved. If no value\nis set, then the response status will NOT be saved.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/processors/referencing-fields).", "type": "string", "validations": [] }