RicoSuter / NSwag

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

nswagstudio .nswag file format and git version control #1645

Open rontran opened 6 years ago

rontran commented 6 years ago

I committed the nswag file inside my project solution since it contains the json data and all the settings. However, the json data is saved as a string on 1 line. It is almost impossible for me to look at the file history in git history to see what new endpoints have been added/deleted and who to blame.

Is there a way to prevent it from saving it as a string?

RicoSuter commented 6 years ago

Create a swagger.json file alongside the nswag.json and instead of inlining the JSON, use SwaggerUrl with a relative path (./swagger.json)