PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

Is is possible to customize admonition section for deprecated api?

Open
#1,082 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.1k
Forks
315
Avg merge
7d 5h
Merged PRs (30d)
7

Description

Is your feature request related to a problem?

I'm creating api doc pages for non native english speakers.
In the case of an api marked with deprecated, I have confirmed that the mdx file is created with the warning admonition automatically.
Can I request this by applying new custom markdownGenerators options?

Describe the solution you'd like
export function createDeprecationNotice({
  deprecated,
  description,
}: DeprecationNoticeProps) {
  return guard(deprecated, () =>
    createAdmonition({
      children:
        description && description.length > 0
          ? clean(description)
          : "This endpoint has been deprecated and may be replaced or removed in future versions of the API.",
    })
  );
}

I wish there was a good way to customize the automatically generated deprecation message (Please check below example)

Image
Describe alternatives you've considered

Is there any way to customize createDeprecationNotice function by applying markdownGenerators option?

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the createDeprecationNotice function and the markdownGenerators option in the repository, then inspect how generated MDX admonitions are assembled. Done means users can customize the automatically generated deprecation message through a documented configuration option.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.