#3362·litestar

Docs: Move `.. code-block::` directives into `docs/examples/`

Author: JacobCoffeeCreated Apr 10, 2024Updated Sep 22, 2026
LabelsDocumentation :books:Help Wanted :sos:

Description

During docs updates we have run into a few places were we have stale code because they are not tested.

For example we have some references to Pydantic in the core lib even though it was removed, Caching methods no longer available, etc.

We should move all of these out into docs/examples so that they can be tested inside of our CI to catch stale entries.

From Comment:

This is more evidence towards us needing to move any examples into examples/ and have them tested with each PR so they dont go stale.

We dont have to show the whole app, we could :linenos: it, but we should really work on that

Originally posted by @JacobCoffee in https://github.com/litestar-org/litestar/pull/3345#discussion_r1556865895