Make discriminator values easy to copy, e.g. by automatically adding a single-value enum to discriminators
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
When selecting discriminator values in the dropdown, there is no easy way to copy the value.

It would be nice if it was possible to easily copy the value.
Since the discriminator is in effect an enum, ReDoc could render an enum value equal to the currently selected option. For reference, this is the kind of enum rendering I am talking about:

Other solutions may also exist.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by locating the discriminator dropdown and its selected-value rendering in ReDoc. Compare the requested single-value enum presentation with the attached examples, and consider the work done when the selected discriminator value can be copied easily.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100