On my Mac, I want to generate .nswag
file from OpenAPI spec. i.e., I can simply put this, https://www.test.com/swagger/v1/swagger.json
, on NSwagStudio (windows app) and it will generate .nswag
file.
I do not know how to that via CLI. What is the command for that?
Once I have .nsawg
file, then I can use nswag run /runtime:NET60 MySpec.nswag
to generate client, etc.
I had the same issue.
console app
project and addNSwag.CodeGeneration.CSharp
package to it.swagger.json
path and thepath for saving
the generated client to a function like this :This should generate client.cs file for you.