mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-07 20:57:49 +00:00
feat: core: validate to lint (#226)
* feat: core: validate to lint * fix: cleanup dependencies * feat: validate as lint
This commit is contained in:
231
package-lock.json
generated
231
package-lock.json
generated
@@ -39,19 +39,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz",
|
||||
"integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz",
|
||||
"integrity": "sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-module-transforms": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.1",
|
||||
"@babel/parser": "^7.12.3",
|
||||
"@babel/template": "^7.10.4",
|
||||
"@babel/traverse": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.5",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/template": "^7.12.7",
|
||||
"@babel/traverse": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"convert-source-map": "^1.7.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.1",
|
||||
@@ -119,12 +119,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-member-expression-to-functions": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz",
|
||||
"integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz",
|
||||
"integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.12.1"
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-imports": {
|
||||
@@ -154,12 +154,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-optimise-call-expression": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
|
||||
"integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz",
|
||||
"integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.10.4"
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-plugin-utils": {
|
||||
@@ -298,9 +298,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz",
|
||||
"integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@@ -454,37 +454,37 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
|
||||
"integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
|
||||
"integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/parser": "^7.10.4",
|
||||
"@babel/types": "^7.10.4"
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz",
|
||||
"integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz",
|
||||
"integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-function-name": "^7.10.4",
|
||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||
"@babel/parser": "^7.12.5",
|
||||
"@babel/types": "^7.12.5",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.12.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz",
|
||||
"integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -940,9 +940,9 @@
|
||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "14.14.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.7.tgz",
|
||||
"integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg=="
|
||||
"version": "14.14.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz",
|
||||
"integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw=="
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
"version": "2.5.7",
|
||||
@@ -987,9 +987,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/yargs": {
|
||||
"version": "15.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz",
|
||||
"integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==",
|
||||
"version": "15.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz",
|
||||
"integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/yargs-parser": "*"
|
||||
@@ -2485,9 +2485,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
@@ -5868,12 +5868,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/p-each-series": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz",
|
||||
"integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz",
|
||||
"integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-finally": {
|
||||
@@ -6114,9 +6117,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/portfinder/node_modules/debug": {
|
||||
"version": "3.2.6",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
@@ -6151,9 +6154,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
|
||||
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz",
|
||||
"integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
@@ -6310,9 +6313,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.0.tgz",
|
||||
"integrity": "sha512-J95OVUiS4b8qqmpqhCodN8yPpHG2mpZUPQ8tDGyIY0VhM+kBHszOuvsMJVGNQ1OH2BnTFbqz45i+2jGpDw9H0w==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.1.tgz",
|
||||
"integrity": "sha512-MXDP6d9DIR+7/Tf2vxfB0Qacg9uRs6bQaWwT1RieFIMQVXDsbJ/+AZOI7tHTrzY+f0VsvSM5qQyh/orfZwOVzw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
@@ -8330,9 +8333,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/uglify-js": {
|
||||
"version": "3.11.6",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.6.tgz",
|
||||
"integrity": "sha512-oASI1FOJ7BBFkSCNDZ446EgkSuHkOZBuqRFrwXIKWCoXw8ZXQETooTQjkAcBS03Acab7ubCKsXnwuV2svy061g==",
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.0.tgz",
|
||||
"integrity": "sha512-8lBMSkFZuAK7gGF8LswsXmir8eX8d2AAMOnxSDWjKBx/fBR6MypQjs78m6ML9zQVp1/hD4TBdfeMZMC7nW1TAA==",
|
||||
"extraneous": true,
|
||||
"bin": {
|
||||
"uglifyjs": "bin/uglifyjs"
|
||||
@@ -9836,19 +9839,19 @@
|
||||
}
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz",
|
||||
"integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz",
|
||||
"integrity": "sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-module-transforms": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.1",
|
||||
"@babel/parser": "^7.12.3",
|
||||
"@babel/template": "^7.10.4",
|
||||
"@babel/traverse": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.5",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/template": "^7.12.7",
|
||||
"@babel/traverse": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"convert-source-map": "^1.7.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.1",
|
||||
@@ -9907,12 +9910,12 @@
|
||||
}
|
||||
},
|
||||
"@babel/helper-member-expression-to-functions": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz",
|
||||
"integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz",
|
||||
"integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.12.1"
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"@babel/helper-module-imports": {
|
||||
@@ -9942,12 +9945,12 @@
|
||||
}
|
||||
},
|
||||
"@babel/helper-optimise-call-expression": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
|
||||
"integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz",
|
||||
"integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.10.4"
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"@babel/helper-plugin-utils": {
|
||||
@@ -10073,9 +10076,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz",
|
||||
"integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/plugin-syntax-async-generators": {
|
||||
@@ -10187,37 +10190,37 @@
|
||||
}
|
||||
},
|
||||
"@babel/template": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
|
||||
"integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
|
||||
"integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/parser": "^7.10.4",
|
||||
"@babel/types": "^7.10.4"
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz",
|
||||
"integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz",
|
||||
"integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-function-name": "^7.10.4",
|
||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||
"@babel/parser": "^7.12.5",
|
||||
"@babel/types": "^7.12.5",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.12.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz",
|
||||
"integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -10651,9 +10654,9 @@
|
||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.14.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.7.tgz",
|
||||
"integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg=="
|
||||
"version": "14.14.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz",
|
||||
"integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw=="
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
"version": "2.5.7",
|
||||
@@ -10697,9 +10700,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/yargs": {
|
||||
"version": "15.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz",
|
||||
"integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==",
|
||||
"version": "15.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz",
|
||||
"integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/yargs-parser": "*"
|
||||
@@ -11980,9 +11983,9 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
@@ -14649,9 +14652,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"p-each-series": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz",
|
||||
"integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz",
|
||||
"integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==",
|
||||
"dev": true
|
||||
},
|
||||
"p-finally": {
|
||||
@@ -14835,9 +14838,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "3.2.6",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
@@ -14865,9 +14868,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
|
||||
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz",
|
||||
"integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==",
|
||||
"dev": true
|
||||
},
|
||||
"pretty-format": {
|
||||
@@ -15001,9 +15004,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"queue-microtask": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.0.tgz",
|
||||
"integrity": "sha512-J95OVUiS4b8qqmpqhCodN8yPpHG2mpZUPQ8tDGyIY0VhM+kBHszOuvsMJVGNQ1OH2BnTFbqz45i+2jGpDw9H0w=="
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.1.tgz",
|
||||
"integrity": "sha512-MXDP6d9DIR+7/Tf2vxfB0Qacg9uRs6bQaWwT1RieFIMQVXDsbJ/+AZOI7tHTrzY+f0VsvSM5qQyh/orfZwOVzw=="
|
||||
},
|
||||
"randombytes": {
|
||||
"version": "2.1.0",
|
||||
@@ -16601,9 +16604,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.11.6",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.6.tgz",
|
||||
"integrity": "sha512-oASI1FOJ7BBFkSCNDZ446EgkSuHkOZBuqRFrwXIKWCoXw8ZXQETooTQjkAcBS03Acab7ubCKsXnwuV2svy061g==",
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.0.tgz",
|
||||
"integrity": "sha512-8lBMSkFZuAK7gGF8LswsXmir8eX8d2AAMOnxSDWjKBx/fBR6MypQjs78m6ML9zQVp1/hD4TBdfeMZMC7nW1TAA==",
|
||||
"extraneous": true
|
||||
},
|
||||
"union-value": {
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
Oas3Tag,
|
||||
loadConfig,
|
||||
formatProblems,
|
||||
validateDocument,
|
||||
detectOpenAPI
|
||||
lintDocument,
|
||||
detectOpenAPI,
|
||||
} from '@redocly/openapi-core';
|
||||
|
||||
import {
|
||||
@@ -423,7 +423,7 @@ function getInfoPrefix(info: any, prefixArg: string | undefined, type: string) {
|
||||
|
||||
async function validateEntrypoint(document: Document, config: LintConfig, externalRefResolver: BaseResolver, packageVersion: string) {
|
||||
try {
|
||||
const results = await validateDocument({ document, config, externalRefResolver });
|
||||
const results = await lintDocument({ document, config, externalRefResolver });
|
||||
const fileTotals = getTotals(results);
|
||||
formatProblems(results, { format: 'stylish', totals: fileTotals, version: packageVersion });
|
||||
printLintTotals(fileTotals, 2);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Config, formatProblems, loadConfig, OutputFormat, validate } from '@redocly/openapi-core';
|
||||
import { Config, formatProblems, lint, loadConfig, OutputFormat } from '@redocly/openapi-core';
|
||||
import {
|
||||
getExecutionTime,
|
||||
getFallbackEntryPointsOrExit,
|
||||
@@ -44,7 +44,7 @@ export async function handleLint (argv: {
|
||||
try {
|
||||
const startedAt = performance.now();
|
||||
process.stderr.write(gray(`validating ${entryPoint}...\n`));
|
||||
const results = await validate({
|
||||
const results = await lint({
|
||||
ref: entryPoint,
|
||||
config,
|
||||
});
|
||||
@@ -87,5 +87,4 @@ export async function handleLint (argv: {
|
||||
|
||||
printUnusedWarnings(config.lint);
|
||||
process.exit(totals.errors === 0 || argv['generate-ignore-file'] ? 0 : 1);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { normalizeVisitors, VisitorLevelContext } from '../src/visitors';
|
||||
import { Oas3RuleSet } from '../src/validate';
|
||||
import { Oas3RuleSet } from '../src/lint';
|
||||
import { Oas3Types } from '../src/types/oas3';
|
||||
import { normalizeTypes } from '../src/types';
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import outdent from 'outdent';
|
||||
|
||||
import { parseYamlToDocument } from './utils';
|
||||
import { parseRef } from '../src/ref-utils';
|
||||
import { validateDocument } from '../src/validate';
|
||||
import { lintDocument } from '../src/lint';
|
||||
import { LintConfig } from '../src/config/config';
|
||||
import { BaseResolver } from '../src/resolve';
|
||||
|
||||
@@ -88,7 +87,7 @@ describe('ref-utils', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
const result = await validateDocument({
|
||||
const result = await lintDocument({
|
||||
document,
|
||||
externalRefResolver: new BaseResolver(),
|
||||
config: new LintConfig({}),
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as path from 'path';
|
||||
import { Document, Source } from '../src/resolve';
|
||||
import { NormalizedProblem } from '../src/walk';
|
||||
import { RuleConfig, LintConfig, Plugin } from '../src/config/config';
|
||||
import { Oas3RuleSet } from '../src/validate';
|
||||
import { Oas3RuleSet } from '../src/lint';
|
||||
|
||||
export function parseYamlToDocument(body: string, absoluteRef: string = ''): Document {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import outdent from 'outdent';
|
||||
import * as path from 'path';
|
||||
|
||||
import { validateDocument, Oas3RuleSet } from '../src/validate';
|
||||
import { lintDocument, Oas3RuleSet } from '../src/lint';
|
||||
|
||||
import { parseYamlToDocument, replaceSourceWithRef, makeConfigForRuleset } from './utils';
|
||||
import { BaseResolver, Document } from '../src/resolve';
|
||||
@@ -44,7 +44,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -111,7 +111,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -196,7 +196,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -268,7 +268,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -340,7 +340,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -407,7 +407,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -461,7 +461,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -517,7 +517,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -559,7 +559,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -614,7 +614,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -700,7 +700,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -779,7 +779,7 @@ describe('walk order', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -851,7 +851,7 @@ describe('walk order', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -895,7 +895,7 @@ describe('walk order', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -960,7 +960,7 @@ describe('walk order', () => {
|
||||
'',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -1048,7 +1048,7 @@ describe('context.report', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -1128,7 +1128,7 @@ describe('context.report', () => {
|
||||
throw 'Should never happen';
|
||||
}
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -1236,7 +1236,7 @@ describe('context.resolve', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet),
|
||||
@@ -1282,7 +1282,7 @@ describe('type extensions', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
await validateDocument({
|
||||
await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: makeConfigForRuleset(testRuleSet, {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument, makeConfigForRuleset } from '../utils';
|
||||
|
||||
@@ -27,7 +27,7 @@ for (let i = 0; i < 50; i++) {
|
||||
|
||||
const config = makeConfigForRuleset(ruleset);
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config,
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument, makeConfigForRuleset } from '../utils';
|
||||
|
||||
@@ -31,7 +31,7 @@ const visitor = {
|
||||
};
|
||||
const config = makeConfigForRuleset(visitor);
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config,
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument, makeConfigForRuleset } from '../utils';
|
||||
export const name = 'Validate with no rules';
|
||||
@@ -12,7 +12,7 @@ const rebillyDocument = parseYamlToDocument(
|
||||
);
|
||||
const config = makeConfigForRuleset({});
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config,
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument, makeConfigForRuleset } from '../utils';
|
||||
|
||||
@@ -28,7 +28,7 @@ const config = makeConfigForRuleset({
|
||||
});
|
||||
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config,
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument, makeConfigForRuleset } from '../utils';
|
||||
export const name = 'Validate with single top-level rule';
|
||||
@@ -24,7 +24,7 @@ const config = makeConfigForRuleset({
|
||||
});
|
||||
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config,
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join as pathJoin, resolve as pathResolve } from 'path';
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { LintConfig } from '../../config/config';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
import { parseYamlToDocument } from '../utils';
|
||||
@@ -14,7 +14,7 @@ const rebillyDocument = parseYamlToDocument(
|
||||
);
|
||||
|
||||
export function measureAsync() {
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document: rebillyDocument,
|
||||
config: new LintConfig({}),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as yaml from 'js-yaml';
|
||||
import { Document, Source } from '../resolve';
|
||||
import { Oas3RuleSet } from '../validate';
|
||||
import { Oas3RuleSet } from '../lint';
|
||||
import { RuleConfig, LintConfig, Plugin } from '../config/config';
|
||||
|
||||
export function parseYamlToDocument(body: string, absoluteRef: string = ''): Document {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Oas3Types } from './types/oas3';
|
||||
import { Oas2Types } from './types/oas2';
|
||||
import { NormalizedNodeType, normalizeTypes, NodeType } from './types';
|
||||
import { WalkContext, walkDocument, UserContext } from './walk';
|
||||
import { detectOpenAPI, openAPIMajor, OasMajorVersion } from './validate';
|
||||
import { detectOpenAPI, openAPIMajor, OasMajorVersion } from './lint';
|
||||
import { Location, refBaseName } from './ref-utils';
|
||||
import { Config, LintConfig } from './config/config';
|
||||
import { initRules } from './config/rules';
|
||||
|
||||
@@ -15,10 +15,10 @@ import {
|
||||
Oas2RuleSet,
|
||||
Oas2PreprocessorsSet,
|
||||
Oas2DecoratorsSet,
|
||||
} from '../validate';
|
||||
} from '../lint';
|
||||
|
||||
import { ProblemSeverity, NormalizedProblem } from '../walk';
|
||||
import { Oas3RuleSet } from '../validate';
|
||||
import { Oas3RuleSet } from '../lint';
|
||||
|
||||
import recommended from './recommended';
|
||||
import { NodeType } from '../types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RuleSet, OasVersion } from '../validate';
|
||||
import { RuleSet, OasVersion } from '../lint';
|
||||
import { LintConfig } from './config';
|
||||
import { notUndefined } from '../utils';
|
||||
|
||||
|
||||
@@ -11,11 +11,10 @@ export { loadConfig, Config, LintConfig } from './config/config';
|
||||
export { RedoclyClient } from './redocly';
|
||||
export { BaseResolver, Document, resolveDocument, ResolveError, YamlParseError } from './resolve';
|
||||
export { unescapePointer } from './ref-utils';
|
||||
export { detectOpenAPI, OasMajorVersion, openAPIMajor } from './validate';
|
||||
export { detectOpenAPI, OasMajorVersion, openAPIMajor } from './lint';
|
||||
export { normalizeVisitors } from './visitors';
|
||||
export { WalkContext, walkDocument, NormalizedProblem, ProblemSeverity, LineColLocationObject, LocationObject, Loc } from './walk';
|
||||
|
||||
export { formatProblems, OutputFormat } from './format/format';
|
||||
|
||||
export { OasVersion, validate, validateDocument } from './validate';
|
||||
export { OasVersion, lint, lint as validate, lintDocument } from './lint';
|
||||
export { bundle } from './bundle';
|
||||
|
||||
@@ -33,14 +33,14 @@ export type Oas2PreprocessorsSet = Record<string, Oas2Preprocessor>;
|
||||
export type Oas3DecoratorsSet = Record<string, Oas3Preprocessor>;
|
||||
export type Oas2DecoratorsSet = Record<string, Oas2Preprocessor>;
|
||||
|
||||
export async function validate(opts: {
|
||||
export async function lint(opts: {
|
||||
ref: string;
|
||||
config: Config;
|
||||
externalRefResolver?: BaseResolver;
|
||||
}) {
|
||||
const { ref, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts;
|
||||
const document = (await externalRefResolver.resolveDocument(null, ref)) as Document;
|
||||
return validateDocument({
|
||||
return lintDocument({
|
||||
document,
|
||||
...opts,
|
||||
externalRefResolver,
|
||||
@@ -48,7 +48,7 @@ export async function validate(opts: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function validateDocument(opts: {
|
||||
export async function lintDocument(opts: {
|
||||
document: Document;
|
||||
config: LintConfig;
|
||||
customTypes?: Record<string, NodeType>;
|
||||
@@ -1,7 +1,7 @@
|
||||
import path = require('path');
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { validateDocument } from '../../validate';
|
||||
import { lintDocument } from '../../lint';
|
||||
import { LintConfig } from '../..';
|
||||
import { BaseResolver } from '../../resolve';
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
path.join(__dirname, 'foobar.yaml'),
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -64,7 +64,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
path.join(__dirname, 'foobar.yaml'),
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -124,7 +124,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
path.join(__dirname, 'foobar.yaml'),
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -151,7 +151,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
path.join(__dirname, 'foobar.yaml'),
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { LintConfig } from '../../../config/config';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
@@ -16,7 +15,7 @@ describe('Oas3 info-description', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -57,7 +56,7 @@ describe('Oas3 info-description', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -97,7 +96,7 @@ describe('Oas3 info-description', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -17,7 +15,7 @@ describe('Oas3 info-license', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'info-license': 'error' } }),
|
||||
@@ -54,7 +52,7 @@ describe('Oas3 info-license', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'info-license': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -18,7 +16,7 @@ describe('Oas3 license-url', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'info-license-url': 'error' } }),
|
||||
@@ -55,7 +53,7 @@ describe('Oas3 license-url', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'info-license-url': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -46,7 +44,7 @@ describe('no-ambiguous-paths', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-ambiguous-paths': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -29,7 +27,7 @@ describe('Oas3 typed enum', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-enum-type-mismatch': 'error' } }),
|
||||
@@ -59,7 +57,7 @@ describe('Oas3 typed enum', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-enum-type-mismatch': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -34,7 +32,7 @@ describe('no-identical-paths', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-identical-paths': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -19,7 +17,7 @@ describe('no-path-trailing-slash', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }),
|
||||
@@ -56,7 +54,7 @@ describe('no-path-trailing-slash', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }),
|
||||
@@ -77,7 +75,7 @@ describe('no-path-trailing-slash', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -21,7 +19,7 @@ describe('Oas3 operation-2xx-response', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }),
|
||||
@@ -60,7 +58,7 @@ describe('Oas3 operation-2xx-response', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }),
|
||||
@@ -83,7 +81,7 @@ describe('Oas3 operation-2xx-response', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -26,7 +24,7 @@ describe('Oas3 operation-operationId-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-operationId-unique': 'error' } }),
|
||||
@@ -68,7 +66,7 @@ describe('Oas3 operation-operationId-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'peration-operationId-unique': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -21,7 +19,7 @@ describe('Oas3 operation-operationId-url-safe', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -22,7 +20,7 @@ describe('Oas3 operation-parameters-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -68,7 +66,7 @@ describe('Oas3 operation-parameters-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -101,7 +99,7 @@ describe('Oas3 operation-parameters-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -152,7 +150,7 @@ describe('Oas3 operation-parameters-unique', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -19,7 +17,7 @@ describe('Oas3 operation-security-defined', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-security-defined': 'error' } }),
|
||||
@@ -61,7 +59,7 @@ describe('Oas3 operation-security-defined', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-security-defined': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -24,7 +22,7 @@ describe('Oas3 operation-singular-tag', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-singular-tag': 'error' } }),
|
||||
@@ -64,7 +62,7 @@ describe('Oas3 operation-singular-tag', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'operation-singular-tag': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -23,7 +21,7 @@ describe('Common path-http-verbs-order', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-http-verbs-order': 'error' } }),
|
||||
@@ -87,7 +85,7 @@ describe('Common path-http-verbs-order', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-http-verbs-order': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -19,7 +17,7 @@ describe('Oas3 path-not-include-query', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-not-include-query': 'error' } }),
|
||||
@@ -56,7 +54,7 @@ describe('Oas3 path-not-include-query', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-not-include-query': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -24,7 +22,7 @@ describe('Oas3 path-params-defined', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }),
|
||||
@@ -52,7 +50,7 @@ describe('Oas3 path-params-defined', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }),
|
||||
@@ -96,7 +94,7 @@ describe('Oas3 path-params-defined', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -22,7 +20,7 @@ describe('Oas3 paths-kebab-case', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'paths-kebab-case': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -19,7 +17,7 @@ describe('Oas3 tag-description', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'tag-description': 'error' } }),
|
||||
@@ -57,7 +55,7 @@ describe('Oas3 tag-description', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'tag-description': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -19,7 +17,7 @@ describe('Oas3 tags-alphabetical', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'tags-alphabetical': 'error' } }),
|
||||
@@ -56,7 +54,7 @@ describe('Oas3 tags-alphabetical', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'tags-alphabetical': 'error' } }),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { LintConfig } from '../../..';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -20,7 +19,7 @@ describe('oas2 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }),
|
||||
@@ -72,7 +71,7 @@ describe('oas2 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }),
|
||||
@@ -96,7 +95,7 @@ describe('oas2 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { outdent } from 'outdent';
|
||||
import { validateDoc } from './utils';
|
||||
import { lintDoc } from './utils';
|
||||
|
||||
describe('OpenAPI Schema 2.0', () => {
|
||||
it('should report if the title of the API is empty ', async () => {
|
||||
@@ -18,7 +18,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -48,7 +48,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -78,7 +78,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -112,7 +112,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -138,7 +138,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -171,7 +171,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -203,7 +203,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -227,7 +227,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -259,7 +259,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -290,7 +290,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -311,7 +311,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -340,7 +340,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { outdent } from 'outdent';
|
||||
import { validateDoc } from './utils';
|
||||
import { lintDoc } from './utils';
|
||||
|
||||
describe('OpenAPI Schema 2.0', () => {
|
||||
it('should not report of a valid GET operation object', async () => {
|
||||
@@ -18,7 +18,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -45,7 +45,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -79,7 +79,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -115,7 +115,7 @@ describe('OpenAPI Schema 2.0', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { outdent } from 'outdent';
|
||||
import { validateDoc } from './utils';
|
||||
import { lintDoc } from './utils';
|
||||
|
||||
describe('OpenAPI Schema', () => {
|
||||
it('should not report if Path object is valid ', async () => {
|
||||
@@ -18,7 +18,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -35,7 +35,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -50,7 +50,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -74,7 +74,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -97,7 +97,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
@@ -131,7 +131,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
'paths-identical': 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -158,7 +158,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -185,7 +185,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -203,7 +203,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
@@ -237,7 +237,7 @@ describe('OpenAPI Schema', () => {
|
||||
`;
|
||||
|
||||
expect(
|
||||
await validateDoc(source, {
|
||||
await lintDoc(source, {
|
||||
spec: 'error',
|
||||
}),
|
||||
).toMatchInlineSnapshot(`Array []`);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils';
|
||||
|
||||
import { validateDocument } from '../../../../validate';
|
||||
import { lintDocument } from '../../../../lint';
|
||||
import { LintConfig } from '../../../..';
|
||||
import { BaseResolver } from '../../../../resolve';
|
||||
|
||||
@@ -21,7 +19,7 @@ describe('Referenceable scalars', () => {
|
||||
__dirname + '/foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { LintConfig, RuleConfig } from '../../../../config/config';
|
||||
import { parseYamlToDocument } from '../../../../../__tests__/utils';
|
||||
import { validateDocument } from '../../../../validate';
|
||||
import { lintDocument } from '../../../../lint';
|
||||
import { BaseResolver } from '../../../../resolve';
|
||||
|
||||
export async function validateDoc(
|
||||
export async function lintDoc(
|
||||
source: string,
|
||||
rules: Record<string, RuleConfig> = { spec: 'error' },
|
||||
) {
|
||||
const document = parseYamlToDocument(source, 'foobar.yaml');
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { LintConfig } from '../../..';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -21,7 +20,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }),
|
||||
@@ -73,7 +72,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }),
|
||||
@@ -97,7 +96,7 @@ describe('oas3 boolean-parameter-prefixes', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -20,7 +18,7 @@ describe('Oas3 oas3-no-example-value-and-externalValue', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -60,7 +58,7 @@ describe('Oas3 oas3-no-example-value-and-externalValue', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -33,7 +31,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }),
|
||||
@@ -106,7 +104,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -169,7 +167,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -222,7 +220,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
@@ -278,7 +276,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }),
|
||||
@@ -310,7 +308,7 @@ describe('no-invalid-media-type-examples', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -17,7 +15,7 @@ describe('Oas3 oas3-no-server-example.com', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-server-example.com': 'error' } }),
|
||||
@@ -52,7 +50,7 @@ describe('Oas3 oas3-no-server-example.com', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-server-example.com': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -17,7 +15,7 @@ describe('Oas3 oas3-no-server-trailing-slash', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-server-trailing-slash': 'error' } }),
|
||||
@@ -52,7 +50,7 @@ describe('Oas3 oas3-no-server-trailing-slash', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-server-trailing-slash': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { LintConfig } from '../../../config/config';
|
||||
|
||||
import { validateDocument } from '../../../validate';
|
||||
import { lintDocument } from '../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils';
|
||||
import { BaseResolver } from '../../../resolve';
|
||||
|
||||
@@ -42,7 +40,7 @@ describe('Oas3 no-unused-components', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({ extends: [], rules: { 'no-unused-components': 'error' } }),
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils';
|
||||
|
||||
import { validateDocument } from '../../../../validate';
|
||||
import { lintDocument } from '../../../../lint';
|
||||
import { LintConfig } from '../../../..';
|
||||
import { BaseResolver } from '../../../../resolve';
|
||||
|
||||
@@ -21,7 +19,7 @@ describe('Referenceable scalars', () => {
|
||||
__dirname + '/foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { outdent } from 'outdent';
|
||||
|
||||
import { validateDocument } from '../../../../validate';
|
||||
import { lintDocument } from '../../../../lint';
|
||||
import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils';
|
||||
import { LintConfig } from '../../../../config/config';
|
||||
import { BaseResolver } from '../../../../resolve';
|
||||
@@ -37,7 +36,7 @@ describe('Oas3 Structural visitor basic', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: allConfig,
|
||||
@@ -165,7 +164,7 @@ describe('Oas3 Structural visitor basic', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: allConfig,
|
||||
@@ -234,7 +233,7 @@ describe('Oas3 Structural visitor basic', () => {
|
||||
'foobar.yaml',
|
||||
);
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: allConfig,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LintConfig, RuleConfig } from '../../../../config/config';
|
||||
import { parseYamlToDocument } from '../../../../../__tests__/utils';
|
||||
import { validateDocument } from '../../../../validate';
|
||||
import { lintDocument } from '../../../../lint';
|
||||
import { BaseResolver } from '../../../../resolve';
|
||||
|
||||
export async function validateDoc(
|
||||
@@ -9,7 +9,7 @@ export async function validateDoc(
|
||||
) {
|
||||
const document = parseYamlToDocument(source, 'foobar.yaml');
|
||||
|
||||
const results = await validateDocument({
|
||||
const results = await lintDocument({
|
||||
externalRefResolver: new BaseResolver(),
|
||||
document,
|
||||
config: new LintConfig({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Oas3RuleSet } from '../../validate';
|
||||
import { Oas3RuleSet } from '../../lint';
|
||||
|
||||
import { OasSpec } from '../common/spec';
|
||||
import { Operation2xxResponse } from '../common/operation-2xx-response';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
import { ResolvedRefMap, Document, ResolveError, YamlParseError, Source } from './resolve';
|
||||
import { pushStack, popStack } from './utils';
|
||||
import { OasVersion } from './validate';
|
||||
import { OasVersion } from './lint';
|
||||
import { NormalizedNodeType, isNamedType } from './types';
|
||||
|
||||
type NonUndefined = string | number | boolean | symbol | bigint | object | Record<string, any>;
|
||||
|
||||
Reference in New Issue
Block a user