Skip to content

Commit 57312fa

Browse files
committed
Update the input command option for validate
1 parent fa4403e commit 57312fa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Microsoft.OpenApi.Hidi/Program.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@ static async Task<int> Main(string[] args)
1414
{
1515
var rootCommand = new RootCommand() {
1616
};
17-
18-
var validateCommand = new Command("validate")
19-
{
20-
new Option("--input", "Input OpenAPI description file path or URL", typeof(string) )
21-
};
22-
validateCommand.Handler = CommandHandler.Create<string>(OpenApiService.ValidateOpenApiDocument);
23-
24-
// transform command options
17+
18+
// command option parameters and aliases
2519
var descriptionOption = new Option("--openapi", "Input OpenAPI description file path or URL", typeof(string));
2620
descriptionOption.AddAlias("-d");
2721

@@ -49,6 +43,12 @@ static async Task<int> Main(string[] args)
4943
var filterByCollectionOption = new Option("--filterByCollection", "Filters OpenApiDocument by Postman collection provided", typeof(string));
5044
filterByCollectionOption.AddAlias("-c");
5145

46+
var validateCommand = new Command("validate")
47+
{
48+
descriptionOption
49+
};
50+
validateCommand.Handler = CommandHandler.Create<string>(OpenApiService.ValidateOpenApiDocument);
51+
5252
var transformCommand = new Command("transform")
5353
{
5454
descriptionOption,

0 commit comments

Comments
 (0)