Ale, music and enjoying life.
Had a scenario where I need to hide some of the API’s controller endpoints from Swagger along with their respective schemas that aren’t yet ready for public consumption. I still wanted them to be available for Postman/Newman tests as part of the CI/CD. Manged to achieve this using the following Swashbuckle filter and MVC convention:-
Following on from my afternoon with Moq I stumbled upon another fun issue. How the hell could I test my API’s PATCH methods? They all make use of OData’s Delta objects.
Using Moq I was creating a few unit tests and stumbled across an interesting problem. I needed to mock a call to an async method on a service under test that took in a 2 parameters and returned a tuple of 2 values.
Encountered the System.MissingMethodException: Method not found with very little else to go on. I noticed as part of the stack trace a reference to an async call on Entity Framework Core Add method.
As part of getting the API “match fit” prior to deployment I explored the various options for logging, auditing and telemetry to provide feedback in relation to production diagnosis and application usage (API focus here). This is part 1 which covers the enrichment of the deployment pipelines using the Azure Application Insights.