4 Commits
Author SHA1 Message Date
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
Fuma Nama 62cf09fae8 Chore: Migrate to Vite 8 2026-03-13 18:11:02 +08:00
Fuma Nama 7991d042a4 Chore: migrate to oxfmt 2025-12-30 16:49:34 +08:00
Fuma Nama ff0c2cb5fe OpenAPI: Use more complicated OpenAPI schema for example 2025-10-18 18:04:50 +08:00