Skip to content

Commit

Permalink
fix(ls): fix OpenAPI 3.x.y Server.url field linting (#2876)
Browse files Browse the repository at this point in the history
Server.url field in not validated as URL if it
contains {variables} inside it.

Refs #2858
  • Loading branch information
char0n committed Jun 20, 2023
1 parent a7f0d15 commit a8cc07f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const urlFormatURILint: LinterMeta = {
marker: 'value',
target: 'url',
data: {},
conditions: [
{
function: 'apilintValueRegex',
params: ['^(?!.*\\{\\S+?\\}).*$'], // validate as URI only if variables in brackets not present
},
],
};

export default urlFormatURILint;

0 comments on commit a8cc07f

Please sign in to comment.