fix(spec): specify ECMA-262 dialect for regex Criterion condition type#516
Open
char0n wants to merge 1 commit into
Open
fix(spec): specify ECMA-262 dialect for regex Criterion condition type#516char0n wants to merge 1 commit into
char0n wants to merge 1 commit into
Conversation
The Criterion Object's regex condition type did not name a regular expression dialect, while the sibling jsonpath and xpath types both pin a standard. This left regex matching non-portable across Arazzo runners, since dialects differ in lookbehind, named groups, backreferences and Unicode property escapes. Pin ECMA-262, matching OpenAPI/JSON Schema Validation (the sibling specification under the OAI) and what common runners implement via native regex engines. Closes OAI#515
Member
|
Please note that as of this week, in the JSON Schema IETF working group we are considering settling on I-REGEXP as a more feasible common ground. ECMA262 support, while technically recommended (SHOULD) by JSON Schema, is not, in pracitce, widely correctly supported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #515
Summary
The Criterion Object's
regexcondition type did not name a regular-expression dialect, while the siblingjsonpath(RFC 9535) andxpath(XML Path Language 3.1) types both pin a standard. This left regex matching non-portable across Arazzo runners: dialects differ in lookbehind(?<=…), named groups, backreferences, and Unicode property escapes\p{…}, so a condition such as(?<=x)yor\p{L}+could pass on one runtime and fail (or error) on another.This PR pins ECMA-262 for the
regextype, matching OpenAPI / JSON Schema Validation (the sibling specification under the OAI, which pins ECMA-262 forpattern/patternProperties) and what the most common runners implement via native regex engines.Changes
Two clarifying edits to
src/arazzo.md, both linking to the ECMA-262 patterns grammar:regexentry now states the pattern MUST be a valid regular expression according to the ECMA-262 dialect.conditionMUST be a valid ECMA-262 regular expression.This is a clarification that does not change the intended meaning of the specification, so it targets
v1.1-devper the branching strategy (apply to the earliest relevant active branch).markdownlintpasses.