Add deprecated help into description fields#1279
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates all
x-deprecatedvendor extension fields in the OpenAPI spec to standarddescriptionfields with a "Deprecated. " prefix, improving consistency and ensuring deprecation guidance is preserved during documentation generation.Key Changes
mintlify-docs/openapi.json): Converted 40+ instances ofx-deprecatedfields todescriptionfields with "Deprecated. " prefix, maintaining the original guidance textmintlify-codegen/lib/transform-spec.ts): AddedfoldDeprecationText()function to automatically mergex-deprecatedguidance into field descriptions during spec transformation, then removes the vendor extensionmintlify-codegen/layouts/partials/object-property.hbs): Added deprecation message rendering to display "Deprecated. {message}" above field descriptionsmintlify-codegen/lib/layout/object-page.ts): AddeddeprecationMessageproperty toBlueprintPropertyandPropertyFieldContextinterfaces to support deprecation message extraction and rendering.mdxfiles (devices, thermostats, locks, ACS, access grants, etc.) to display deprecation notices with guidance textImplementation Details
The
foldDeprecationText()function:x-deprecatedtext from schema objects\n\nseparatorx-deprecatedfield after processingThis 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 standarddeprecated: trueflag that Mintlify renders natively.https://claude.ai/code/session_01HA6uVLZaJZvZDRgKPemPci