You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
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.
The text was updated successfully, but these errors were encountered:
drewish
changed the title
Pattern displays with extar set of //s
Pattern displays with extra set of //s
Jul 23, 2019
We've got some patterns used to indicate the restrictions on fields, e.g.
They're rendering with an extra set of slashes around them:
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.The text was updated successfully, but these errors were encountered: