mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [Update dependency @apidevtools/swagger-parser to ^10.1.1 (main) (#206562)](https://github.com/elastic/kibana/pull/206562) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"elastic-renovate-prod[bot]","email":"174716857+elastic-renovate-prod[bot]@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-01-14T13:53:54Z","message":"Update dependency @apidevtools/swagger-parser to ^10.1.1 (main) (#206562)\n\nCo-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>","sha":"5ad3ef7b0a76968a31b0824bd08f9132c374c841","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"title":"Update dependency @apidevtools/swagger-parser to ^10.1.1 (main)","number":206562,"url":"https://github.com/elastic/kibana/pull/206562","mergeCommit":{"message":"Update dependency @apidevtools/swagger-parser to ^10.1.1 (main) (#206562)\n\nCo-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>","sha":"5ad3ef7b0a76968a31b0824bd08f9132c374c841"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206562","number":206562,"mergeCommit":{"message":"Update dependency @apidevtools/swagger-parser to ^10.1.1 (main) (#206562)\n\nCo-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>","sha":"5ad3ef7b0a76968a31b0824bd08f9132c374c841"}}]}] BACKPORT--> --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cea24ebb5c
commit
438444d243
3 changed files with 25 additions and 28 deletions
|
@ -1298,7 +1298,7 @@
|
|||
"zod": "^3.22.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@apidevtools/swagger-parser": "^10.1.1",
|
||||
"@babel/cli": "^7.24.7",
|
||||
"@babel/core": "^7.24.7",
|
||||
"@babel/eslint-parser": "^7.24.7",
|
||||
|
|
|
@ -4,14 +4,20 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
|
||||
import SwaggerParser from '@apidevtools/swagger-parser';
|
||||
|
||||
// Validate the entrypoint.yaml file, sothe generated bundle will be correct.
|
||||
// Validate the entrypoint.yaml file, so the generated bundle will be correct.
|
||||
// https://github.com/APIDevTools/swagger-parser
|
||||
|
||||
const validateDocs = async (entrypointFile: string) => {
|
||||
try {
|
||||
await SwaggerParser.validate(entrypointFile);
|
||||
await SwaggerParser.validate(entrypointFile, {
|
||||
// For some reason, the internal resolver in the new version has a hard time identifying local files
|
||||
resolve: { file: { canRead: true } },
|
||||
});
|
||||
return 'Entrypoint is valid';
|
||||
} catch (err) {
|
||||
return err;
|
||||
|
@ -20,8 +26,8 @@ const validateDocs = async (entrypointFile: string) => {
|
|||
|
||||
describe('openApi', () => {
|
||||
it('Checks that entrypoint.yaml is valid', async () => {
|
||||
expect(
|
||||
await validateDocs('x-pack/platform/plugins/shared/fleet/common/openapi/entrypoint.yaml')
|
||||
).toEqual('Entrypoint is valid');
|
||||
expect(await validateDocs(`file://${resolve(__dirname, 'entrypoint.yaml')}`)).toEqual(
|
||||
'Entrypoint is valid'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
35
yarn.lock
35
yarn.lock
|
@ -71,16 +71,7 @@
|
|||
"@jridgewell/gen-mapping" "^0.1.0"
|
||||
"@jridgewell/trace-mapping" "^0.3.9"
|
||||
|
||||
"@apidevtools/json-schema-ref-parser@9.0.6":
|
||||
version "9.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz#5d9000a3ac1fd25404da886da6b266adcd99cf1c"
|
||||
integrity sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==
|
||||
dependencies:
|
||||
"@jsdevtools/ono" "^7.1.3"
|
||||
call-me-maybe "^1.0.1"
|
||||
js-yaml "^3.13.1"
|
||||
|
||||
"@apidevtools/json-schema-ref-parser@^11.5.5":
|
||||
"@apidevtools/json-schema-ref-parser@11.7.2", "@apidevtools/json-schema-ref-parser@^11.5.5":
|
||||
version "11.7.2"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.2.tgz#cdf3e0aded21492364a70e193b45b7cf4177f031"
|
||||
integrity sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==
|
||||
|
@ -121,18 +112,18 @@
|
|||
call-me-maybe "^1.0.1"
|
||||
z-schema "^5.0.1"
|
||||
|
||||
"@apidevtools/swagger-parser@^10.1.0":
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz#a987d71e5be61feb623203be0c96e5985b192ab6"
|
||||
integrity sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==
|
||||
"@apidevtools/swagger-parser@^10.1.1":
|
||||
version "10.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.1.1.tgz#e29bf17cf94b487a340e06784e9fbe20cb671c45"
|
||||
integrity sha512-u/kozRnsPO/x8QtKYJOqoGtC4kH6yg1lfYkB9Au0WhYB0FNLpyFusttQtvhlwjtG3rOwiRz4D8DnnXa8iEpIKA==
|
||||
dependencies:
|
||||
"@apidevtools/json-schema-ref-parser" "9.0.6"
|
||||
"@apidevtools/json-schema-ref-parser" "11.7.2"
|
||||
"@apidevtools/openapi-schemas" "^2.1.0"
|
||||
"@apidevtools/swagger-methods" "^3.0.2"
|
||||
"@jsdevtools/ono" "^7.1.3"
|
||||
ajv "^8.6.3"
|
||||
ajv "^8.17.1"
|
||||
ajv-draft-04 "^1.0.0"
|
||||
call-me-maybe "^1.0.1"
|
||||
call-me-maybe "^1.0.2"
|
||||
|
||||
"@appland/sql-parser@^1.5.1":
|
||||
version "1.5.1"
|
||||
|
@ -13426,7 +13417,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5:
|
|||
json-schema-traverse "^0.4.1"
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ajv@^8.0.0, ajv@^8.0.1, ajv@^8.17.1, ajv@^8.6.3, ajv@^8.8.0:
|
||||
ajv@^8.0.0, ajv@^8.0.1, ajv@^8.17.1, ajv@^8.8.0:
|
||||
version "8.17.1"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6"
|
||||
integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==
|
||||
|
@ -14992,10 +14983,10 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bin
|
|||
get-intrinsic "^1.2.4"
|
||||
set-function-length "^1.2.1"
|
||||
|
||||
call-me-maybe@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
|
||||
integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=
|
||||
call-me-maybe@^1.0.1, call-me-maybe@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa"
|
||||
integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==
|
||||
|
||||
callsites@^3.0.0, callsites@^3.1.0:
|
||||
version "3.1.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue