Skip to content

Clarification on pattern regex #774

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

Closed
ricellis opened this issue Aug 8, 2019 · 1 comment · Fixed by #775
Closed

Clarification on pattern regex #774

ricellis opened this issue Aug 8, 2019 · 1 comment · Fixed by #775
Labels
clarification Items that need to be clarified in the specification core

Comments

@ricellis
Copy link

ricellis commented Aug 8, 2019

The specification for pattern says

This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect

It is unclear which part of the ECMA 262 regular expression dialect this is referring to. As a result OpenAPI has linked to Section 7.8.5 which is for the RegularExpressionLiteral.

However, as per @handrews in OAI/OpenAPI-Specification#1985 (comment) the pattern string should be a RegularExpressionBody not a RegularExpressionLiteral.

The correct reference is ECMA 262 Annex A.7, "Regular Expressions", although given that that section is informative rather than normative there might be some complications on exactly how to cite that. Referencing RegularExpressionBody for clarity would probably be a good idea.

@ricellis
Copy link
Author

Thanks @handrews

@gregsdennis gregsdennis added clarification Items that need to be clarified in the specification and removed Type: Maintenance labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Items that need to be clarified in the specification core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants