Executing following command on a .NET Core 8 project:
nswag aspnetcore2openapi /documentName:v1 /output:swagger.json
This throws me:
NSwag bin directory: C:\Users\s.dotnet\tools.store\nswag.consolecore\14.0.3\nswag.consolecore\14.0.3\tools\net8.0\any
System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at NSwag.Commands.Generation.AspNetCore.ProjectMetadata.GetProjectMetadata(String file, String buildExtensionsDir, String framework, String configuration, String runtime, Boolean noBuild, String outputPath, IConsoleHost console) in //src/NSwag.Commands/Commands/Generation/AspNetCore/ProjectMetadata.cs:line 113
at NSwag.Commands.Generation.AspNetCore.AspNetCoreToOpenApiCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in //src/NSwag.Commands/Commands/Generation/AspNetCore/AspNetCoreToOpenApiCommand.cs:line 70
at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input)
at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input)
at NSwag.Commands.NSwagCommandProcessor.ProcessAsync(String[] args) in /_/src/NSwag.Commands/NSwagCommandProcessor.cs:line 62
My goal: I am able to serve multiple swagger.jsons based on API versions, however, I'm unable to generate these from the CLI.
I want these to generate from CLI commands so I can put it in our CI pipeline, and then push to Azure APIM.
Executing following command on a .NET Core 8 project: nswag aspnetcore2openapi /documentName:v1 /output:swagger.json
This throws me: NSwag bin directory: C:\Users\s.dotnet\tools.store\nswag.consolecore\14.0.3\nswag.consolecore\14.0.3\tools\net8.0\any System.ArgumentException: The path is empty. (Parameter 'path') at System.IO.Path.GetFullPath(String path) at NSwag.Commands.Generation.AspNetCore.ProjectMetadata.GetProjectMetadata(String file, String buildExtensionsDir, String framework, String configuration, String runtime, Boolean noBuild, String outputPath, IConsoleHost console) in //src/NSwag.Commands/Commands/Generation/AspNetCore/ProjectMetadata.cs:line 113 at NSwag.Commands.Generation.AspNetCore.AspNetCoreToOpenApiCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in //src/NSwag.Commands/Commands/Generation/AspNetCore/AspNetCoreToOpenApiCommand.cs:line 70 at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input) at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input) at NSwag.Commands.NSwagCommandProcessor.ProcessAsync(String[] args) in /_/src/NSwag.Commands/NSwagCommandProcessor.cs:line 62
My goal: I am able to serve multiple swagger.jsons based on API versions, however, I'm unable to generate these from the CLI. I want these to generate from CLI commands so I can put it in our CI pipeline, and then push to Azure APIM.