From c35c34a4f673eab122bd201e6576dd98c6f17023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Fri, 2 Feb 2024 11:49:02 +0100 Subject: [PATCH] fix(ns-openapi-3-0): fix polynomial regular expression (#3784) --- .../src/refractor/visitors/open-api-3-0/callback/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.ts b/packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.ts index 67c2410f0..50276a931 100644 --- a/packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.ts +++ b/packages/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.ts @@ -28,7 +28,7 @@ class CallbackVisitor extends Mixin(PatternedFieldsVisitor, FallbackVisitor) { this.element = new CallbackElement(); this.specPath = always(['document', 'objects', 'PathItem']); this.canSupportSpecificationExtensions = true; - this.fieldPatternPredicate = (value) => /{(?.*)}/.test(String(value)); + this.fieldPatternPredicate = (value) => /{(?[^}]{1,2083})}/.test(String(value)); // 2,083 characters is the maximum length of a URL in Chrome } ObjectElement(objectElement: ObjectElement) {