From f2737f2cd6ffc3c63727a8b58da884ba05bb340e Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Fri, 3 Nov 2023 16:08:58 +0100 Subject: [PATCH 1/3] fix(execute): handle Server Objects overrides for OpenAPI 3.1.0 This change is specific to OpenAPI 3.1.0. Refs #2967 --- config/jest/jest.unit.config.js | 1 + package-lock.json | 125 +++++++++--------- package.json | 8 +- .../__snapshots__/index.js.snap | 25 ++++ .../normalize/__snapshots__/index.js.snap | 70 ++++++++++ 5 files changed, 161 insertions(+), 68 deletions(-) diff --git a/config/jest/jest.unit.config.js b/config/jest/jest.unit.config.js index eb955f24c..ad422338a 100644 --- a/config/jest/jest.unit.config.js +++ b/config/jest/jest.unit.config.js @@ -4,6 +4,7 @@ module.exports = { rootDir: path.join(__dirname, '..', '..'), testEnvironment: 'node', testMatch: ['**/test/*.js', '**/test/**/*.js'], + // testMatch: ['**/test/resolver/strategies/openapi-3-1-apidom/index.js'], setupFilesAfterEnv: ['/test/jest.setup.js'], testPathIgnorePatterns: [ '/node_modules/', diff --git a/package-lock.json b/package-lock.json index e2a501e8a..0fe5b1d9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,10 +10,10 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.22.15", - "@swagger-api/apidom-core": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-json-pointer": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-reference": ">=0.82.0 <1.0.0", + "@swagger-api/apidom-core": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-json-pointer": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-reference": ">=0.82.1 <1.0.0", "cookie": "~0.5.0", "deepmerge": "~4.3.0", "fast-json-patch": "^3.0.0-1", @@ -3662,12 +3662,12 @@ } }, "node_modules/@swagger-api/apidom-ast": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.82.0.tgz", - "integrity": "sha512-WsoO9ekGeSt4GY58dsfFKrgzQOxvY5WoKtRyq/rY2IeEPxgLDkqzYexou1oYtiwcXmmFlEoFXOQu0Q4izF/64A==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.82.1.tgz", + "integrity": "sha512-G2p5yXAMh1+48uRF21NzLI8EDW1yw+hjrt35oMFhH6T25gYuMT7qKsleP0A8EXyTzmb0j7BE4ZC8m4hsJzFW5w==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-error": "^0.82.0", + "@swagger-api/apidom-error": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3676,13 +3676,13 @@ } }, "node_modules/@swagger-api/apidom-core": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.82.0.tgz", - "integrity": "sha512-HVjqp5oiuzd75TgtCDdhZNTdfy6ctLqmdUiOdYs/58dgnqxP4Ku3Wj1fyOjV4D/ZtN+Q4GjDjZmGRv4c9pJjOw==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.82.1.tgz", + "integrity": "sha512-7aMd7xqyxkj4BG+KdG+KCdm5cvPOIOoXaBK/gUy19iVVP8EK+Ju8b0IHctGxjzg7hKBvveO5Z9NH+s0BWKoS+A==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.0", - "@swagger-api/apidom-error": "^0.82.0", + "@swagger-api/apidom-ast": "^0.82.1", + "@swagger-api/apidom-error": "^0.82.1", "@types/ramda": "~0.29.6", "minim": "~0.23.8", "ramda": "~0.29.0", @@ -3692,24 +3692,21 @@ } }, "node_modules/@swagger-api/apidom-error": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-0.82.0.tgz", - "integrity": "sha512-4gzEP9J2Xgredn+Bi+xSxL0ZnBFC/6CSv+fkU7JyFh2Liqz4cfH6yh3Wrmve031pmvPvP9xzAc13VraV4ZCzFQ==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-0.82.1.tgz", + "integrity": "sha512-nL/7kDBtwf7JQqSWet1Bl0fMaCjxvyC5sKyNRGO1KzkB2XJp2DPOXsoXgPjnCvAG5ksgIa0LNyxUr+6hKbB19g==", "dependencies": { - "@babel/runtime-corejs3": "^7.20.7", - "@types/ramda": "~0.29.6", - "ramda": "~0.29.0", - "ramda-adjunct": "^4.0.0" + "@babel/runtime-corejs3": "^7.20.7" } }, "node_modules/@swagger-api/apidom-json-pointer": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.82.0.tgz", - "integrity": "sha512-JrE+K7rf2ITv+kmk50ansJq8qUjlZLUaMPBYEy2xLyGELERRHVgsL4fYMAHMRGrnHVg0CM8TgbU4sN50fnWZLg==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.82.1.tgz", + "integrity": "sha512-NRjUbuELbdITNtN3L1FZ3f7cBKmhH2JMk3qWimrmUV3jr6vPzlMxx0h7N65NGGndgJtoJXiiVO/XurPQfcd74Q==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.0", - "@swagger-api/apidom-error": "^0.82.0", + "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-error": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.0.0" @@ -3723,13 +3720,13 @@ "optional": true }, "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.82.0.tgz", - "integrity": "sha512-bZt15vKFbl5hw3KELDiBiyHkJdoeP5tahN7q86VV7hTJHJPmKXy5LHk5StvIOadcExcQFWcXX4D2xd9IuiYH/w==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.82.1.tgz", + "integrity": "sha512-yaYWqrGElObg40+jgNgaUNe8ZZTHuMHGsHq8TWxNTneKmDw2oovqX16up1XEBqev2IafAMjSqh+9i/nIeB6Axg==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.0", - "@swagger-api/apidom-core": "^0.82.0", + "@swagger-api/apidom-ast": "^0.82.1", + "@swagger-api/apidom-core": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3744,14 +3741,14 @@ "optional": true }, "node_modules/@swagger-api/apidom-ns-openapi-3-0": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.82.0.tgz", - "integrity": "sha512-E53qEeM8E4kycXEAM27Vcw8Qu0JHNMwzUclYK4f0yNHfUX8WJm3Ge0gL4vc2QleDtlLjMsK986mo1Y5LBXb//w==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.82.1.tgz", + "integrity": "sha512-3ketQzBEr875dbMSXQ849ZL2Amp6yvl7eETNvSmrdkQaW3k6mn2wIPX+vN2PgcZgsuu1s778Fv1EBQQQ84uv9A==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.0", - "@swagger-api/apidom-error": "^0.82.0", - "@swagger-api/apidom-ns-json-schema-draft-4": "^0.82.0", + "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-error": "^0.82.1", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3759,14 +3756,14 @@ } }, "node_modules/@swagger-api/apidom-ns-openapi-3-1": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.82.0.tgz", - "integrity": "sha512-jR341a8yceEoX5K9KKAod5AzpU3uSul2ok6bj7DdtM9Ze+tIDgqvNmz7V+yUu1mgiCJtdYMirIs27E42o6F+Gg==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.82.1.tgz", + "integrity": "sha512-982EZ8rrf4S8gRKSgQWbF+Ib+kF8aJ+iHMTWPjTmbgQI5MCPVojoyC6sYbto8gPtcwK3TOhwZdmFrTGKrfhx+g==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.0", - "@swagger-api/apidom-core": "^0.82.0", - "@swagger-api/apidom-ns-openapi-3-0": "^0.82.0", + "@swagger-api/apidom-ast": "^0.82.1", + "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-ns-openapi-3-0": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3858,12 +3855,12 @@ "optional": true }, "node_modules/@swagger-api/apidom-reference": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.82.0.tgz", - "integrity": "sha512-yWfn3vVP4U2dv+GT+UyL3bVA42HvebiSY+15Ln/202qcEbIHsQ1U/TGLmjdgE7tPeuGDEnltL0HgvyJ3ALgmVg==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.82.1.tgz", + "integrity": "sha512-Q2icFT/x05/v2I2zVH/0jhq53KmtOkCJmqLtfklxhVzekYxGM+A+Iu/ydJYnstncOnUD0ENiU0ykuIPrRqcAvw==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.0", + "@swagger-api/apidom-core": "^0.82.1", "@types/ramda": "~0.29.6", "axios": "^1.4.0", "minimatch": "^7.4.3", @@ -3873,24 +3870,24 @@ "stampit": "^4.3.2" }, "optionalDependencies": { - "@swagger-api/apidom-error": "^0.82.0", - "@swagger-api/apidom-json-pointer": "^0.82.0", - "@swagger-api/apidom-ns-asyncapi-2": "^0.82.0", - "@swagger-api/apidom-ns-openapi-2": "^0.82.0", - "@swagger-api/apidom-ns-openapi-3-0": "^0.82.0", - "@swagger-api/apidom-ns-openapi-3-1": "^0.82.0", - "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.82.0", - "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.82.0", - "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.82.0", - "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.82.0", - "@swagger-api/apidom-parser-adapter-json": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-json-2": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.82.0", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.82.0", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.82.0" + "@swagger-api/apidom-error": "^0.82.1", + "@swagger-api/apidom-json-pointer": "^0.82.1", + "@swagger-api/apidom-ns-asyncapi-2": "^0.82.1", + "@swagger-api/apidom-ns-openapi-2": "^0.82.1", + "@swagger-api/apidom-ns-openapi-3-0": "^0.82.1", + "@swagger-api/apidom-ns-openapi-3-1": "^0.82.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.82.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.82.1", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.82.1", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.82.1", + "@swagger-api/apidom-parser-adapter-json": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-json-2": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.82.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.82.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.82.1" } }, "node_modules/@tootallnate/once": { diff --git a/package.json b/package.json index 68c53fc08..33669799a 100644 --- a/package.json +++ b/package.json @@ -109,10 +109,10 @@ }, "dependencies": { "@babel/runtime-corejs3": "^7.22.15", - "@swagger-api/apidom-core": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-json-pointer": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.0 <1.0.0", - "@swagger-api/apidom-reference": ">=0.82.0 <1.0.0", + "@swagger-api/apidom-core": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-json-pointer": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-reference": ">=0.82.1 <1.0.0", "cookie": "~0.5.0", "deepmerge": "~4.3.0", "fast-json-patch": "^3.0.0-1", diff --git a/test/resolver/strategies/openapi-3-1-apidom/__snapshots__/index.js.snap b/test/resolver/strategies/openapi-3-1-apidom/__snapshots__/index.js.snap index d2c1bbd71..5c025385e 100644 --- a/test/resolver/strategies/openapi-3-1-apidom/__snapshots__/index.js.snap +++ b/test/resolver/strategies/openapi-3-1-apidom/__snapshots__/index.js.snap @@ -647,6 +647,11 @@ exports[`resolve OpenAPI 3.1.0 strategy given OpenAPI 3.1.0 definition via URL a }, }, "openapi": "3.1.0", + "servers": [ + { + "url": "/", + }, + ], }, } `; @@ -694,6 +699,11 @@ exports[`resolve OpenAPI 3.1.0 strategy given OpenAPI 3.1.0 definition via URL a }, }, "openapi": "3.1.0", + "servers": [ + { + "url": "/", + }, + ], }, } `; @@ -1639,6 +1649,11 @@ exports[`resolve OpenAPI 3.1.0 strategy given OpenAPI 3.1.0 definition via spec "version": "1.0.0", }, "openapi": "3.1.0", + "servers": [ + { + "url": "/", + }, + ], } `; @@ -1725,6 +1740,11 @@ exports[`resolve OpenAPI 3.1.0 strategy given OpenAPI 3.1.0 definition via spec "version": "1.0.0", }, "openapi": "3.1.0", + "servers": [ + { + "url": "/", + }, + ], }, } `; @@ -2507,6 +2527,11 @@ exports[`resolve OpenAPI 3.1.0 strategy given OpenAPI 3.1.0 definition via spec "version": "1.0.0", }, "openapi": "3.1.0", + "servers": [ + { + "url": "/", + }, + ], }, } `; diff --git a/test/resolver/strategies/openapi-3-1-apidom/normalize/__snapshots__/index.js.snap b/test/resolver/strategies/openapi-3-1-apidom/normalize/__snapshots__/index.js.snap index af89d643f..6adad6370 100644 --- a/test/resolver/strategies/openapi-3-1-apidom/normalize/__snapshots__/index.js.snap +++ b/test/resolver/strategies/openapi-3-1-apidom/normalize/__snapshots__/index.js.snap @@ -26,9 +26,24 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Header Object examples }, }, }, + "servers": [ + { + "url": "/", + }, + ], }, + "servers": [ + { + "url": "/", + }, + ], }, }, + "servers": [ + { + "url": "/", + }, + ], } `; @@ -41,9 +56,24 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Operation.id fields sh "get": { "__originalOperationId": "get operation ^", "operationId": "get_operation__", + "servers": [ + { + "url": "/", + }, + ], }, + "servers": [ + { + "url": "/", + }, + ], }, }, + "servers": [ + { + "url": "/", + }, + ], } `; @@ -70,8 +100,18 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Parameter Object examp }, }, ], + "servers": [ + { + "url": "/", + }, + ], }, }, + "servers": [ + { + "url": "/", + }, + ], } `; @@ -92,6 +132,11 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Parameter Objects shou "name": "param2", }, ], + "servers": [ + { + "url": "/", + }, + ], }, "parameters": [ { @@ -103,8 +148,18 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Parameter Objects shou "name": "param2", }, ], + "servers": [ + { + "url": "/", + }, + ], }, }, + "servers": [ + { + "url": "/", + }, + ], } `; @@ -123,7 +178,17 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Security Requirements ], }, ], + "servers": [ + { + "url": "/", + }, + ], }, + "servers": [ + { + "url": "/", + }, + ], }, }, "security": [ @@ -134,6 +199,11 @@ exports[`helpers normalize OpenAPI 3.1 given denormalized Security Requirements ], }, ], + "servers": [ + { + "url": "/", + }, + ], } `; From a42efbda36f35213a002e1425e5a598e1cfb38b1 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Fri, 3 Nov 2023 16:10:40 +0100 Subject: [PATCH 2/3] test: config --- config/jest/jest.unit.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/config/jest/jest.unit.config.js b/config/jest/jest.unit.config.js index ad422338a..eb955f24c 100644 --- a/config/jest/jest.unit.config.js +++ b/config/jest/jest.unit.config.js @@ -4,7 +4,6 @@ module.exports = { rootDir: path.join(__dirname, '..', '..'), testEnvironment: 'node', testMatch: ['**/test/*.js', '**/test/**/*.js'], - // testMatch: ['**/test/resolver/strategies/openapi-3-1-apidom/index.js'], setupFilesAfterEnv: ['/test/jest.setup.js'], testPathIgnorePatterns: [ '/node_modules/', From 66ba717c2156953aac1c237814462fdfcf443ab5 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Fri, 3 Nov 2023 17:40:14 +0100 Subject: [PATCH 3/3] fix: apidom --- package-lock.json | 104 +++++++++++++++++++++---------------------- package.json | 8 ++-- src/execute/index.js | 2 +- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fe5b1d9f..61c0cc04b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,10 +10,10 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime-corejs3": "^7.22.15", - "@swagger-api/apidom-core": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-json-pointer": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-reference": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-core": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-json-pointer": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-reference": ">=0.82.2 <1.0.0", "cookie": "~0.5.0", "deepmerge": "~4.3.0", "fast-json-patch": "^3.0.0-1", @@ -3662,9 +3662,9 @@ } }, "node_modules/@swagger-api/apidom-ast": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.82.1.tgz", - "integrity": "sha512-G2p5yXAMh1+48uRF21NzLI8EDW1yw+hjrt35oMFhH6T25gYuMT7qKsleP0A8EXyTzmb0j7BE4ZC8m4hsJzFW5w==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.82.2.tgz", + "integrity": "sha512-k41OHMe5FftHFJhj5LH+Y44BA4/ddoVH4vUv36tW+fU3qkC350VmkdMVglD0BhwZA9S8OpCSz4xmRfbyOGHirw==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", "@swagger-api/apidom-error": "^0.82.1", @@ -3676,12 +3676,12 @@ } }, "node_modules/@swagger-api/apidom-core": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.82.1.tgz", - "integrity": "sha512-7aMd7xqyxkj4BG+KdG+KCdm5cvPOIOoXaBK/gUy19iVVP8EK+Ju8b0IHctGxjzg7hKBvveO5Z9NH+s0BWKoS+A==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.82.2.tgz", + "integrity": "sha512-RVPpIA+qti1t116K3dhieofGvembdP3j7THs8+d0j3AMvz2/DK6+2uwLb2EptOAOAqWgIf/fycgwGBoo8/PyuQ==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.1", + "@swagger-api/apidom-ast": "^0.82.2", "@swagger-api/apidom-error": "^0.82.1", "@types/ramda": "~0.29.6", "minim": "~0.23.8", @@ -3700,12 +3700,12 @@ } }, "node_modules/@swagger-api/apidom-json-pointer": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.82.1.tgz", - "integrity": "sha512-NRjUbuELbdITNtN3L1FZ3f7cBKmhH2JMk3qWimrmUV3jr6vPzlMxx0h7N65NGGndgJtoJXiiVO/XurPQfcd74Q==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.82.2.tgz", + "integrity": "sha512-AQ9etS31kNDOVwpy7K9n9dvBYFmnbV7f/9zwrU/WElYdJzWVORxvCfTb7QjVjgQrZg+X387aHaI1LHqs1DE2Kg==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-core": "^0.82.2", "@swagger-api/apidom-error": "^0.82.1", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", @@ -3720,13 +3720,13 @@ "optional": true }, "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.82.1.tgz", - "integrity": "sha512-yaYWqrGElObg40+jgNgaUNe8ZZTHuMHGsHq8TWxNTneKmDw2oovqX16up1XEBqev2IafAMjSqh+9i/nIeB6Axg==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.82.2.tgz", + "integrity": "sha512-cQxENlN8ZGCSHVgoVgZZ2kxPyUxae8tKG6b11Etx7XnTuGVwC5etD3kz2tQYSp8ovR7vVq0f5Fqz4T0enPRXnw==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.1", - "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-ast": "^0.82.2", + "@swagger-api/apidom-core": "^0.82.2", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3741,14 +3741,14 @@ "optional": true }, "node_modules/@swagger-api/apidom-ns-openapi-3-0": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.82.1.tgz", - "integrity": "sha512-3ketQzBEr875dbMSXQ849ZL2Amp6yvl7eETNvSmrdkQaW3k6mn2wIPX+vN2PgcZgsuu1s778Fv1EBQQQ84uv9A==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.82.2.tgz", + "integrity": "sha512-u5MhdP1F+l8HpBhpBHMCGsBNtFGrgi6/ImDqXtjjzTx1syWce2GHjPnQMHup+HelK/IvXbTkSS5oQx+hbKJEvA==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-core": "^0.82.2", "@swagger-api/apidom-error": "^0.82.1", - "@swagger-api/apidom-ns-json-schema-draft-4": "^0.82.1", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.82.2", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3756,14 +3756,14 @@ } }, "node_modules/@swagger-api/apidom-ns-openapi-3-1": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.82.1.tgz", - "integrity": "sha512-982EZ8rrf4S8gRKSgQWbF+Ib+kF8aJ+iHMTWPjTmbgQI5MCPVojoyC6sYbto8gPtcwK3TOhwZdmFrTGKrfhx+g==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.82.2.tgz", + "integrity": "sha512-7f+mVam2zrdpXWSaWeaHkg+9vle2Pk3WuCLzT1SujbqdahN6znGi1jr6ScrO9SyaJOBPCRLr/mRMY+BBgyCW7g==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-ast": "^0.82.1", - "@swagger-api/apidom-core": "^0.82.1", - "@swagger-api/apidom-ns-openapi-3-0": "^0.82.1", + "@swagger-api/apidom-ast": "^0.82.2", + "@swagger-api/apidom-core": "^0.82.2", + "@swagger-api/apidom-ns-openapi-3-0": "^0.82.2", "@types/ramda": "~0.29.6", "ramda": "~0.29.0", "ramda-adjunct": "^4.1.1", @@ -3855,12 +3855,12 @@ "optional": true }, "node_modules/@swagger-api/apidom-reference": { - "version": "0.82.1", - "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.82.1.tgz", - "integrity": "sha512-Q2icFT/x05/v2I2zVH/0jhq53KmtOkCJmqLtfklxhVzekYxGM+A+Iu/ydJYnstncOnUD0ENiU0ykuIPrRqcAvw==", + "version": "0.82.2", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.82.2.tgz", + "integrity": "sha512-QWD3WuSwcPwhPvMz+c9JdEpUbV5sTw8PyVvRGkgH8vr+fWbSBnY0pOUg1ST4qdQKSZnhwVaKB8a1zQTsFtRYBw==", "dependencies": { "@babel/runtime-corejs3": "^7.20.7", - "@swagger-api/apidom-core": "^0.82.1", + "@swagger-api/apidom-core": "^0.82.2", "@types/ramda": "~0.29.6", "axios": "^1.4.0", "minimatch": "^7.4.3", @@ -3871,23 +3871,23 @@ }, "optionalDependencies": { "@swagger-api/apidom-error": "^0.82.1", - "@swagger-api/apidom-json-pointer": "^0.82.1", - "@swagger-api/apidom-ns-asyncapi-2": "^0.82.1", - "@swagger-api/apidom-ns-openapi-2": "^0.82.1", - "@swagger-api/apidom-ns-openapi-3-0": "^0.82.1", - "@swagger-api/apidom-ns-openapi-3-1": "^0.82.1", - "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.82.1", - "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.82.1", - "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.82.1", - "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.82.1", - "@swagger-api/apidom-parser-adapter-json": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-json-2": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.82.1", - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.82.1", - "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.82.1" + "@swagger-api/apidom-json-pointer": "^0.82.2", + "@swagger-api/apidom-ns-asyncapi-2": "^0.82.2", + "@swagger-api/apidom-ns-openapi-2": "^0.82.2", + "@swagger-api/apidom-ns-openapi-3-0": "^0.82.2", + "@swagger-api/apidom-ns-openapi-3-1": "^0.82.2", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.82.2", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.82.2", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.82.2", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.82.2", + "@swagger-api/apidom-parser-adapter-json": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-json-2": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.82.2", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.82.2", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.82.2" } }, "node_modules/@tootallnate/once": { diff --git a/package.json b/package.json index 33669799a..95c15bec9 100644 --- a/package.json +++ b/package.json @@ -109,10 +109,10 @@ }, "dependencies": { "@babel/runtime-corejs3": "^7.22.15", - "@swagger-api/apidom-core": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-json-pointer": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.1 <1.0.0", - "@swagger-api/apidom-reference": ">=0.82.1 <1.0.0", + "@swagger-api/apidom-core": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-json-pointer": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=0.82.2 <1.0.0", + "@swagger-api/apidom-reference": ">=0.82.2 <1.0.0", "cookie": "~0.5.0", "deepmerge": "~4.3.0", "fast-json-patch": "^3.0.0-1", diff --git a/src/execute/index.js b/src/execute/index.js index 62fccdeb0..c3abd0fe6 100755 --- a/src/execute/index.js +++ b/src/execute/index.js @@ -346,7 +346,7 @@ function oas3BaseUrl({ spec, pathName, method, server, contextUrl, serverVariabl // default to the first server if we don't have one by now if (!selectedServerUrl) { - selectedServerObj = servers.at(0); + [selectedServerObj] = servers; selectedServerUrl = selectedServerObj.url; }