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

feat: add enablePatterns config option #163

Merged
merged 1 commit into from
May 2, 2024

Conversation

Oprysk
Copy link
Member

@Oprysk Oprysk commented May 2, 2024

What/Why/How?

feat: add enablePatterns config option

Recently, we have added pattern generation for string values but it does not cover all regex causes. So we decided to add a new config option in order to handle it properly. By default, pattern generation is disabled.

closes: https://github.com/Redocly/redocly/issues/8271

Reference

#153

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@Oprysk Oprysk self-assigned this May 2, 2024
@Oprysk Oprysk requested a review from a team as a code owner May 2, 2024 13:23
@Oprysk Oprysk requested a review from RomanHotsiy May 2, 2024 13:23
@Oprysk Oprysk merged commit e587ae0 into master May 2, 2024
2 checks passed
@RomanHotsiy
Copy link
Member

cc @llllvvuu we had to disable this by default as it's causing problems for our users.
The regex sampler is very basic and doesn't even cover character groups like \s or \w or ^, $.

@RomanHotsiy RomanHotsiy deleted the feat/add-enable-patterns-option branch May 2, 2024 13:27
@Oprysk Oprysk mentioned this pull request May 2, 2024
5 tasks
@llllvvuu
Copy link
Contributor

llllvvuu commented May 2, 2024

Fair enough. The original implementation (vendored randexp.js) was a lot more comprehensive

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

Successfully merging this pull request may close these issues.

3 participants