osu-tournament-rating / otr-api

API powering osu! Tournament Rating
https://otr.stagec.xyz/
GNU General Public License v3.0
8 stars 5 forks source link

Investigate the feasibility of unit testing swagger spec generation #527

Open myssto opened 2 weeks ago

myssto commented 2 weeks ago

As we have started to heavily rely on swagger / swashbuckle for cross-project compatibility in our ecosystem, it is becoming more and more tedious to manually inspect the json content of the swagger spec every time changes are made to the document generator. It would be very useful to have a unit testing framework in place that can validate the content programmatically.

Hopefully through this we can achieve a setup that can completely mock the swagger generation for the API so that we can confidently unit test changes to the generator (for example the custom document filters in API.SwaggerGen). This will greatly improve testing coverage, code quality, efficiency, and most importantly my sanity!