What Is OpenAPI Specification? (And Why You Should Start Using It Now)

Esteban Thilliez
Tech Tavern
Published in
9 min readJul 27, 2023

--

I’ve already built several APIs, yet I’d never heard of OpenAPI. I discovered it recently, and it’s a life-changer when it comes to building APIs.

If you don’t know what it is, this article is your chance to find out, and you’ll understand that there are only benefits to using the OpenAPI specification.

What is OpenAPI?

OpenAPI, is a specification for building and documenting web APIs. It provides a standardized way to describe the structure, operations, and interactions of an API, allowing developers to understand and work with the API without needing to inspect its underlying implementation details.

OpenAPI uses a machine-readable YAML or JSON format to define the API’s endpoints, request and response payloads, supported HTTP methods (such as GET, POST, PUT, DELETE), authentication requirements, and other relevant information. This specification acts as a contract between the API provider and consumers, ensuring consistency, clarity, and interoperability.

With an OpenAPI definition, you can automatically generate client SDKs, server stubs (more about this in another article), interactive API documentation, and perform validation and testing of API requests and responses. It fosters collaboration between frontend…

--

--

Esteban Thilliez
Tech Tavern

I’m Esteban, and I enjoy writing about programming, trading, productivity, knowledge management, books, etc! esteban-thilliez.com / contact@esteban-thilliez.com