From a87a2119764e9e262f64f3ade35e7055e2f65504 Mon Sep 17 00:00:00 2001 From: Viacheslav Turovskyi Date: Mon, 15 Jan 2024 12:30:15 +0000 Subject: [PATCH] feat: add `x-origin` property --- src/v3/parser.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/v3/parser.ts b/src/v3/parser.ts index da1652b..b19343b 100644 --- a/src/v3/parser.ts +++ b/src/v3/parser.ts @@ -86,18 +86,18 @@ export async function parse(JSONSchema: any) { circular: false, excludedPathMatcher: (path: string): boolean => { return ( - !!path.match(/#\/channels\/[a-zA-Z0-9]*\/servers/) || - !!path.match(/#\/operations\/[a-zA-Z0-9]*\/channel/) || - !!path.match(/#\/operations\/[a-zA-Z0-9]*\/messages/) || - !!path.match(/#\/operations\/[a-zA-Z0-9]*\/reply\/channel/) || - !!path.match(/#\/operations\/[a-zA-Z0-9]*\/reply\/messages/) || - !!path.match(/#\/components\/operations\/[a-zA-Z0-9]*\/channel/) || - !!path.match(/#\/components\/operations\/[a-zA-Z0-9]*\/messages/) || - !!path.match( - /#\/components\/operations\/[a-zA-Z0-9]*\/reply\/channel/ + !!/#\/channels\/[a-zA-Z0-9]*\/servers/.exec(path) || + !!/#\/operations\/[a-zA-Z0-9]*\/channel/.exec(path) || + !!/#\/operations\/[a-zA-Z0-9]*\/messages/.exec(path) || + !!/#\/operations\/[a-zA-Z0-9]*\/reply\/channel/.exec(path) || + !!/#\/operations\/[a-zA-Z0-9]*\/reply\/messages/.exec(path) || + !!/#\/components\/operations\/[a-zA-Z0-9]*\/channel/.exec(path) || + !!/#\/components\/operations\/[a-zA-Z0-9]*\/messages/.exec(path) || + !!/#\/components\/operations\/[a-zA-Z0-9]*\/reply\/channel/.exec( + path ) || - !!path.match( - /#\/components\/operations\/[a-zA-Z0-9]*\/reply\/messages/ + !!/#\/components\/operations\/[a-zA-Z0-9]*\/reply\/messages/.exec( + path ) ); },