Fork me on GitHub

Clinical Trials

Use The ClinicalTrials.gov OpenAPI Spec To Drive The Interactive API Documentation

The reasons for having an OpenAPI Spec for the ClinicalTrials.gov data are many, but one of the most obvious benefits is the ability to generate interactive API documentation for the platform. I am using Swagger UI, as the interactive API documentation across my Adopta.Agency projects.

This approach to delivering documentation is a far more hands-on approach than earlier, more static API documentation. This documentation will evolve along with the project, when I require API keys to work with the API, saving valuable compute, storage, and bandwidth resources. All I have to do is keep the OpenAPI Spec up to date, and the SwaggerUI does the rest.

It is important to have up to date API documentation, helping explain what the API does, but it is even more important to have the machine readable OpenAPI spec, because it drives so many aspects of the API operations, something which acts as the contract for what is expected of the clinical trials API.