Axelerant Blog: How To Validate API Response Using OpenAPI 3.0 Specification

The Open API specification is a widely adopted industry standard used to describe RESTful APIs. Originally referred to as the Swagger Framework,  OpenAPI can be considered a RESTful API description language. It is used to provide a structured description of the API for humans as well as automated processing.  Using the OpenAPI specification helps developers save time by automatic generation of documentation and validation of the endpoints. OpenAPI supports both JSON and XML. 

Axlerant was entrusted with the task of developing a Drupal 8 based partial headless backend for a global NGO. The backend would be integrated with a React application, which would act as the Frontend of the system. 

This meant that Axelerant and the Frontend developers had to come to a mutually acceptable format for the REST-based API endpoints in the backend. After careful consideration, the OpenAPI 3.0 specification was selected as the format for describing the APIs.