Skip to content

Commit c35c34a

Browse files
authored
fix(ns-openapi-3-0): fix polynomial regular expression (#3784)
1 parent c771a46 commit c35c34a

File tree

1 file changed

+1
-1
lines changed
  • packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback

1 file changed

+1
-1
lines changed

packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CallbackVisitor extends Mixin(PatternedFieldsVisitor, FallbackVisitor) {
2828
this.element = new CallbackElement();
2929
this.specPath = always(['document', 'objects', 'PathItem']);
3030
this.canSupportSpecificationExtensions = true;
31-
this.fieldPatternPredicate = (value) => /{(?<expression>.*)}/.test(String(value));
31+
this.fieldPatternPredicate = (value) => /{(?<expression>[^}]{1,2083})}/.test(String(value)); // 2,083 characters is the maximum length of a URL in Chrome
3232
}
3333

3434
ObjectElement(objectElement: ObjectElement) {

0 commit comments

Comments
 (0)