FluentArgs icon indicating copy to clipboard operation
FluentArgs copied to clipboard

Document "Given.Flag"

Open kutoga opened this issue 5 years ago • 0 comments

If a "given flag" check is done inside a definition it is not possible to document this piece of code and therefore there is no help available. Example:

            FluentArgsBuilder.New()
                .DefaultConfigsWithAppDescription("This tool can be used to query minimum daily prices from skyscanner.")
                .Given.Flag("-a", "--airports").Then(ListAirports)
                .Parameter<Airport>("-o", "--origin")
                    .WithDescription("origin airport.")
                    .WithExamples(Airport.ZRH, Airport.HKG)
                    .IsRequired()
                .Parameter<Airport>("-d", "--destination")
                    .WithDescription("Destination airport.")
                    .WithExamples(Airport.ZRH, Airport.HKG)
                    .IsRequired()
                .Parameter<DateTimeOffset>("-t", "--date")
                    .WithDescription("Flight date.")
                    .IsRequired()

The "help"-page should contain the -a flag.

kutoga avatar Nov 05 '19 16:11 kutoga