Hiding Controller And Schemas from Swagger/OpenAPI documentation

Swagger

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:- read more

Postman Testing – Chaining Requests From one Request to Another

postman logo

The Issue

I’d like to run a full suite of Postman tests are part of a CD pipeline into pre-production to indicate any issues and stopping the deployment of the API further. I’d built up 200+ Postman tests to cover standard CRUD operations on a number of resources. The tests were checking the POST responses for certain eleements returned in the body, 200 responses etc. Similar for PUTS, PATCHES and GETS. However, it would be nice to create a resource then reference this resource across all API operations for that resource. read more

Azure API Management Template Parameters Used In The UriTemplate Must Be Defined In The Operation, And Vice-Versa

On updating Azure API Management with a new OpenAPI definition file I received the following error: “Azure API Management Template Parameters Used In The UriTemplate Must Be Defined In The Operation, And Vice-Versa”. A fair bit of head-scratching ensued, due to the error message not giving too much away, (which Operation? I’ve 100s of them!) and also being a bit flippant (“vice-versa” <– sass!). Also, I always check that my OpenAPI document conforms and plays nicely with the online Swagger editor. So what gives? read more

OData – Create Entity with Child Entities Response with Expand.

The Issue

When creating an entity (with child entities) using POST with OData the response will only show the main Entity created. Child entities are ignored. read more

Azure API Management – Caching

Overview

Carried out a discovery phase recently to look at Azure API Management and the key features gained by layering Azure’s API Manager (APIM) as a proxy/facade layer between your backend APIs. One of the elements of APIM that rather appealed to me was the “out of the box” caching. read more