PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

[FR] Do not show `(from schema)` if example provided explicitly

Open
#438 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement roadmap
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?

It's a minor thing, but if I provide an example key to the response schema, I see that it's used in the default Example (from schema) tab, which is awesome. But it would be even more awesome of the "from schema" wasn't included, since it's not generated data but explicit values that I've filled out.

Describe the solution you'd like

Detect the presence of a responses.X.content.X.schema.example, and if found, just call the example Example instead of Example (from schema)

Additional context

Here's what I'm seeing currently:

image

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 UI code that renders the default example tab for an OpenAPI response schema, then trace how responses.X.content.X.schema.example is detected. Verify that an explicitly supplied example is labeled “Example” while generated schema examples retain “Example (from schema)”.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, react, typescript
Domain
documentation, frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.