Skip to content

Custom Documentation

Thomas Pollet edited this page Mar 8, 2026 · 14 revisions

OpenAPI / Swagger Customization

Flask docs generation basics

Classic SAFRS generates Swagger/OpenAPI documentation as part of the Flask integration.

Useful customization areas include:

  • model docstrings
  • RPC docstrings
  • custom_swagger
  • custom prefixes and spec URLs

Examples

FastAPI note

FastAPI uses its own OpenAPI machinery. The SAFRS FastAPI adapter integrates with that system instead of using the Flask swagger generator directly.

That means:

  • FastAPI docs live under /docs
  • schema generation is OpenAPI-first
  • Flask-only swagger customizations do not map one-to-one

Clone this wiki locally