Skip to content

[feature request]: optional description for application variables #3218

@radu-matei

Description

@radu-matei

The variable schema in spin.toml should have an optional description field. This field would be used by tools that render the application manifest and help operators and developers understand the application post-deployment.

/// The name of the application variable.
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct Variable {
/// Whether a value must be supplied at runtime. If not specified, required defaults
/// to `false`, and `default` must be provided.
///
/// Example: `required = true`
///
/// Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
#[serde(default, skip_serializing_if = "is_false")]
pub required: bool,
/// The value of the variable if no value is supplied at runtime. If specified,
/// the value must be a string. If not specified, `required`` must be `true`.
///
/// Example: `default = "default value"`
///
/// Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
#[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<String>,
/// If set, this variable should be treated as sensitive.
///
/// Example: `secret = true`
///
/// Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
#[serde(default, skip_serializing_if = "is_false")]
pub secret: bool,
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions