Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern displays with extra set of //s #983

Closed
drewish opened this issue Jul 23, 2019 · 0 comments
Closed

Pattern displays with extra set of //s #983

drewish opened this issue Jul 23, 2019 · 0 comments

Comments

@drewish
Copy link

drewish commented Jul 23, 2019

We've got some patterns used to indicate the restrictions on fields, e.g.

          pattern: "/^[a-z0-9_+-]+$/i"

They're rendering with an extra set of slashes around them:
Screenshot 2019-07-22 20 47 22

I wasn't sure if we should just rewrite the expression to avoid the need for the case insensitive flag or open a bug here. Looking at the Open API 3 docs they don't have much detail on the expected format. The only detail it had was:

Looking at that it seems like the /s are considered part of the regex and it'd actually be a bug not to have them... but I can see how including them makes it more apparent it's a regex. It seems to me that redoc should either not append the slashes, or only add slashes if they are not already part of the regex.

@drewish drewish changed the title Pattern displays with extar set of //s Pattern displays with extra set of //s Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant