This is a simple writeup of how snapshot testing is done on the OpenAPI spec for Velopack API. Though the implementation can be easily applied to other services.
The API project should include an OpenAPI endpoint. The most popular libraries for this are Swashbuckle, NSwag, and soon built-in support.
The API project should be configured to serve up the Open API specification. For Velopack, we are using NSwag. The setup in the API resembles the following: