diff --git a/packages/apidom-reference/test/parse/parsers/api-design-systems-json/index.ts b/packages/apidom-reference/test/parse/parsers/api-design-systems-json/index.ts index ff2b9a2ceb..94c61ae773 100644 --- a/packages/apidom-reference/test/parse/parsers/api-design-systems-json/index.ts +++ b/packages/apidom-reference/test/parse/parsers/api-design-systems-json/index.ts @@ -99,10 +99,10 @@ describe('parsers', function () { context('parse', function () { context('given API Design Systems JSON data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -115,10 +115,10 @@ describe('parsers', function () { context('given API Design Systems JSON data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.json'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.json'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -163,10 +163,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); @@ -179,10 +179,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); diff --git a/packages/apidom-reference/test/parse/parsers/api-design-systems-yaml/index.ts b/packages/apidom-reference/test/parse/parsers/api-design-systems-yaml/index.ts index b9b5ece8cf..20c8f79340 100644 --- a/packages/apidom-reference/test/parse/parsers/api-design-systems-yaml/index.ts +++ b/packages/apidom-reference/test/parse/parsers/api-design-systems-yaml/index.ts @@ -128,9 +128,9 @@ describe('parsers', function () { context('parse', function () { context('given API Design Systems YAML data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); - const data = fs.readFileSync(url).toString(); - const file = File({ url, data, mediaType: mediaTypes.latest() }); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); + const data = fs.readFileSync(uri).toString(); + const file = File({ uri, data, mediaType: mediaTypes.latest() }); const parser = ApiDesignSystemsYamlParser(); const parseResult = await parser.parse(file); @@ -140,9 +140,9 @@ describe('parsers', function () { context('given API Design Systems YAML data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); - const data = fs.readFileSync(url); - const file = File({ url, data, mediaType: mediaTypes.latest() }); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); + const data = fs.readFileSync(uri); + const file = File({ uri, data, mediaType: mediaTypes.latest() }); const parser = ApiDesignSystemsYamlParser(); const parseResult = await parser.parse(file); @@ -184,10 +184,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); @@ -200,10 +200,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'api-design-systems.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); diff --git a/packages/apidom-reference/test/parse/parsers/asyncapi-json-2/index.ts b/packages/apidom-reference/test/parse/parsers/asyncapi-json-2/index.ts index 1c1b72ea1e..4f528cfc14 100644 --- a/packages/apidom-reference/test/parse/parsers/asyncapi-json-2/index.ts +++ b/packages/apidom-reference/test/parse/parsers/asyncapi-json-2/index.ts @@ -97,10 +97,10 @@ describe('parsers', function () { context('parse', function () { context('given AsyncApi 2.6.0 JSON data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -113,10 +113,10 @@ describe('parsers', function () { context('given AsyncApi 2.6.0 JSON data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -161,10 +161,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); @@ -177,10 +177,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); diff --git a/packages/apidom-reference/test/parse/parsers/asyncapi-yaml-2/index.ts b/packages/apidom-reference/test/parse/parsers/asyncapi-yaml-2/index.ts index 907bc93e5a..11ff335714 100644 --- a/packages/apidom-reference/test/parse/parsers/asyncapi-yaml-2/index.ts +++ b/packages/apidom-reference/test/parse/parsers/asyncapi-yaml-2/index.ts @@ -128,9 +128,9 @@ describe('parsers', function () { context('parse', function () { context('given AsyncApi 2.6.0 YAML data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); - const file = File({ url, data, mediaType: mediaTypes.latest() }); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); + const file = File({ uri, data, mediaType: mediaTypes.latest() }); const parser = AsyncApiYaml2Parser(); const parseResult = await parser.parse(file); @@ -140,9 +140,9 @@ describe('parsers', function () { context('given AsyncApi 2.6.0 YAML data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url); - const file = File({ url, data, mediaType: mediaTypes.latest() }); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri); + const file = File({ uri, data, mediaType: mediaTypes.latest() }); const parser = AsyncApiYaml2Parser(); const parseResult = await parser.parse(file); @@ -184,10 +184,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); @@ -200,10 +200,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest(), }); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-json-2/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-json-2/index.ts index 9032a24726..b76ee4d1e3 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-json-2/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-json-2/index.ts @@ -97,10 +97,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 2.0 JSON data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -113,10 +113,10 @@ describe('parsers', function () { context('given OpenApi 2.0 JSON data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -161,10 +161,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -177,10 +177,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-json-3-0/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-json-3-0/index.ts index 754f0fddb5..2a9a0e6921 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-json-3-0/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-json-3-0/index.ts @@ -97,10 +97,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 3.0.x JSON data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -113,10 +113,10 @@ describe('parsers', function () { context('given OpenApi 3.0.x JSON data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -161,10 +161,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -177,10 +177,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-json-3-1/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-json-3-1/index.ts index 2625e616ce..5e0faf4d95 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-json-3-1/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-json-3-1/index.ts @@ -97,10 +97,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 3.1.x JSON data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -113,10 +113,10 @@ describe('parsers', function () { context('given OpenApi 3.1.x JSON data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -161,10 +161,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); @@ -177,10 +177,10 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.json'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.json'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('json'), }); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-yaml-2/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-yaml-2/index.ts index 0b4fc3e7e8..b089ed8fad 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-yaml-2/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-yaml-2/index.ts @@ -128,10 +128,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 2.0 YAML data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -144,10 +144,10 @@ describe('parsers', function () { context('given OpenApi 2.0 YAML data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -192,10 +192,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -208,9 +208,9 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); - const file = File({ url, data }); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); + const file = File({ uri, data }); const parser = OpenApiYaml2Parser({ sourceMap: false }); const parseResult = await parser.parse(file); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-0/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-0/index.ts index 0add286464..06a9cee018 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-0/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-0/index.ts @@ -128,10 +128,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 3.0.1 YAML data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -144,10 +144,10 @@ describe('parsers', function () { context('given OpenApi 3.0.x YAML data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -192,10 +192,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -208,9 +208,9 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); - const file = File({ url, data }); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); + const file = File({ uri, data }); const parser = OpenApiYaml3_0Parser({ sourceMap: false }); const parseResult = await parser.parse(file); diff --git a/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-1/index.ts b/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-1/index.ts index c90cb4d016..8802caae6e 100644 --- a/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-1/index.ts +++ b/packages/apidom-reference/test/parse/parsers/openapi-yaml-3-1/index.ts @@ -128,10 +128,10 @@ describe('parsers', function () { context('parse', function () { context('given OpenApi 3.1.x YAML data', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -144,10 +144,10 @@ describe('parsers', function () { context('given OpenApi 3.1.x YAML data as buffer', function () { specify('should return parse result', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -192,10 +192,10 @@ describe('parsers', function () { context('sourceMap', function () { context('given sourceMap enabled', function () { specify('should decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); const file = File({ - url, + uri, data, mediaType: mediaTypes.latest('yaml'), }); @@ -208,9 +208,9 @@ describe('parsers', function () { context('given sourceMap disabled', function () { specify('should not decorate ApiDOM with source maps', async function () { - const url = path.join(__dirname, 'fixtures', 'sample-api.yaml'); - const data = fs.readFileSync(url).toString(); - const file = File({ url, data }); + const uri = path.join(__dirname, 'fixtures', 'sample-api.yaml'); + const data = fs.readFileSync(uri).toString(); + const file = File({ uri, data }); const parser = OpenApiYaml3_1Parser({ sourceMap: false }); const parseResult = await parser.parse(file);