From c4ec315eca842a6917279ba317b2588fb730d9cc Mon Sep 17 00:00:00 2001 From: Dimitri van Hees Date: Wed, 29 Apr 2026 16:19:41 +0200 Subject: [PATCH 1/7] Use external ADR rulesets --- package-lock.json | 404 ++++++++++---------------------- package.json | 3 +- rulesets/ruleset_2.0.yaml | 140 ----------- rulesets/ruleset_2.1.yaml | 189 --------------- services/OasValidatorService.js | 111 ++------- 5 files changed, 146 insertions(+), 701 deletions(-) delete mode 100644 rulesets/ruleset_2.0.yaml delete mode 100644 rulesets/ruleset_2.1.yaml diff --git a/package-lock.json b/package-lock.json index 17c5462..9dbee25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,10 +10,11 @@ "license": "Unlicense", "dependencies": { "@apiture/openapi-down-convert": "^0.14.2", + "@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main", "@redocly/cli": "^2.20.5", "@scalar/openapi-upgrader": "^0.2.3", + "@stoplight/spectral-core": "^1.21.0", "@stoplight/spectral-parsers": "^1.0.5", - "@stoplight/spectral-rulesets": "^1.22.0", "@stoplight/spectral-runtime": "^1.1.4", "body-parser": "^2.2.2", "case-anything": "^3.1.2", @@ -71,9 +72,9 @@ } }, "node_modules/@asyncapi/specs": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.10.0.tgz", - "integrity": "sha512-vB5oKLsdrLUORIZ5BXortZTlVyGWWMC1Nud/0LtgxQ3Yn2738HigAD6EVqScvpPsDUI/bcLVsYEXN4dtXQHVng==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.11.1.tgz", + "integrity": "sha512-A3WBLqAKGoJ2+6FWFtpjBlCQ1oFCcs4GxF7zsIGvNqp/klGUHjlA3aAcZ9XMMpLGE8zPeYDz2x9FmO6DSuKraQ==", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" @@ -294,6 +295,16 @@ "kuler": "^2.0.0" } }, + "node_modules/@developer-overheid-nl/adr-rulesets": { + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/developer-overheid-nl/adr-rulesets.git#da1327dfcc83ed130b1fe5aaa282b7bfba537aee", + "license": "EUPL-1.2", + "dependencies": { + "@stoplight/spectral-core": "^1.21.0", + "@stoplight/spectral-functions": "^1.10.1", + "@stoplight/spectral-rulesets": "^1.22.0" + } + }, "node_modules/@emotion/is-prop-valid": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.4.0.tgz", @@ -917,6 +928,22 @@ "text-hex": "1.0.x" } }, + "node_modules/@stoplight/better-ajv-errors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", + "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", + "license": "Apache-2.0", + "dependencies": { + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, "node_modules/@stoplight/json": { "version": "3.21.7", "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.7.tgz", @@ -947,6 +974,12 @@ "node": ">=8.3.0" } }, + "node_modules/@stoplight/json-ref-readers/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" + }, "node_modules/@stoplight/json-ref-resolver": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.6.tgz", @@ -968,12 +1001,6 @@ "node": ">=8.3.0" } }, - "node_modules/@stoplight/json-ref-resolver/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@stoplight/json/node_modules/safe-stable-stringify": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", @@ -999,9 +1026,9 @@ } }, "node_modules/@stoplight/spectral-core": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.20.0.tgz", - "integrity": "sha512-5hBP81nCC1zn1hJXL/uxPNRKNcB+/pEIHgCjPRpl/w/qy9yC9ver04tw1W0l/PMiv0UeB5dYgozXVQ4j5a6QQQ==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.22.0.tgz", + "integrity": "sha512-4hTxMDs4TFUG4/jKjaZttA65gNuV2PCKI9+51I+J4nL6ylo17DlbW+sl6byKnBuV/85HxaV33ri5fEGlp8lTSA==", "license": "Apache-2.0", "dependencies": { "@stoplight/better-ajv-errors": "1.0.3", @@ -1013,39 +1040,23 @@ "@stoplight/types": "~13.6.0", "@types/es-aggregate-error": "^1.0.2", "@types/json-schema": "^7.0.11", - "ajv": "^8.17.1", + "ajv": "^8.18.0", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.1", "es-aggregate-error": "^1.0.7", + "expr-eval-fork": "^3.0.1", "jsonpath-plus": "^10.3.0", - "lodash": "~4.17.21", + "lodash": "^4.18.1", "lodash.topath": "^4.5.2", - "minimatch": "3.1.2", + "minimatch": "^3.1.4", "nimma": "0.2.3", "pony-cause": "^1.1.1", - "simple-eval": "1.0.1", "tslib": "^2.8.1" }, "engines": { "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-core/node_modules/@stoplight/better-ajv-errors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", - "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", - "license": "Apache-2.0", - "dependencies": { - "jsonpointer": "^5.0.0", - "leven": "^3.1.0" - }, - "engines": { - "node": "^12.20 || >= 14.13" - }, - "peerDependencies": { - "ajv": ">=8" - } - }, "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { "version": "13.6.0", "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.6.0.tgz", @@ -1059,31 +1070,6 @@ "node": "^12.20 || >=14.13" } }, - "node_modules/@stoplight/spectral-core/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@stoplight/spectral-core/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, "node_modules/@stoplight/spectral-core/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1101,11 +1087,11 @@ } } }, - "node_modules/@stoplight/spectral-core/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "node_modules/@stoplight/spectral-core/node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" }, "node_modules/@stoplight/spectral-formats": { "version": "1.8.2", @@ -1122,16 +1108,10 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-formats/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@stoplight/spectral-functions": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-functions/-/spectral-functions-1.10.1.tgz", - "integrity": "sha512-obu8ZfoHxELOapfGsCJixKZXZcffjg+lSoNuttpmUFuDzVLT3VmH8QkPXfOGOL5Pz80BR35ClNAToDkdnYIURg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-functions/-/spectral-functions-1.10.2.tgz", + "integrity": "sha512-PIfPUgTRo8EtAnL1MIrzhHoUuojSaE8shGSMaHS3BxGyc8d079BE5+TqJa1/WLUb9YT9JQnZ0Aj4xfi8NcJOIw==", "license": "Apache-2.0", "dependencies": { "@stoplight/better-ajv-errors": "1.0.3", @@ -1139,58 +1119,17 @@ "@stoplight/spectral-core": "^1.19.4", "@stoplight/spectral-formats": "^1.8.1", "@stoplight/spectral-runtime": "^1.1.2", - "ajv": "^8.17.1", + "ajv": "^8.18.0", "ajv-draft-04": "~1.0.0", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.1", - "lodash": "~4.17.21", + "lodash": "^4.18.1", "tslib": "^2.8.1" }, "engines": { "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-functions/node_modules/@stoplight/better-ajv-errors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", - "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", - "license": "Apache-2.0", - "dependencies": { - "jsonpointer": "^5.0.0", - "leven": "^3.1.0" - }, - "engines": { - "node": "^12.20 || >= 14.13" - }, - "peerDependencies": { - "ajv": ">=8" - } - }, - "node_modules/@stoplight/spectral-functions/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@stoplight/spectral-functions/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, "node_modules/@stoplight/spectral-functions/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1208,11 +1147,11 @@ } } }, - "node_modules/@stoplight/spectral-functions/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "node_modules/@stoplight/spectral-functions/node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" }, "node_modules/@stoplight/spectral-parsers": { "version": "1.0.5", @@ -1242,12 +1181,6 @@ "node": "^12.20 || >=14.13" } }, - "node_modules/@stoplight/spectral-parsers/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@stoplight/spectral-ref-resolver": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@stoplight/spectral-ref-resolver/-/spectral-ref-resolver-1.0.5.tgz", @@ -1264,16 +1197,10 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-ref-resolver/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@stoplight/spectral-rulesets": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-rulesets/-/spectral-rulesets-1.22.0.tgz", - "integrity": "sha512-l2EY2jiKKLsvnPfGy+pXC0LeGsbJzcQP5G/AojHgf+cwN//VYxW1Wvv4WKFx/CLmLxc42mJYF2juwWofjWYNIQ==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-rulesets/-/spectral-rulesets-1.22.1.tgz", + "integrity": "sha512-DaaQJioKuYkRsOuKIJfX2ek7G7f6OCU3CI3K7ABaOcTFMiHj29SJLDdb04mCjXZFXMlXHjmCl2ZpKW6heieXpw==", "license": "Apache-2.0", "dependencies": { "@asyncapi/specs": "^6.8.0", @@ -1285,49 +1212,17 @@ "@stoplight/spectral-runtime": "^1.1.2", "@stoplight/types": "^13.6.0", "@types/json-schema": "^7.0.7", - "ajv": "^8.17.1", + "ajv": "^8.18.0", "ajv-formats": "~2.1.1", "json-schema-traverse": "^1.0.0", "leven": "3.1.0", - "lodash": "~4.17.21", + "lodash": "^4.18.1", "tslib": "^2.8.1" }, "engines": { "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-rulesets/node_modules/@stoplight/better-ajv-errors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", - "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", - "license": "Apache-2.0", - "dependencies": { - "jsonpointer": "^5.0.0", - "leven": "^3.1.0" - }, - "engines": { - "node": "^12.20 || >= 14.13" - }, - "peerDependencies": { - "ajv": ">=8" - } - }, - "node_modules/@stoplight/spectral-rulesets/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/@stoplight/spectral-rulesets/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1345,11 +1240,11 @@ } } }, - "node_modules/@stoplight/spectral-rulesets/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "node_modules/@stoplight/spectral-rulesets/node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" }, "node_modules/@stoplight/spectral-runtime": { "version": "1.1.4", @@ -1369,12 +1264,6 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, - "node_modules/@stoplight/spectral-runtime/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@stoplight/types": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz", @@ -1422,12 +1311,6 @@ "node": "^12.20 || >=14.13" } }, - "node_modules/@stoplight/yaml/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@types/body-parser": { "version": "1.19.6", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", @@ -1600,15 +1483,15 @@ } }, "node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -1629,6 +1512,15 @@ } } }, + "node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, "node_modules/ajv-formats": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", @@ -1646,22 +1538,6 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1840,9 +1716,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -1876,14 +1752,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", "set-function-length": "^1.2.2" }, "engines": { @@ -2397,9 +2273,9 @@ } }, "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", + "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.2", @@ -2593,6 +2469,15 @@ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "license": "MIT" }, + "node_modules/expr-eval-fork": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/expr-eval-fork/-/expr-eval-fork-3.0.3.tgz", + "integrity": "sha512-BhC+hbc5lIVjygr840n5DEkW3MQq7H9o+mc1/N7Z5uIiCFVyESLL5DIE7LNq4CYUNxy+XjA+3jRrL/h0Kt2xcg==", + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, "node_modules/express": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", @@ -2660,22 +2545,6 @@ "express": "*" } }, - "node_modules/express-openapi-validator/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/express/node_modules/cookie-signature": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", @@ -3696,9 +3565,9 @@ "license": "MIT" }, "node_modules/jsonpath-plus": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", - "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.4.0.tgz", + "integrity": "sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==", "license": "MIT", "dependencies": { "@jsep-plugin/assignment": "^1.3.0", @@ -3978,9 +3847,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -5107,14 +4976,14 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", + "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, @@ -5444,18 +5313,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-eval": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz", - "integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==", - "license": "MIT", - "dependencies": { - "jsep": "^1.3.6" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/simple-websocket": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/simple-websocket/-/simple-websocket-9.1.0.tgz", @@ -5690,12 +5547,6 @@ } } }, - "node_modules/styled-components/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/stylis": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz", @@ -5778,9 +5629,9 @@ "license": "MIT" }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/type-is": { @@ -5954,15 +5805,6 @@ "node": ">= 0.8" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/urijs": { "version": "1.19.11", "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", @@ -6131,9 +5973,9 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", diff --git a/package.json b/package.json index 2a63f71..22da748 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,11 @@ "private": true, "dependencies": { "@apiture/openapi-down-convert": "^0.14.2", + "@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main", "@redocly/cli": "^2.20.5", "@scalar/openapi-upgrader": "^0.2.3", + "@stoplight/spectral-core": "^1.21.0", "@stoplight/spectral-parsers": "^1.0.5", - "@stoplight/spectral-rulesets": "^1.22.0", "@stoplight/spectral-runtime": "^1.1.4", "body-parser": "^2.2.2", "case-anything": "^3.1.2", diff --git a/rulesets/ruleset_2.0.yaml b/rulesets/ruleset_2.0.yaml deleted file mode 100644 index 9b8e8de..0000000 --- a/rulesets/ruleset_2.0.yaml +++ /dev/null @@ -1,140 +0,0 @@ -# spectral lint -r https://developer.overheid.nl/static/adr/ruleset.yaml $OAS_URL_OR_FILE -# curl https://developer.overheid.nl/static/adr/ruleset.yaml > .spectral.yml - -extends: spectral:oas - -rules: - - #/core/doc-openapi - openapi3: - severity: error - given: - - "$.['openapi']" - then: - function: pattern - functionOptions: - match: "^3.0.*$" - message: "/core/doc-openapi: Use OpenAPI Specification for documentation: https://logius-standaarden.github.io/API-Design-Rules/#/core/doc-openapi" - - #/core/version-header - missing-version-header: - severity: error - given: $..[responses][?(@property && @property.match(/(2|3)\d\d/))][headers] - then: - field: API-Version - function: truthy - message: "/core/version-header: Return the full version number in a response header: https://logius-standaarden.github.io/API-Design-Rules/#/core/version-header" - - missing-header: - severity: error - given: $..[responses][?(@property && @property.match(/(2|3)\d\d/))] - then: - field: headers - function: truthy - message: "/core/version-header: Return the full version number in a response header: https://logius-standaarden.github.io/API-Design-Rules/#/core/version-header" - - #/core/uri-version - include-major-version-in-uri: - severity: error - given: - - "$.servers[*]" - then: - function: pattern - functionOptions: - match: "\\/v[\\d+]" - field: url - message: "/core/uri-version: Include the major version number in the URI: https://logius-standaarden.github.io/API-Design-Rules/#/core/uri-version" - - #/core/no-trailing-slash - paths-no-trailing-slash: - severity: error - given: - - "$.paths" - then: - function: pattern - functionOptions: - notMatch: "\\/$" - field: "@key" - message: "/core/no-trailing-slash: Leave off trailing slashes from URIs: https://logius-standaarden.github.io/API-Design-Rules/#/core/no-trailing-slash" - - #/core/http-methods - http-methods: - severity: error - given: - - "$.paths[?(@property && @property.match(/(description|summary)/i))]" - then: - function: pattern - functionOptions: - match: "post|put|get|delete|patch|parameters" - field: "@key" - message: "/core/http-methods: Only apply standard HTTP methods: https://logius-standaarden.github.io/API-Design-Rules/#http-methods" - - paths-kebab-case: - severity: warn - message: "{{property}} is not kebab-case." - given: $.paths[*]~ - then: - function: pattern - functionOptions: - match: "^(\/[a-z0-9-.]+|\/{[a-zA-Z0-9_]+})+$" - - schema-camel-case: - severity: warn - message: "Schema name should be CamelCase in {{path}}" - given: >- - $.components.schemas[*]~ - then: - function: casing - functionOptions: - type: pascal - separator: - char: "" - - servers-use-https: - severity: warn - message: "Server URL {{value}} {{error}}." - given: - - $.servers[*] - - $.paths..servers[*] - then: - field: url - function: pattern - functionOptions: - match: ^https://.* - - use-problem-schema: - severity: warn - message: Your schema doesn't seem to match RFC7807. Are you sure it is ok? {{path}} - given: $..[responses][?(@property && @property.match(/^(4|5|default)/))][[schema]].properties - then: - function: schema - functionOptions: - schema: - anyOf: - - type: object - required: - - title - - status - - type: object - required: - - title - - type - - type: object - required: - - type - - status - - type: object - required: - - title - - detail - - property-casing: - severity: warn - given: - - "$.*.schemas[*].properties.[?(@property && @property.match(/_links/i))]" - then: - function: casing - functionOptions: - type: camel - field: "@key" - message: Properties must be lowerCamelCase. diff --git a/rulesets/ruleset_2.1.yaml b/rulesets/ruleset_2.1.yaml deleted file mode 100644 index d3fc614..0000000 --- a/rulesets/ruleset_2.1.yaml +++ /dev/null @@ -1,189 +0,0 @@ -# Deze linter configuratie is geschreven voor Spectral. Voor meer informatie over -# die tool, zie https://stoplight.io/open-source/spectral -# -# De linter configuratie wordt tevens gehost op https://developer.overheid.nl (DON). -# Deze kan worden gebruikt in onder andere CI systemen voor live updates van de -# configuratie. -# -# Voor meer informatie hierover, zie de kennisbank van DON: -# https://developer.overheid.nl/kennisbank/apis/tools/api-design-rules-linter -# -# Hierbij ook de ingevoegde instructies die kunnen worden gekopieerd om de linter -# te draaien: -# -# ``` -# npm install -g @stoplight/spectral-cli -# curl -L https://static.developer.overheid.nl/adr/ruleset.yaml > .spectral.yml -# spectral lint -r .spectral.yml $OAS_URL_OR_FILE -# ``` - -extends: spectral:oas - -rules: - oas3-api-servers: error - - #/core/doc-openapi - openapi3: - severity: error - given: $.['openapi'] - then: - function: pattern - functionOptions: - match: '^3(.\d+){1,2}$' - message: "The OpenAPI Specification is versioned using a `major.minor.patch` versioning scheme. Use a version 3 OpenAPI Specification for documentation." - - openapi-root-exists: - severity: error - given: $ - then: - field: openapi - function: truthy - message: "The root of the document must contain the `openapi` property" - - #/core/version-header - missing-version-header: - severity: error - given: $..[responses][?(@property && @property.match(/(2|3)\d\d/))][headers] - then: - function: or - functionOptions: - properties: - - API-Version - - Api-Version - - Api-version - - api-version - - API-version - message: "Return the full version number in a response header" - - missing-header: - severity: error - given: $..[responses][?(@property && @property.match(/(2|3)\d\d/))] - then: - field: headers - function: truthy - message: "/core/version-header: Return the full version number in a response header: https://logius-standaarden.github.io/API-Design-Rules/#/core/version-header" - - #/core/uri-version - include-major-version-in-uri: - severity: error - given: - - "$.servers[*]" - then: - function: pattern - functionOptions: - match: "\\/v[\\d+]" - field: url - message: "/core/uri-version: Include the major version number in the URI: https://logius-standaarden.github.io/API-Design-Rules/#/core/uri-version" - - #/core/no-trailing-slash - paths-no-trailing-slash: - severity: error - given: - - "$.paths" - then: - function: pattern - functionOptions: - notMatch: ".+ \\/$" - field: "@key" - message: "/core/no-trailing-slash: Leave off trailing slashes from URIs: https://logius-standaarden.github.io/API-Design-Rules/#/core/no-trailing-slash" - - #/core/doc-openapi-contact - # This rule exists in the base oas spectral linter set - info-contact: error - - info-contact-fields-exist: - severity: error - given: - - "$.info.contact" - then: - function: schema - functionOptions: - schema: - required: - - email - - name - - url - message: "Missing fields in `info.contact` field. Must specify email, name and url." - - #/core/http-methods - http-methods: - severity: error - given: - - "$.paths[?(@property && @property.match(/(description|summary)/i))]" - then: - function: pattern - functionOptions: - match: "post|put|get|delete|patch|parameters" - field: "@key" - message: "/core/http-methods: Only apply standard HTTP methods: https://logius-standaarden.github.io/API-Design-Rules/#http-methods" - - paths-kebab-case: - severity: warn - message: "{{property}} is not kebab-case." - given: $.paths[?(@property && !@property.match(/\/openapi\.json/))]~ - then: - function: pattern - functionOptions: - # Deze regex bestaat uit meerdere delen. Ter toelichting: - # - `\/` staat toe dat een pad enkel een `/` is (de landingspagina) - # - `\/_[a-z0-9]+` staat toe dat het laatste stuk van een pad mag beginnen met een `_` - # - ([a-z0-9\-]+|{[^}]+}) zijn kebab-case paden of met variabele notatie (`{id}`) - # - Paden mogen nesten, waardoor de twee groep genest wordt, gescheiden met een `/` - # - Een pad mag eindigen met een `/`. Dat is volgens een andere regel niet toegestaan, maar we willen niet twee errors genereren - match: ^(\/|(\/_[a-z0-9]+|\/(([a-z0-9\-]+|{[^}]+})(\/([a-z0-9\-\.]+|{[^}]+}))*)(\/_[a-z]+)?)\/?)$ - - schema-camel-case: - severity: warn - message: "Schema name should be CamelCase in {{path}}" - given: >- - $.components.schemas[*]~ - then: - function: casing - functionOptions: - type: pascal - separator: - char: "" - - servers-use-https: - severity: warn - message: "Server URL {{value}} {{error}}." - given: - - $.servers[*] - - $.paths..servers[*] - then: - field: url - function: pattern - functionOptions: - match: ^https://.* - - use-problem-schema: - severity: warn - message: "The content type of an error response should be application/problem+json or application/problem+xml to match RFC 9457." - given: $..[responses][?(@property && @property.match(/(4|5)\d\d/))].content - then: - function: schema - functionOptions: - schema: - anyOf: - - required: ["application/problem+json"] - - required: ["application/problem+xml"] - - property-casing: - severity: warn - given: - - "$.*.schemas[*].properties.[?(@property && @property.match(/_links/i))]" - then: - function: casing - functionOptions: - type: camel - field: "@key" - message: Properties must be lowerCamelCase. - - semver: - severity: error - message: "Version {{value}} is not in semver format." - given: $.info.version - then: - function: pattern - functionOptions: - match: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ \ No newline at end of file diff --git a/services/OasValidatorService.js b/services/OasValidatorService.js index 165c236..bd30578 100644 --- a/services/OasValidatorService.js +++ b/services/OasValidatorService.js @@ -1,18 +1,15 @@ -const fs = require("node:fs/promises"); -const path = require("node:path"); const { randomUUID } = require("node:crypto"); -const spectralFunctions = require("@stoplight/spectral-functions"); -const jsYaml = require("js-yaml"); -const { Spectral, Document, Ruleset } = require("@stoplight/spectral-core"); +const { Spectral, Document } = require("@stoplight/spectral-core"); const Parsers = require("@stoplight/spectral-parsers"); -const { oas: oasRuleset } = require("@stoplight/spectral-rulesets"); const Service = require("./Service"); const { fetchSpecification } = require("./RemoteSpecificationService"); const logger = require("../logger"); -const RULESET_FILES = { - "2.0": path.join(__dirname, "..", "rulesets", "ruleset_2.0.yaml"), - 2.1: path.join(__dirname, "..", "rulesets", "ruleset_2.1.yaml"), +const RULESET_LOADERS = { + "2.0": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-20"), + "2.1": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-21"), + "2.2": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-22"), + draft: () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-draft"), }; const DEFAULT_RULESET_VERSION = "2.1"; @@ -20,106 +17,40 @@ const SEVERITY_LABELS = ["error", "warning", "info", "hint"]; const MEASURED_RULE_GROUPS = { openapi3: "openapi3", + "nlgov:openapi3": "openapi3", "openapi-root-exists": "openapi-root-exists", + "nlgov:openapi-root-exists": "openapi-root-exists", "missing-version-header": "version-header", + "nlgov:missing-version-header": "version-header", "missing-header": "version-header", + "nlgov:missing-header": "version-header", "include-major-version-in-uri": "include-major-version-in-uri", + "nlgov:include-major-version-in-uri": "include-major-version-in-uri", "paths-no-trailing-slash": "paths-no-trailing-slash", + "nlgov:paths-no-trailing-slash": "paths-no-trailing-slash", "info-contact-fields-exist": "info-contact-fields-exist", + "nlgov:info-contact-fields-exist": "info-contact-fields-exist", "http-methods": "http-methods", + "nlgov:http-methods": "http-methods", semver: "semver", + "nlgov:semver": "semver", }; const MEASURED_GROUP_KEYS = Array.from(new Set(Object.values(MEASURED_RULE_GROUPS))); const spectralInstancePromises = new Map(); -const resolveRulesetExtendsEntry = (entry) => { - if (Array.isArray(entry)) { - if (entry.length === 0) { - return entry; - } - const [target, severity, ...rest] = entry; - if (rest.length > 0) { - throw new Error(`Onbekende extends configuratie in ruleset: ${JSON.stringify(entry)}`); - } - return [resolveRulesetExtendsEntry(target), severity]; - } - if (typeof entry === "string") { - if (entry === "spectral:oas") { - return oasRuleset; - } - throw new Error(`Onbekende ruleset referentie '${entry}'`); - } - return entry; -}; - -const getRulesetPath = (version) => { - if (Object.hasOwn(RULESET_FILES, version)) { - return RULESET_FILES[version]; - } - return RULESET_FILES[DEFAULT_RULESET_VERSION]; -}; - -const loadRulesetDefinition = async (rulesetPath) => { - try { - const contents = await fs.readFile(rulesetPath, "utf8"); - const definition = jsYaml.load(contents); - if (!definition || typeof definition !== "object") { - throw new Error("Ruleset-bestand is leeg of ongeldig."); - } - if (definition.extends) { - const normalizedExtends = Array.isArray(definition.extends) - ? definition.extends.map(resolveRulesetExtendsEntry) - : resolveRulesetExtendsEntry(definition.extends); - definition.extends = normalizedExtends; - } - if (definition.rules) { - Object.values(definition.rules).forEach((rule) => { - if (!rule || typeof rule !== "object") { - return; - } - const thens = Array.isArray(rule.then) ? rule.then : [rule.then]; - thens.forEach((thenEntry) => { - if (!thenEntry || typeof thenEntry !== "object") { - return; - } - if (typeof thenEntry.function === "string") { - const fnName = thenEntry.function; - const fn = spectralFunctions[fnName]; - if (typeof fn !== "function") { - throw new Error(`Onbekende Spectral-functie '${fnName}' in ruleset.`); - } - thenEntry.function = fn; - } - }); - }); - } - return definition; - } catch (error) { - logger.error("[OasValidatorService] loadRulesetDefinition failed", { - message: error.message, - stack: error.stack, - }); - throw new Error(error.message || "Onbekende fout bij het laden van het ruleset-bestand."); - } -}; - -const loadSpectral = async (rulesetVersion) => { +const loadSpectral = (rulesetVersion) => { if (!spectralInstancePromises.has(rulesetVersion)) { const promise = (async () => { try { - const rulesetPath = getRulesetPath(rulesetVersion); + const loader = RULESET_LOADERS[rulesetVersion]; + const module = await loader(); const spectral = new Spectral(); - const rulesetDefinition = await loadRulesetDefinition(rulesetPath); - const ruleset = new Ruleset(rulesetDefinition, { - severity: "recommended", - source: rulesetPath, - }); - spectral.setRuleset(ruleset); + spectral.setRuleset(module.default); return spectral; } catch (error) { - logger.error(`[OasValidatorService] Unable to load Spectral ruleset (${rulesetVersion}): ${error.message}`); + logger.error(`[OasValidatorService] Unable to load ruleset (${rulesetVersion}): ${error.message}`); spectralInstancePromises.delete(rulesetVersion); throw Service.rejectResponse( { @@ -258,7 +189,7 @@ const normalizeRulesetVersion = (value) => { if (trimmed === "2") { return "2.0"; } - if (Object.hasOwn(RULESET_FILES, trimmed)) { + if (Object.hasOwn(RULESET_LOADERS, trimmed)) { return trimmed; } return DEFAULT_RULESET_VERSION; From 3b34f122e3769f3d890d9ecd3039129811895b53 Mon Sep 17 00:00:00 2001 From: pasibun Date: Wed, 29 Apr 2026 16:16:07 +0200 Subject: [PATCH 2/7] [deploy-test] --- .env | 1 - 1 file changed, 1 deletion(-) diff --git a/.env b/.env index 4cbb079..7373c9d 100644 --- a/.env +++ b/.env @@ -1,4 +1,3 @@ -PDOK_REGISTER_ENDPOINT=http://localhost:1337/v1/apis AUTH_CLIENT_ID=don-admin-client AUTH_CLIENT_SECRET=C7dZAGOU5ExAK4ixo7bSr5nQksbCP4xP KEYCLOAK_BASE_URL=https://auth.don.apps.digilab.network From 6695ce33b51962269ca8b2fa949636a887ad6b12 Mon Sep 17 00:00:00 2001 From: pasibun Date: Wed, 29 Apr 2026 16:20:29 +0200 Subject: [PATCH 3/7] chore: update dependencies and license in package.json - Changed license from Unlicense to EUPL-1.2 - Updated @redocly/cli from ^2.20.5 to ^2.30.2 - Updated @scalar/openapi-upgrader from ^0.2.3 to ^0.2.6 - Updated @stoplight/spectral-rulesets from ^1.22.0 to ^1.22.1 - Updated @stoplight/spectral-runtime from ^1.1.4 to ^1.1.5 - Updated express from ^5.1.0 to ^5.2.1 - Updated openapi-to-postmanv2 from ^5.3.4 to ^6.0.1 - Updated @biomejs/biome from ^2.3.4 to ^2.4.13 [deploy-test] --- biome.json | 2 +- package-lock.json | 480 +++++++++++++++++++++++++++------------------- package.json | 16 +- 3 files changed, 290 insertions(+), 208 deletions(-) diff --git a/biome.json b/biome.json index 5a2f98b..fac7c27 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.13/schema.json", "formatter": { "indentStyle": "space", "indentWidth": 2, diff --git a/package-lock.json b/package-lock.json index 9dbee25..69283e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,27 +7,27 @@ "": { "name": "tools-api-v1", "version": "1.0.0", - "license": "Unlicense", + "license": "EUPL-1.2", "dependencies": { "@apiture/openapi-down-convert": "^0.14.2", "@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main", - "@redocly/cli": "^2.20.5", - "@scalar/openapi-upgrader": "^0.2.3", - "@stoplight/spectral-core": "^1.21.0", + "@redocly/cli": "^2.30.2", + "@scalar/openapi-upgrader": "^0.2.6", "@stoplight/spectral-parsers": "^1.0.5", - "@stoplight/spectral-runtime": "^1.1.4", + "@stoplight/spectral-rulesets": "^1.22.1", + "@stoplight/spectral-runtime": "^1.1.5", "body-parser": "^2.2.2", "case-anything": "^3.1.2", "cors": "^2.8.6", - "express": "^5.1.0", + "express": "^5.2.1", "express-openapi-validator": "^5.6.2", "js-yaml": "^4.1.1", "jszip": "^3.10.1", - "openapi-to-postmanv2": "^5.3.4", + "openapi-to-postmanv2": "^6.0.1", "winston": "^3.19.0" }, "devDependencies": { - "@biomejs/biome": "^2.3.4" + "@biomejs/biome": "^2.4.13" } }, "node_modules/@apidevtools/json-schema-ref-parser": { @@ -113,9 +113,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.4.tgz", - "integrity": "sha512-TU08LXjBHdy0mEY9APtEtZdNQQijXUDSXR7IK1i45wgoPD5R0muK7s61QcFir6FpOj/RP1+YkPx5QJlycXUU3w==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.13.tgz", + "integrity": "sha512-gLXOwkOBBg0tr7bDsqlkIh4uFeKuMjxvqsrb1Tukww1iDmHcfr4Uu8MoQxp0Rcte+69+osRNWXwHsu/zxT6XqA==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -129,20 +129,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.3.4", - "@biomejs/cli-darwin-x64": "2.3.4", - "@biomejs/cli-linux-arm64": "2.3.4", - "@biomejs/cli-linux-arm64-musl": "2.3.4", - "@biomejs/cli-linux-x64": "2.3.4", - "@biomejs/cli-linux-x64-musl": "2.3.4", - "@biomejs/cli-win32-arm64": "2.3.4", - "@biomejs/cli-win32-x64": "2.3.4" + "@biomejs/cli-darwin-arm64": "2.4.13", + "@biomejs/cli-darwin-x64": "2.4.13", + "@biomejs/cli-linux-arm64": "2.4.13", + "@biomejs/cli-linux-arm64-musl": "2.4.13", + "@biomejs/cli-linux-x64": "2.4.13", + "@biomejs/cli-linux-x64-musl": "2.4.13", + "@biomejs/cli-win32-arm64": "2.4.13", + "@biomejs/cli-win32-x64": "2.4.13" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.4.tgz", - "integrity": "sha512-w40GvlNzLaqmuWYiDU6Ys9FNhJiclngKqcGld3iJIiy2bpJ0Q+8n3haiaC81uTPY/NA0d8Q/I3Z9+ajc14102Q==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.13.tgz", + "integrity": "sha512-2KImO1jhNFBa2oWConyr0x6flxbQpGKv6902uGXpYM62Xyem8U80j441SyUJ8KyngsmKbQjeIv1q2CQfDkNnYg==", "cpu": [ "arm64" ], @@ -157,9 +157,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.4.tgz", - "integrity": "sha512-3s7TLVtjJ7ni1xADXsS7x7GMUrLBZXg8SemXc3T0XLslzvqKj/dq1xGeBQ+pOWQzng9MaozfacIHdK2UlJ3jGA==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.13.tgz", + "integrity": "sha512-BKrJklbaFN4p1Ts4kPBczo+PkbsHQg57kmJ+vON9u2t6uN5okYHaSr7h/MutPCWQgg2lglaWoSmm+zhYW+oOkg==", "cpu": [ "x64" ], @@ -174,9 +174,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.4.tgz", - "integrity": "sha512-y7efHyyM2gYmHy/AdWEip+VgTMe9973aP7XYKPzu/j8JxnPHuSUXftzmPhkVw0lfm4ECGbdBdGD6+rLmTgNZaA==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.13.tgz", + "integrity": "sha512-NzkUDSqfvMBrPplKgVr3aXLHZ2NEELvvF4vZxXulEylKWIGqlvNEcwUcj9OLrn75TD3lJ/GIqCVlBwd1MZCuYQ==", "cpu": [ "arm64" ], @@ -191,9 +191,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.4.tgz", - "integrity": "sha512-IruVGQRwMURivWazchiq7gKAqZSFs5so6gi0hJyxk7x6HR+iwZbO2IxNOqyLURBvL06qkIHs7Wffl6Bw30vCbQ==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.13.tgz", + "integrity": "sha512-U5MsuBQW25dXaYtqWWSPM3P96H6Y+fHuja3TQpMNnylocHW0tEbtFTDlUj6oM+YJLntvEkQy4grBvQNUD4+RCg==", "cpu": [ "arm64" ], @@ -208,9 +208,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.4.tgz", - "integrity": "sha512-gKfjWR/6/dfIxPJCw8REdEowiXCkIpl9jycpNVHux8aX2yhWPLjydOshkDL6Y/82PcQJHn95VCj7J+BRcE5o1Q==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.13.tgz", + "integrity": "sha512-Az3ZZedYRBo9EQzNnD9SxFcR1G5QsGo6VEc2hIyVPZ1rdKwee/7E9oeBBZFpE8Z44ekxsDQBqbiWGW5ShOhUSQ==", "cpu": [ "x64" ], @@ -225,9 +225,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.4.tgz", - "integrity": "sha512-mzKFFv/w66e4/jCobFmD3kymCqG+FuWE7sVa4Yjqd9v7qt2UhXo67MSZKY9Ih18V2IwPzRKQPCw6KwdZs6AXSA==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.13.tgz", + "integrity": "sha512-Z601MienRgTBDza/+u2CH3RSrWoXo9rtr8NK6A4KJzqGgfxx+H3VlyLgTJ4sRo40T3pIsqpTmiOQEvYzQvBRvQ==", "cpu": [ "x64" ], @@ -242,9 +242,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.4.tgz", - "integrity": "sha512-5TJ6JfVez+yyupJ/iGUici2wzKf0RrSAxJhghQXtAEsc67OIpdwSKAQboemILrwKfHDi5s6mu7mX+VTCTUydkw==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.13.tgz", + "integrity": "sha512-Px9PS2B5/Q183bUwy/5VHqp3J2lzdOCeVGzMpphYfl8oSa7VDCqenBdqWpy6DCy/en4Rbf/Y1RieZF6dJPcc9A==", "cpu": [ "arm64" ], @@ -259,9 +259,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.4.tgz", - "integrity": "sha512-FGCijXecmC4IedQ0esdYNlMpx0Jxgf4zceCaMu6fkjWyjgn50ZQtMiqZZQ0Q/77yqPxvtkgZAvt5uGw0gAAjig==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.13.tgz", + "integrity": "sha512-tTcMkXyBrmHi9BfrD2VNHs/5rYIUKETqsBlYOvSAABwBkJhSDVb5e7wPukftsQbO3WzQkXe6kaztC6WtUOXSoQ==", "cpu": [ "x64" ], @@ -403,18 +403,19 @@ } }, "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", + "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==", "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=8.0.0" } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.202.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.202.0.tgz", - "integrity": "sha512-fTBjMqKCfotFWfLzaKyhjLvyEyq5vDKTTFfBmx21btv3gvy8Lq6N5Dh2OzqeuN4DjtpSvNT1uNVfg08eD2Rfxw==", + "version": "0.214.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz", + "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0" @@ -424,9 +425,9 @@ } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz", - "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.6.1.tgz", + "integrity": "sha512-XHzhwRNkBpeP8Fs/qjGrAf9r9PRv67wkJQ/7ZPaBQQ68DYlTBBx5MF9LvPx7mhuXcDessKK2b+DcxqwpgkcivQ==", "license": "Apache-2.0", "engines": { "node": "^18.19.0 || >=20.6.0" @@ -436,9 +437,9 @@ } }, "node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz", + "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" @@ -451,16 +452,16 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.202.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.202.0.tgz", - "integrity": "sha512-/hKE8DaFCJuaQqE1IxpgkcjOolUIwgi3TgHElPVKGdGRBSmJMTmN/cr6vWa55pCJIXPyhKvcMrbrya7DZ3VmzA==", + "version": "0.214.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.214.0.tgz", + "integrity": "sha512-kIN8nTBMgV2hXzV/a20BCFilPZdAIMYYJGSgfMMRm/Xa+07y5hRDS2Vm12A/z8Cdu3Sq++ZvJfElokX2rkgGgw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.202.0", - "@opentelemetry/otlp-transformer": "0.202.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" + "@opentelemetry/core": "2.6.1", + "@opentelemetry/otlp-exporter-base": "0.214.0", + "@opentelemetry/otlp-transformer": "0.214.0", + "@opentelemetry/resources": "2.6.1", + "@opentelemetry/sdk-trace-base": "2.6.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -470,13 +471,13 @@ } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.202.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.202.0.tgz", - "integrity": "sha512-nMEOzel+pUFYuBJg2znGmHJWbmvMbdX5/RhoKNKowguMbURhz0fwik5tUKplLcUtl8wKPL1y9zPnPxeBn65N0Q==", + "version": "0.214.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz", + "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-transformer": "0.202.0" + "@opentelemetry/core": "2.6.1", + "@opentelemetry/otlp-transformer": "0.214.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -486,18 +487,18 @@ } }, "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.202.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.202.0.tgz", - "integrity": "sha512-5XO77QFzs9WkexvJQL9ksxL8oVFb/dfi9NWQSq7Sv0Efr9x3N+nb1iklP1TeVgxqJ7m1xWiC/Uv3wupiQGevMw==", + "version": "0.214.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz", + "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.202.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-logs": "0.202.0", - "@opentelemetry/sdk-metrics": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1", - "protobufjs": "^7.3.0" + "@opentelemetry/api-logs": "0.214.0", + "@opentelemetry/core": "2.6.1", + "@opentelemetry/resources": "2.6.1", + "@opentelemetry/sdk-logs": "0.214.0", + "@opentelemetry/sdk-metrics": "2.6.1", + "@opentelemetry/sdk-trace-base": "2.6.1", + "protobufjs": "^7.0.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -507,12 +508,12 @@ } }, "node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz", + "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.0.1", + "@opentelemetry/core": "2.6.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -523,14 +524,15 @@ } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.202.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.202.0.tgz", - "integrity": "sha512-pv8QiQLQzk4X909YKm0lnW4hpuQg4zHwJ4XBd5bZiXcd9urvrJNoNVKnxGHPiDVX/GiLFvr5DMYsDBQbZCypRQ==", + "version": "0.214.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz", + "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.202.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" + "@opentelemetry/api-logs": "0.214.0", + "@opentelemetry/core": "2.6.1", + "@opentelemetry/resources": "2.6.1", + "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -540,13 +542,13 @@ } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz", + "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" + "@opentelemetry/core": "2.6.1", + "@opentelemetry/resources": "2.6.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -556,13 +558,13 @@ } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz", + "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", + "@opentelemetry/core": "2.6.1", + "@opentelemetry/resources": "2.6.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -573,14 +575,14 @@ } }, "node_modules/@opentelemetry/sdk-trace-node": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz", - "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.6.1.tgz", + "integrity": "sha512-Hh2i4FwHWRFhnO2Q/p6svMxy8MPsNCG0uuzUY3glqm0rwM0nQvbTO1dXSp9OqQoTKXcQzaz9q1f65fsurmOhNw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-async-hooks": "2.0.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" + "@opentelemetry/context-async-hooks": "2.6.1", + "@opentelemetry/core": "2.6.1", + "@opentelemetry/sdk-trace-base": "2.6.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -590,9 +592,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz", - "integrity": "sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.40.0.tgz", + "integrity": "sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==", "license": "Apache-2.0", "engines": { "node": ">=14" @@ -611,9 +613,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", + "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/eventemitter": { @@ -639,9 +641,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.1.tgz", + "integrity": "sha512-mnzgDV26ueAvk7rsbt9L7bE0SuAoqyuys/sMMrmVcN5x9VsxpcG3rqAUSgDyLp0UZlmNfIbQ4fHfCtreVBk8Ew==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/path": { @@ -657,9 +659,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz", + "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==", "license": "BSD-3-Clause" }, "node_modules/@redocly/ajv": { @@ -679,28 +681,28 @@ } }, "node_modules/@redocly/cli": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.21.1.tgz", - "integrity": "sha512-tqMvNzXB2dD9ThfNo3O69ZwNPfs1O41q04o1Fgc4iSNn1jpKUcE371u79qF4q/axRpbvQblZs7I6i7XwRN/zmg==", - "license": "MIT", - "dependencies": { - "@opentelemetry/exporter-trace-otlp-http": "0.202.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-node": "2.0.1", - "@opentelemetry/semantic-conventions": "1.34.0", - "@redocly/openapi-core": "2.21.1", - "@redocly/respect-core": "2.21.1", - "abort-controller": "^3.0.0", + "version": "2.30.2", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.30.2.tgz", + "integrity": "sha512-DWTydfVgEJkqDMcriRuy+MX+IYaEPU0AvV/nKuT1/1ajTugofkxlClHfZOK8Kwv47qAHvZ9w3oF+WCP/fVyW2g==", + "license": "MIT", + "dependencies": { + "@opentelemetry/exporter-trace-otlp-http": "0.214.0", + "@opentelemetry/resources": "2.6.1", + "@opentelemetry/sdk-trace-node": "2.6.1", + "@opentelemetry/semantic-conventions": "1.40.0", + "@redocly/cli-otel": "0.1.2", + "@redocly/openapi-core": "2.30.2", + "@redocly/respect-core": "2.30.2", "ajv": "npm:@redocly/ajv@8.18.0", "ajv-formats": "^3.0.1", "colorette": "^1.2.0", "cookie": "^0.7.2", "dotenv": "16.4.7", "glob": "^13.0.5", - "handlebars": "^4.7.6", + "handlebars": "^4.7.9", "https-proxy-agent": "^7.0.5", "mobx": "^6.0.4", - "picomatch": "^4.0.3", + "picomatch": "^4.0.4", "pluralize": "^8.0.0", "react": "^17.0.0 || ^18.2.0 || ^19.2.1", "react-dom": "^17.0.0 || ^18.2.0 || ^19.2.1", @@ -710,7 +712,7 @@ "simple-websocket": "^9.0.0", "styled-components": "6.3.9", "ulid": "^3.0.1", - "undici": "^6.23.0", + "undici": "6.24.0", "yargs": "17.0.1" }, "bin": { @@ -722,6 +724,24 @@ "npm": ">=10" } }, + "node_modules/@redocly/cli-otel": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@redocly/cli-otel/-/cli-otel-0.1.2.tgz", + "integrity": "sha512-Bg7BoO5t1x3lVK+KhA5aGPmeXpQmdf6WtTYHhelKJCsQ+tRMiJoFAQoKHoBHAoNxXrhlS3K9lKFLHGmtxsFQfA==", + "license": "MIT", + "dependencies": { + "ulid": "^2.3.0" + } + }, + "node_modules/@redocly/cli-otel/node_modules/ulid": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.4.0.tgz", + "integrity": "sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==", + "license": "MIT", + "bin": { + "ulid": "bin/cli.js" + } + }, "node_modules/@redocly/cli/node_modules/ajv": { "name": "@redocly/ajv", "version": "8.18.0", @@ -790,28 +810,28 @@ } }, "node_modules/@redocly/config": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.44.1.tgz", - "integrity": "sha512-l6/ZE+/RBfNDdhzltau6cbW8+k5PgJbJBMqaBrlQlZQlmGBHMxqGyDaon4dPLj0jdi37gsMQ3yf95JBY/vaDSg==", + "version": "0.48.1", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.48.1.tgz", + "integrity": "sha512-vq8GM3e0KiglqkwE5Lb9XayrmZY4dHCs21BsvV92yAZN68f1N9cZUuwY1SwnztPbH06dn9uLzubBl/JNfImqfA==", "license": "MIT", "dependencies": { "json-schema-to-ts": "2.7.2" } }, "node_modules/@redocly/openapi-core": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-2.21.1.tgz", - "integrity": "sha512-xqO0avM42DOnninr3NqCPGgD61L1EunmDy+hQNZhuCM2/a6X0g19ZYNioQxeGw3/OlKNVeplSO26lEq52R12VQ==", + "version": "2.30.2", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-2.30.2.tgz", + "integrity": "sha512-J1UB/I1s9eRpirIVgzH/B1Jj+hYQHYExruLk+edPOqneFIlFc38wKiTRkj/TVpwcmzRHJNu5SSI6NTrrfPa4BA==", "license": "MIT", "dependencies": { "@redocly/ajv": "^8.18.0", - "@redocly/config": "^0.44.1", + "@redocly/config": "^0.48.1", "ajv": "npm:@redocly/ajv@8.18.0", "ajv-formats": "^3.0.1", "colorette": "^1.2.0", "js-levenshtein": "^1.1.6", "js-yaml": "^4.1.0", - "picomatch": "^4.0.3", + "picomatch": "^4.0.4", "pluralize": "^8.0.0", "yaml-ast-parser": "0.0.43" }, @@ -838,15 +858,15 @@ } }, "node_modules/@redocly/respect-core": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-2.21.1.tgz", - "integrity": "sha512-Y5betL4vL8UEElOkDoSul5X30QQj8lw7NKrE0ncvA9viN8BQqnqxhC3PBTVvpKAkCXsEDdw98C09xQ7weygT+g==", + "version": "2.30.2", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-2.30.2.tgz", + "integrity": "sha512-4dVg57ItG19MGsLWDPmbUid81kHEbGqLcSSp1Q/8wHGJVzxmFgX9JOkqEw059/dwCYjP+txPhcMDORh0pK9ivQ==", "license": "MIT", "dependencies": { "@faker-js/faker": "^7.6.0", "@noble/hashes": "^1.8.0", "@redocly/ajv": "^8.18.0", - "@redocly/openapi-core": "2.21.1", + "@redocly/openapi-core": "2.30.2", "ajv": "npm:@redocly/ajv@8.18.0", "better-ajv-errors": "^1.2.0", "colorette": "^2.0.20", @@ -854,7 +874,7 @@ "jsonpath-rfc9535": "1.3.0", "openapi-sampler": "^1.7.1", "outdent": "^0.8.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=22.12.0 || >=20.19.0 <21.0.0", @@ -895,24 +915,21 @@ "license": "MIT" }, "node_modules/@scalar/openapi-types": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.6.1.tgz", - "integrity": "sha512-P1RvyTFN0vRSL136OqWjlZfSFjY9JoJfuD6LM1mIjoocfwmqX3WuzsFEFX6hAeeDlTh6gjbiy+OdhSee8GFfSA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.8.0.tgz", + "integrity": "sha512-WmaxVSfvY5K/TwcG2B2TU1WOe1As1uc2s7myswtP6dBlcjU3hM08SApxv/jmyGaCE8t4gO5BBhmHY4pDUfmr2g==", "license": "MIT", - "dependencies": { - "zod": "^4.3.5" - }, "engines": { "node": ">=22" } }, "node_modules/@scalar/openapi-upgrader": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@scalar/openapi-upgrader/-/openapi-upgrader-0.2.3.tgz", - "integrity": "sha512-h8Orhztvd4hivrxoj809nTw3TOKY0al8cB0wXWHR6fZvI9UtsQchkDgXw1FfGMZstgKcDD6W3PHg98frwpFezg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@scalar/openapi-upgrader/-/openapi-upgrader-0.2.6.tgz", + "integrity": "sha512-pvEmfSCDNYR4+lygidUqfo+shzyp4OSh9+UgK110rzA8Oot6WbJBM03Fuq3M255G7G6R9iXyfsebB7MBUocPkw==", "license": "MIT", "dependencies": { - "@scalar/openapi-types": "0.6.1" + "@scalar/openapi-types": "0.8.0" }, "engines": { "node": ">=22" @@ -1070,6 +1087,15 @@ "node": "^12.20 || >=14.13" } }, + "node_modules/@stoplight/spectral-core/node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, "node_modules/@stoplight/spectral-core/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1130,6 +1156,31 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, + "node_modules/@stoplight/spectral-functions/node_modules/@stoplight/better-ajv-errors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", + "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", + "license": "Apache-2.0", + "dependencies": { + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/@stoplight/spectral-functions/node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, "node_modules/@stoplight/spectral-functions/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1223,6 +1274,22 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, + "node_modules/@stoplight/spectral-rulesets/node_modules/@stoplight/better-ajv-errors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", + "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", + "license": "Apache-2.0", + "dependencies": { + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, "node_modules/@stoplight/spectral-rulesets/node_modules/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -1246,17 +1313,23 @@ "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, + "node_modules/@stoplight/spectral-rulesets/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@stoplight/spectral-runtime": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-runtime/-/spectral-runtime-1.1.4.tgz", - "integrity": "sha512-YHbhX3dqW0do6DhiPSgSGQzr6yQLlWybhKwWx0cqxjMwxej3TqLv3BXMfIUYFKKUqIwH4Q2mV8rrMM8qD2N0rQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-runtime/-/spectral-runtime-1.1.5.tgz", + "integrity": "sha512-6/HSCQBKnI4M5qonCKos2W7oggXv+U/ml+m/cAd4eJAYfIVEmaLUo03qSWIIl4cBc5ujJPmn2WnCiRrz1++P7Q==", "license": "Apache-2.0", "dependencies": { "@stoplight/json": "^3.20.1", "@stoplight/path": "^1.3.2", "@stoplight/types": "^13.6.0", "abort-controller": "^3.0.0", - "lodash": "^4.17.21", + "lodash": "^4.18.1", "node-fetch": "^2.7.0", "tslib": "^2.8.1" }, @@ -1264,6 +1337,18 @@ "node": "^16.20 || ^18.18 || >= 20.17" } }, + "node_modules/@stoplight/spectral-runtime/node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/@stoplight/spectral-runtime/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@stoplight/types": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz", @@ -1372,7 +1457,8 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/multer": { "version": "2.1.0", @@ -1487,6 +1573,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1512,15 +1599,6 @@ } } }, - "node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, "node_modules/ajv-formats": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", @@ -2479,18 +2557,19 @@ } }, "node_modules/express": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", - "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", "dependencies": { "accepts": "^2.0.0", - "body-parser": "^2.2.0", + "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", + "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", @@ -2901,9 +2980,9 @@ } }, "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "license": "MIT", "dependencies": { "minimist": "^1.2.5", @@ -3502,6 +3581,7 @@ "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", "license": "MIT", + "peer": true, "engines": { "node": ">= 10.16.0" } @@ -3893,6 +3973,7 @@ "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.15.0.tgz", "integrity": "sha512-UczzB+0nnwGotYSgllfARAqWCJ5e/skuV2K/l+Zyck/H6pJIhLXuBnz+6vn2i211o7DtbE78HQtsYEKICHGI+g==", "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" @@ -4317,9 +4398,9 @@ } }, "node_modules/openapi-to-postmanv2": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-5.3.4.tgz", - "integrity": "sha512-P19oLat+eLDP5zT7OYoe9G3rarUc7zYHizYcjNTr2OZfqrqpBPP1uRD0XZbEaQnAvxdSv05LzqcKrH0OpKCMLA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-6.0.1.tgz", + "integrity": "sha512-zAjaTwXo07az6jjvZTw4d26QMQsFxZBxTqjj3LQQMDCCuO6+peATQc9bSmAq3QbzvikP+h2WEjTphMcIrcSurg==", "license": "Apache-2.0", "dependencies": { "ajv": "^8.11.0", @@ -4335,6 +4416,7 @@ "neotraverse": "0.6.15", "oas-resolver-browser": "2.5.6", "object-hash": "3.0.0", + "openapi-types": "^12.1.3", "path-browserify": "1.0.1", "postman-collection": "^5.0.0", "swagger2openapi": "7.0.8", @@ -4376,6 +4458,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT" + }, "node_modules/outdent": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.8.0.tgz", @@ -4474,9 +4562,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "license": "MIT", "engines": { "node": ">=12" @@ -4619,22 +4707,22 @@ } }, "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.6.tgz", + "integrity": "sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGDRShD2rsJhtN02RJaJ7j5X5hmy8SJg==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", + "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", + "@protobufjs/inquire": "^1.1.1", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", + "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.0.0" }, @@ -4753,6 +4841,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -4762,6 +4851,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -5519,6 +5609,7 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.3.9.tgz", "integrity": "sha512-J72R4ltw0UBVUlEjTzI0gg2STOqlI9JBhQOL4Dxt7aJOnnSesy0qJDn4PYfMCafk9cWOaVg129Pesl5o+DIh0Q==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.4.0", "@emotion/unitless": "0.10.0", @@ -5782,9 +5873,9 @@ } }, "node_modules/undici": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz", - "integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==", + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", + "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -6138,15 +6229,6 @@ "engines": { "node": ">=12" } - }, - "node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } } } } diff --git a/package.json b/package.json index 22da748..3a64951 100644 --- a/package.json +++ b/package.json @@ -15,27 +15,27 @@ "openapi-generator", "openapi" ], - "license": "Unlicense", + "license": "EUPL-1.2", "private": true, "dependencies": { "@apiture/openapi-down-convert": "^0.14.2", "@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main", - "@redocly/cli": "^2.20.5", - "@scalar/openapi-upgrader": "^0.2.3", - "@stoplight/spectral-core": "^1.21.0", + "@redocly/cli": "^2.30.2", + "@scalar/openapi-upgrader": "^0.2.6", "@stoplight/spectral-parsers": "^1.0.5", - "@stoplight/spectral-runtime": "^1.1.4", + "@stoplight/spectral-rulesets": "^1.22.1", + "@stoplight/spectral-runtime": "^1.1.5", "body-parser": "^2.2.2", "case-anything": "^3.1.2", "cors": "^2.8.6", - "express": "^5.1.0", + "express": "^5.2.1", "express-openapi-validator": "^5.6.2", "js-yaml": "^4.1.1", "jszip": "^3.10.1", - "openapi-to-postmanv2": "^5.3.4", + "openapi-to-postmanv2": "^6.0.1", "winston": "^3.19.0" }, "devDependencies": { - "@biomejs/biome": "^2.3.4" + "@biomejs/biome": "^2.4.13" } } From 84a3ff5e72afbd97bf5abbea6262f2788527cc39 Mon Sep 17 00:00:00 2001 From: pasibun Date: Thu, 30 Apr 2026 08:37:16 +0200 Subject: [PATCH 4/7] feat: add workflows for production and test deployment [deploy-test] Co-authored-by: Copilot --- .github/workflows/deploy-prod.yml | 87 ++++++++++++++++++++++ .github/workflows/deploy-test.yml | 116 ++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 .github/workflows/deploy-prod.yml create mode 100644 .github/workflows/deploy-test.yml diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 0000000..27a2a94 --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,87 @@ +name: Deploy to Production + +on: + workflow_dispatch: + push: + branches: + - main + +env: + IMAGE_NAME: ghcr.io/${{ github.repository }} + INFRA_REPO: ${{ vars.INFRA_REPO }} + KUSTOMIZE_PATH: ${{ vars.KUSTOMIZE_PATH }} + DEPLOY_ENV: prod + +jobs: + create-infra-pr: + runs-on: ubuntu-latest + steps: + - name: Parse infra repository + id: infra-repo + run: | + INFRA_REPO="${{ env.INFRA_REPO }}" + + if [[ -z "$INFRA_REPO" || "$INFRA_REPO" != */* ]]; then + echo "INFRA_REPO moet de vorm owner/repo hebben, huidige waarde: '$INFRA_REPO'" >&2 + exit 1 + fi + + echo "owner=${INFRA_REPO%%/*}" >> "$GITHUB_OUTPUT" + echo "repo=${INFRA_REPO#*/}" >> "$GITHUB_OUTPUT" + + - name: Genereer app token (Release proces app) + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 + with: + app-id: ${{ secrets.RELEASE_PROCES_APP_ID }} + private-key: ${{ secrets.RELEASE_PROCES_APP_PRIVATE_KEY }} + owner: ${{ steps.infra-repo.outputs.owner }} + repositories: ${{ steps.infra-repo.outputs.repo }} + + - name: Checkout don-infra + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + repository: ${{ env.INFRA_REPO }} + token: ${{ steps.app-token.outputs.token }} + + - name: Maak release branch aan in don-infra + id: branch + run: | + BRANCH="release/don-site-${{ github.sha }}" + echo "branch=$BRANCH" >> $GITHUB_OUTPUT + git checkout -b "$BRANCH" + + - name: Update image tag in prod overlay + run: | + KUSTOMIZATION_FILE="${{ env.KUSTOMIZE_PATH }}${{ env.DEPLOY_ENV }}/kustomization.yaml" + + yq e '(.images[] | select(.newName == "${{ env.IMAGE_NAME }}")).newTag = "${{ github.sha }}"' -i "$KUSTOMIZATION_FILE" + + - name: Commit en push release branch + run: | + KUSTOMIZATION_FILE="${{ env.KUSTOMIZE_PATH }}${{ env.DEPLOY_ENV }}/kustomization.yaml" + + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git add "$KUSTOMIZATION_FILE" + git commit -m "release: don-tools-api → ${{ github.sha }} + + Commit: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" + git push origin "${{ steps.branch.outputs.branch }}" + + - name: Maak PR aan in don-infra + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + gh pr create \ + --repo "${{ env.INFRA_REPO }}" \ + --base main \ + --head "${{ steps.branch.outputs.branch }}" \ + --title "Release: don-tools-api → ${GITHUB_SHA::7}" \ + --body "## don-tools-api productie deploy + + **Image:** \`${{ env.IMAGE_NAME }}:${{ github.sha }}\` + **Branch:** \`${{ github.ref_name }}\` + **Commit:** ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} + + Merge deze PR om de nieuwe versie naar productie te deployen." \ No newline at end of file diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 0000000..f8c50ce --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,116 @@ +name: Deploy to Test + +on: + workflow_dispatch: + push: + branches-ignore: + - main + +env: + IMAGE_NAME: ghcr.io/${{ github.repository }} + INFRA_REPO: ${{ vars.INFRA_REPO }} + KUSTOMIZE_PATH: ${{ vars.KUSTOMIZE_PATH }} + DEPLOY_ENV: test + +jobs: + check-keyword: + runs-on: ubuntu-latest + outputs: + deploy: ${{ steps.check.outputs.deploy }} + steps: + - name: Check commit message for deploy keyword + id: check + env: + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + run: | + # Keyword: [deploy-test] anywhere in de commit message + # Voorbeeld: "feat: nieuwe feature [deploy-test]" + if echo "$COMMIT_MESSAGE" | grep -qi "\[deploy-test\]"; then + echo "deploy=true" >> $GITHUB_OUTPUT + echo "Deploy keyword gevonden in commit message." + else + echo "deploy=false" >> $GITHUB_OUTPUT + echo "Geen deploy keyword gevonden, sla deploy over." + fi + + build-and-push: + needs: check-keyword + if: | + needs.check-keyword.outputs.deploy == 'true' + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd + + - name: Login to container registry + uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 + with: + context: . + push: true + tags: | + ${{ env.IMAGE_NAME }}:test + ${{ env.IMAGE_NAME }}:${{ github.sha }} + + update-infra-test: + needs: build-and-push + runs-on: ubuntu-latest + steps: + - name: Parse infra repository + id: infra-repo + run: | + INFRA_REPO="${{ env.INFRA_REPO }}" + + if [[ -z "$INFRA_REPO" || "$INFRA_REPO" != */* ]]; then + echo "INFRA_REPO moet de vorm owner/repo hebben, huidige waarde: '$INFRA_REPO'" >&2 + exit 1 + fi + + echo "owner=${INFRA_REPO%%/*}" >> "$GITHUB_OUTPUT" + echo "repo=${INFRA_REPO#*/}" >> "$GITHUB_OUTPUT" + + - name: Genereer app token (Release proces app) + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 + with: + app-id: ${{ secrets.RELEASE_PROCES_APP_ID }} + private-key: ${{ secrets.RELEASE_PROCES_APP_PRIVATE_KEY }} + owner: ${{ steps.infra-repo.outputs.owner }} + repositories: ${{ steps.infra-repo.outputs.repo }} + + - name: Checkout don-infra + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + repository: ${{ env.INFRA_REPO }} + token: ${{ steps.app-token.outputs.token }} + + - name: Update image tag in test overlay + run: | + KUSTOMIZATION_FILE="${{ env.KUSTOMIZE_PATH }}${{ env.DEPLOY_ENV }}/kustomization.yaml" + + yq e '(.images[] | select(.newName == "${{ env.IMAGE_NAME }}")).newTag = "${{ github.sha }}"' -i "$KUSTOMIZATION_FILE" + + - name: Commit en push naar don-infra + run: | + KUSTOMIZATION_FILE="${{ env.KUSTOMIZE_PATH }}${{ env.DEPLOY_ENV }}/kustomization.yaml" + + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git add "$KUSTOMIZATION_FILE" + git commit -m "test: don-tools-api → ${{ github.sha }} + + Branch: ${{ github.ref_name }} + Commit: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" + git push \ No newline at end of file From e94660995a73d3e7a6043442368cf1a1ada613c9 Mon Sep 17 00:00:00 2001 From: pasibun Date: Thu, 30 Apr 2026 08:41:03 +0200 Subject: [PATCH 5/7] [deploy-test] --- api/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/openapi.json b/api/openapi.json index 47a87f3..02ca14c 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -17,7 +17,7 @@ }, { "description": "Test", - "url": "https://api.don.apps.digilab.network/tools/v1" + "url": "https://api.don.projects.digilab.network/tools/v1" } ], "tags": [ From 247f9aead99764d31b061cd3d5bfd39e32b52a77 Mon Sep 17 00:00:00 2001 From: pasibun Date: Thu, 30 Apr 2026 08:50:18 +0200 Subject: [PATCH 6/7] [deploy-test] --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 3a64951..5d3f7f4 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,6 @@ "lint": "biome lint .", "format": "biome format --write ." }, - "keywords": [ - "openapi-generator", - "openapi" - ], "license": "EUPL-1.2", "private": true, "dependencies": { From 8ed4357833a0cbdf8f0c33493fd01cc2ef22c521 Mon Sep 17 00:00:00 2001 From: pasibun Date: Thu, 30 Apr 2026 12:44:11 +0200 Subject: [PATCH 7/7] [deploy-test] --- services/OasValidatorService.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/OasValidatorService.js b/services/OasValidatorService.js index bd30578..7255c45 100644 --- a/services/OasValidatorService.js +++ b/services/OasValidatorService.js @@ -202,6 +202,9 @@ const resolveValidationSettings = (input) => ({ const validate = async (input) => { const { contents, source } = await resolveSpecificationInput(input); const { rulesetVersion } = resolveValidationSettings(input); + logger.info( + `[OasValidatorService] validate using ADR ruleset ${rulesetVersion} (targetVersion=${input?.targetVersion || "default"}, source=${source})`, + ); const spectral = await loadSpectral(rulesetVersion); const document = new Document(contents, Parsers.Yaml, source); const parseDiagnostics = Array.isArray(document.diagnostics) ? document.diagnostics : [];