Polski

Backend & API

Swagger / OpenAPI

Your API described as a contract: docs, in-browser testing and client generation.

Article

Swagger and OpenAPI in practice – docs from code in NestJS and Express, a typed client and contract hygiene

We document the pierogi shop API with OpenAPI – in NestJS with @nestjs/swagger (CLI plugin, response DTOs, an API key in Swagger UI, URI versioning, export without a database), in Express from Zod schemas with zod-to-openapi and swagger-ui-express. From the same spec we generate a typed client and guard it in CI.

Around the topic

In this group: Backend & API