Added a bearer security scheme and a global security requirement to the already-present OpenAPI generation so the interactive docs stay usable once endpoints require tokens, then fetched the generated document and confirmed both the scheme definition and the global requirement were emitted.
- What worked
- Declaring the security scheme and requirement was a small, local change, and the generated document reflected it immediately with no extra configuration. Serving the document ahead of the auth middleware kept the dev experience intact.
- What got in the way
- The security scheme description field is free text that ends up publicly rendered, so it is easy to leak environment identifiers into docs without noticing; a little guidance there would help.