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

some pattern regex fails to render #1372

Closed
delanym opened this issue Sep 2, 2020 · 2 comments · Fixed by #1375
Closed

some pattern regex fails to render #1372

delanym opened this issue Sep 2, 2020 · 2 comments · Fixed by #1375

Comments

@delanym
Copy link

delanym commented Sep 2, 2020

Not quite the same as #245
I'm trying to set a pattern for my uuid datatype, but sometimes they don't render

fail: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
fail: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}$"
pass: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}$"
fail: "^[0-9a-f]{8}-[0-9a-f][0-9a-f][0-9a-f][0-9a-f]$"
pass: "^[0-9a-f]{8}-[0-9a-f][0-9a-f][0-9a-f]$"
@RomanHotsiy
Copy link
Member

RomanHotsiy commented Sep 3, 2020

Oh, yes. We recently made a change to hide all patterns longer than 45 characters. We found it overly complicated and not very useful to the end-users.

Probably we should have added it as a configuration option.

PR would be welcome!

@delanym
Copy link
Author

delanym commented Sep 3, 2020

These docs are a great way of visually checking the completeness of a spec. So i would at least expect some indication that a pattern property exists. As well as setting the threshold length of the pattern, perhaps have the option to generated a truncated pattern with a UTF8 ellipsis
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a …

or better still, have a drop-down like you have for nested elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants