Closed
Description
HI,
I'm implementing a CLI using spring-shell 3.1.0 and spring boot 3.1.0.
During testing I have seen that parsing the message from vscode produces this result:
@Command(group = "SAMPLE", command = "sample")
public class SampleCmd {
@Command(description = "TEST COMMAND", command = "create")
public void create(
@Option(description = "Name of the cluster", required = true) String name,
@Option(description = "Setup topology of API Management (Accepted values: CLOUD, LOCAL)", required = true) @Pattern(message = "Accepted values: CLOUD, LOCAL", regexp = "CLOUD|LOCAL") String envType,
@Option(description = "API host", defaultValue = "my.host.com") String apiHost,
@Option(description = "API port", defaultValue = "443") int apiPort,
@Option(description = "API Base Path", defaultValue = "/v3") String apiBasePath,
@Option(description = "Enable HTTPS", defaultValue = "true") boolean useSsl) {
System.out.println("OK");
}
TEST 3: KO Because when parsing the parameters a "," is added to the value and the validator throws an exception
TEST 4: KO Because when parsing the parameters a "," is added to the value and the validator throws an exception
TEST 5: KO Because when parsing the parameters a ","
TEST 6: KO Because when parsing the parameters a ","
I have enabled all logging to capture events and message parsing: application.log.zip