Redocly / Redocly/redoc

Hiding regex expressions used for validation in Swagger and Redoc

Open
#668 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted Type: Enhancement
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

When we use a regex as a validator in swagger the regex shows up in our redoc documentation. We don't believe that our users will understand these random regular expressions in the documentation. Is there a way to hide the regular expression from the documentation. Or possibly define the validator as an object. I'm doubting that redoc would print an entire object to the documentation (if an object was used). A small example would be great... TY

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 reproducing the regex-validator example in Swagger/OpenAPI and inspect how Redoc renders that schema constraint. Determine whether the documentation can omit the regular expression or support an object-based alternative, then provide a small documented example showing the supported behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.