Skip to content

Why OpenAPI Spec

Course: OpenAPI Spec - chapter 1

When you create backend, it’s very hard for other people to know the exact shape of your routes

Wouldn’t it be nice if you could describe, in a single file the shape of your routes?

For example - https://sum-server.100xdevs.com/todo?id=1

If you have this single long file that lists all your routes, you could

  1. Auto generate documentation pages (Ref https://binance-docs.github.io/apidocs/spot/en/#query-current-order-count-usage-trade)
  2. Auto generate clients in various languages (Java, JS, Go…)
  3. Let the world look at your API routes shape without actually opening your code
  4. Let AIs know how to hit your APIs in a single file, without sharing your code with the AI