Skip to content

Fix @pattern regexes with spaces - #1867

Open
soumajitgh wants to merge 1 commit into
lukeautry:masterfrom
soumajitgh:fix/pattern-regex-literal-spaces
Open

Fix @pattern regexes with spaces#1867
soumajitgh wants to merge 1 commit into
lukeautry:masterfrom
soumajitgh:fix/pattern-regex-literal-spaces

Conversation

@soumajitgh

Copy link
Copy Markdown

Summary

  • Parse slash-delimited @pattern regex literals as a complete value.
  • Preserve literal spaces in property and parameter patterns.
  • Add regression coverage for both annotation locations.

Root cause

Pattern parsing split the annotation at its first space, truncating regex character classes containing literal spaces.

Testing

  • yarn workspace tsoa-tests exec mocha unit/utilities/validatorUtils.spec.ts
  • yarn run lint

Fixes #1857

@soumajitgh
soumajitgh marked this pull request as ready for review July 10, 2026 17:18
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.

@pattern regex does not work with literal spaces in it

1 participant