-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
Expose registered command metadata #1571
Comments
Try running your app with the options |
@phil-scott-78 I think I get what you have in mind but my request is to get Hope it makes sense edit: is it intended it misses |
Created #1572 to fix the missing info, then following model: [XmlRoot(ElementName = "Model")]
public class XmlDocModel
{
[XmlElement(ElementName = "Command")] public List<XmlCommand>? Command { get; set; }
}
public class XmlOption
{
[XmlAttribute("ClrType")] public string? ClrType { get; set; }
[XmlElement("DefaultValue")] public string? DefaultValue { get; set; }
[XmlElement("Description")] public string? Description { get; set; }
[XmlAttribute("Kind")] public string? Kind { get; set; }
[XmlAttribute("Long")] public string? Long { get; set; }
[XmlAttribute("Required")] public bool Required { get; set; }
[XmlAttribute("Short")] public string? Short { get; set; }
[XmlAttribute("Value")] public string? Value { get; set; }
}
public class XmlCommand
{
[XmlElement("ClrType")] public string? ClrType { get; set; }
[XmlElement("Description")] public string? Description { get; set; }
[XmlElement("IsBranch")] public bool? IsBranch { get; set; }
[XmlAttribute("Name")] public string? Name { get; set; }
[XmlArray("Parameters")][XmlArrayItem("Option")] public List<XmlOption>? Parameters { get; set; }
[XmlElement("Settings")] public string? Settings { get; set; }
} should be sufficient to use |
Is your feature request related to a problem? Please describe.
I'm generating documentation from the
CommandApp
but it requires reflection which shouldn't be IMHO.Side note: it can apply to completion implementation/generation (bash script) too.
Describe the solution you'd like
CommandApp
should exposeConfiguredCommand
somehow.Describe alternatives you've considered
Reflection (the dynamic usage is really bothering for ex):
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: