Skip to content

Commit

Permalink
Fix non-generalised docs defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Mar 1, 2024
1 parent 8700f6f commit d2414f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/httpserver/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (conf CORSConfig) WrapHandler(handler http.Handler) (http.Handler, error) {
func ServerCORSFieldSpec() docs.FieldSpec {
return docs.FieldObject(fieldCORS, "Adds Cross-Origin Resource Sharing headers.").WithChildren(
docs.FieldBool(fieldCORSEnabled, "Whether to allow CORS requests.").HasDefault(false),
docs.FieldString(fieldCORSAllowedOrigins, "An explicit list of origins that are allowed for CORS requests.").Array().HasDefault([]string{}),
docs.FieldString(fieldCORSAllowedOrigins, "An explicit list of origins that are allowed for CORS requests.").Array().HasDefault([]any{}),
).AtVersion("3.63.0").Advanced()
}

Expand Down
2 changes: 1 addition & 1 deletion internal/template/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func ConfigSpec() docs.FieldSpecs {
).HasDefault("stable"),
docs.FieldString(
"categories", "An optional list of tags, which are used for arbitrarily grouping components in documentation.",
).Array().HasDefault([]string{}),
).Array().HasDefault([]any{}),
docs.FieldString("summary", "A short summary of the component.").HasDefault(""),
docs.FieldString("description", "A longer form description of the component and how to use it.").HasDefault(""),
docs.FieldObject("fields", "The configuration fields of the template, fields specified here will be parsed from a Benthos config and will be accessible from the template mapping.").Array().WithChildren(FieldConfigSpec()...),
Expand Down
2 changes: 1 addition & 1 deletion internal/tls/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ func FieldSpec() docs.FieldSpec {
docs.FieldString("cert_file", "The path of a certificate to use.").HasDefault(""),
docs.FieldString("key_file", "The path of a certificate key to use.").HasDefault(""),
docs.FieldString("password", "A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete `pbeWithMD5AndDES-CBC` algorithm is not supported for the PKCS#8 format. Warning: Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.", "foo", "${KEY_PASSWORD}").HasDefault("").Secret(),
).HasDefault([]string{}),
).HasDefault([]any{}),
).Advanced()
}

0 comments on commit d2414f8

Please sign in to comment.