Author

Powerduck

4 min read

Prevent lost updates with ETag and If-Match: optimistic concurrency in OpenAPI

Two clients PUT the same resource and the last write silently wins. The HTTP fix is conditional requests with ETag, If-Match, and a 412 that tells the client to re-fetch and retry. Here is the exact state table and the OpenAPI that makes codegen and AI agents handle conflicts correctly.

Read article
4 min read

Reusable JSON Schema components in OpenAPI: DRY models without $ref spaghetti

Inline every schema and your request and response models drift apart. Extract everything and the document becomes a maze of one-off references. The middle path is a small set of rules for what becomes a component, what stays inline, and how to name and compose it.

Read article
4 min read

Generate OpenAPI from FastAPI and Django REST without decorating every view

FastAPI puts contracts in annotations; Django REST puts them in serializers and viewsets. A static scanner can recover both without a running server, but the dynamic parts of DRF, external models, source mappings, and runtime choices, must be reported as gaps rather than turned into invented enums.

Read article