Files
docs/examples
8f97e7a238 OpenAPI: render deprecated badge for deprecated operations (#3281)
* OpenAPI: render deprecated badge for deprecated operations

Show a yellow "Deprecated" badge for any OpenAPI operation marked
`deprecated: true`. The badge appears in two places: inline with the
operation heading when `showTitle` is true, and as a standalone header
above the playground card when `showTitle` is false (which is the
default for individual operation pages generated by `openapiSource`).

This restores the behaviour originally added in #2417, which was lost
during the v9→v10 move of the operation renderer from
`packages/openapi/src/render/operation/index.tsx` to
`packages/openapi/src/ui/operation/index.tsx`. The parameter-level,
schema-property-level and auth-scheme-level deprecated badges all
survived the refactor; the operation-level one was silently dropped.

The example spec's `deletePlanet` operation already claimed in its
description to be deprecated but never set the flag (inherited from the
upstream Scalar Galaxy fixture). Setting it both fixes the
inconsistency and provides a visible demo for the new badge.

* OpenAPI: improve operation deprecation styles

---------

Co-authored-by: Fuma Nama <[email protected]>
2026-05-14 17:18:41 +08:00
..
2026-05-09 21:30:38 +08:00
2026-05-12 18:51:40 +08:00
2026-05-09 21:30:38 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-09 21:30:38 +08:00
2026-05-12 18:51:40 +08:00
2026-05-09 21:30:38 +08:00
2026-05-09 21:30:38 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2026-05-12 18:51:40 +08:00
2024-09-17 23:26:02 +08:00

Examples

The apps here are used to generate code examples for our docs.

Please be careful.