Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI JSON schema should indicate which fields are required #724

Open
david-crespo opened this issue Jul 3, 2024 · 0 comments
Open

CLI JSON schema should indicate which fields are required #724

david-crespo opened this issue Jul 3, 2024 · 0 comments

Comments

@david-crespo
Copy link
Contributor

Without this info, the docs can't indicate which fields are required! Thanks @wfchandler for noticing.

/// Arg to CLI command for the JSON doc
#[derive(Serialize, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct JsonArg {
#[serde(skip_serializing_if = "Option::is_none")]
long: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
short: Option<String>,
#[serde(skip_serializing_if = "Vec::is_empty")]
values: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
help: Option<String>,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant