Skip to content

Add deprecated help into description fields#1279

Merged
razor-x merged 4 commits into
mainfrom
claude/deprecation-guidance-text-kezldm
Jul 14, 2026
Merged

Add deprecated help into description fields#1279
razor-x merged 4 commits into
mainfrom
claude/deprecation-guidance-text-kezldm

Conversation

@razor-x

@razor-x razor-x commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Migrates all x-deprecated vendor extension fields in the OpenAPI spec to standard description fields with a "Deprecated. " prefix, improving consistency and ensuring deprecation guidance is preserved during documentation generation.

Key Changes

  • OpenAPI spec (mintlify-docs/openapi.json): Converted 40+ instances of x-deprecated fields to description fields with "Deprecated. " prefix, maintaining the original guidance text
  • Code generation (mintlify-codegen/lib/transform-spec.ts): Added foldDeprecationText() function to automatically merge x-deprecated guidance into field descriptions during spec transformation, then removes the vendor extension
  • Handlebars template (mintlify-codegen/layouts/partials/object-property.hbs): Added deprecation message rendering to display "Deprecated. {message}" above field descriptions
  • Layout context (mintlify-codegen/lib/layout/object-page.ts): Added deprecationMessage property to BlueprintProperty and PropertyFieldContext interfaces to support deprecation message extraction and rendering
  • Generated documentation: Updated all affected .mdx files (devices, thermostats, locks, ACS, access grants, etc.) to display deprecation notices with guidance text

Implementation Details

The foldDeprecationText() function:

  • Extracts x-deprecated text from schema objects
  • Prepends "Deprecated. " to create a deprecation notice
  • Merges with existing descriptions using \n\n separator
  • Removes the x-deprecated field after processing

This ensures that deprecation guidance (e.g., "Use space_ids") is not lost during code generation and is properly displayed in the generated documentation alongside the standard deprecated: true flag that Mintlify renders natively.

https://claude.ai/code/session_01HA6uVLZaJZvZDRgKPemPci

claude and others added 3 commits July 14, 2026 18:31
Property- and operation-level x-deprecated guidance (e.g. "Use
`space_ids`.") was being bare-deleted from the transformed OpenAPI
spec, so endpoint pages lost the migration guidance. Fold it into the
description as a "Deprecated. ..." prefix during the recursive
description pass (keeping the standard deprecated: true flag), instead
of deleting the op-level marker in the vendor-extension cleanup.

On object pages, pass the blueprint deprecationMessage through
alongside the deprecated boolean and render it above the property
description in object-property.hbs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA6uVLZaJZvZDRgKPemPci
Fold now also sets the standard `deprecated: true` flag on operations
carrying x-deprecated guidance, so Mintlify applies its native
deprecation styling (page badge + strikethrough in the navigation),
not just the notice text. Of the deprecated operations, only
/locks/get is documented; the others are x-undocumented and stripped
from the published spec.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA6uVLZaJZvZDRgKPemPci
@razor-x razor-x marked this pull request as ready for review July 14, 2026 21:46
@razor-x razor-x requested a review from a team as a code owner July 14, 2026 21:46
@razor-x razor-x changed the title refactor: consolidate x-deprecated into description fields Add deprecated help into description fields Jul 14, 2026
@razor-x razor-x merged commit 7da1399 into main Jul 14, 2026
9 checks passed
@razor-x razor-x deleted the claude/deprecation-guidance-text-kezldm branch July 14, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants