Skip to content

OpenAPI

Michael Pisman edited this page Oct 19, 2023 · 1 revision

OpenAPI

As our API is built using FastAPI, we can use OpenAPI to document our API. OpenAPI is a specification for describing RESTful APIs. It allows us to describe the API in a human-readable format and generate documentation and client libraries automatically.

Another great advantage of using OpenAPI is abundance of tools that support it. For example, we can use Swagger UI to generate a beautiful documentation for our API. We can also use Postman to generate client libraries for our API.

One particular advantage that is not necessarily obvious is that you can generate clients (sometimes called SDKs ) for your API, for many different programming languages.

There are many tools to generate clients from OpenAPI.

A common tool is OpenAPI Generator

If you are building a frontend, a very interesting alternative is openapi-typescript-codegen

Clone this wiki locally