RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.77k stars 1.29k forks source link

nswag.json schema / documentation #2299

Open Peter554 opened 5 years ago

Peter554 commented 5 years ago

I am using the NSwag.MSBuild NuGet package to generate a typescript (angular) client for my dotnet core project. I see that all of the configuration for nswag is done in the nswag.json file. However, I am finding it hard to find good documentation for the various options available and wondered where best to look? If documentation does no yet exist are then plans to add this in the near future? I'm finding the package to be very useful in general however when something unexpected occurs it can be hard to correct as the nswag.json file is a bit of a black box to me right now.

mykter commented 5 years ago

A schema would be great to aid editing of the file.

RicoSuter commented 5 years ago

With NJsonSchema it should be quite easy to do. Just go through all command classes and create a schema for them and then merge it together into one master schema.

snebjorn commented 5 years ago

I'm in favor of this. I'm currently trying to figure out how to write the nswag.json file so it generates an Angular client and I cannot figure it out, nor can I find any examples or documentation on this.