diff --git a/.changeset/silent-balloons-add.md b/.changeset/silent-balloons-add.md new file mode 100644 index 00000000..1d5a5c16 --- /dev/null +++ b/.changeset/silent-balloons-add.md @@ -0,0 +1,5 @@ +--- +"@redocly/openapi-core": patch +--- + +Updated @redocly/config to v0.9.0. diff --git a/__tests__/lint-config/config-structure/.redocly.yaml b/__tests__/lint-config/config-structure/.redocly.yaml index 8f75b571..8ef8d9a4 100644 --- a/__tests__/lint-config/config-structure/.redocly.yaml +++ b/__tests__/lint-config/config-structure/.redocly.yaml @@ -114,7 +114,7 @@ developerOnboarding: # serviceAccountPrivateKey: Must be reported as a missing required prop serviceAccountEmail: 789 # Must be a string -i18n: +l10n: defaultLocale: en-US locales: - code: 123 # Must be a string @@ -191,18 +191,14 @@ theme: graphql: pagination: section menu: - { - initialLoadState: 'default', - requireExactGroups: false, - groups: - [ - { - name: 'GraphQL custom group', - directives: { includeByName: ['cacheControl', 'typeDirective'] }, - }, - ], - otherItemsGroupName: 'Other', - } + requireExactGroups: false + groups: + - name: 'GraphQL custom group' + directives: + includeByName: + - cacheControl + - typeDirective + otherItemsGroupName: 'Other' sidebar: separatorLine: true linePosition: top diff --git a/__tests__/lint-config/config-structure/snapshot.js b/__tests__/lint-config/config-structure/snapshot.js index a289a29f..02cb896d 100644 --- a/__tests__/lint-config/config-structure/snapshot.js +++ b/__tests__/lint-config/config-structure/snapshot.js @@ -528,12 +528,12 @@ Expected type \`string\` but got \`integer\`. 115 | serviceAccountEmail: 789 # Must be a string | ^^^ 116 | -117 | i18n: +117 | l10n: Error was generated by the configuration spec rule. -[38] .redocly.yaml:120:13 at #/i18n/locales/0/code +[38] .redocly.yaml:120:13 at #/l10n/locales/0/code Expected type \`string\` but got \`integer\`. diff --git a/__tests__/lint/deprecated-apiDefinitions/snapshot.js b/__tests__/lint/deprecated-apiDefinitions/snapshot.js index be7a7208..7203139a 100644 --- a/__tests__/lint/deprecated-apiDefinitions/snapshot.js +++ b/__tests__/lint/deprecated-apiDefinitions/snapshot.js @@ -20,7 +20,9 @@ Warning was generated by the configuration spec rule. Property \`lint\` is not expected here. -Did you mean: env ? +Did you mean: + - l10n + - env 2 | main: ./openapi.yaml 3 | diff --git a/__tests__/lint/deprecated-lint/snapshot.js b/__tests__/lint/deprecated-lint/snapshot.js index 570aa4ea..95abd4e2 100644 --- a/__tests__/lint/deprecated-lint/snapshot.js +++ b/__tests__/lint/deprecated-lint/snapshot.js @@ -7,7 +7,9 @@ The 'lint' field is deprecated. Read more about this change: https://redocly.com Property \`lint\` is not expected here. -Did you mean: env ? +Did you mean: + - l10n + - env 6 | operation-4xx-response: error 7 | diff --git a/jest.config.js b/jest.config.js index 1f73e377..c7d907be 100644 --- a/jest.config.js +++ b/jest.config.js @@ -19,7 +19,7 @@ module.exports = { }, 'packages/cli/': { statements: 60, - branches: 50, + branches: 49, functions: 60, lines: 60, }, diff --git a/package-lock.json b/package-lock.json index bcc0a357..df4935a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3525,9 +3525,9 @@ "link": true }, "node_modules/@redocly/config": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.7.0.tgz", - "integrity": "sha512-6GKxTo/9df0654Mtivvr4lQnMOp+pRj9neVywmI5+BwfZLTtkJnj2qB3D6d8FHTr4apsNOf6zTa5FojX0Evh4g==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.9.0.tgz", + "integrity": "sha512-rRd0pSiPC68AQGud2VbrHqUov1VHospfcYE2pFYmGYfZhzZfHBSiVaeiTY+CZmrhf5RB9aVdOHRCm25Vb6GFkQ==" }, "node_modules/@redocly/openapi-core": { "resolved": "packages/core", @@ -13814,7 +13814,7 @@ "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.7.0", + "@redocly/config": "^0.9.0", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", @@ -16516,15 +16516,15 @@ } }, "@redocly/config": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.7.0.tgz", - "integrity": "sha512-6GKxTo/9df0654Mtivvr4lQnMOp+pRj9neVywmI5+BwfZLTtkJnj2qB3D6d8FHTr4apsNOf6zTa5FojX0Evh4g==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.9.0.tgz", + "integrity": "sha512-rRd0pSiPC68AQGud2VbrHqUov1VHospfcYE2pFYmGYfZhzZfHBSiVaeiTY+CZmrhf5RB9aVdOHRCm25Vb6GFkQ==" }, "@redocly/openapi-core": { "version": "file:packages/core", "requires": { "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.7.0", + "@redocly/config": "^0.9.0", "@types/js-levenshtein": "^1.1.0", "@types/js-yaml": "^4.0.3", "@types/lodash.isequal": "^4.5.5", diff --git a/packages/core/package.json b/packages/core/package.json index 0710f22d..c4b5c3f9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,7 @@ ], "dependencies": { "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.7.0", + "@redocly/config": "^0.9.0", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", diff --git a/packages/core/src/__tests__/lint.test.ts b/packages/core/src/__tests__/lint.test.ts index 9784c16d..b190e0a6 100644 --- a/packages/core/src/__tests__/lint.test.ts +++ b/packages/core/src/__tests__/lint.test.ts @@ -127,7 +127,7 @@ const testPortalConfig = parseYamlToDocument( # serviceAccountPrivateKey: Must be reported as a missing required prop serviceAccountEmail: 789 # Must be a string - i18n: + l10n: defaultLocale: en-US locales: - code: 123 # Must be a string @@ -201,18 +201,14 @@ const testPortalConfig = parseYamlToDocument( graphql: pagination: section menu: - { - initialLoadState: 'default', - requireExactGroups: false, - groups: - [ - { - name: 'GraphQL custom group', - directives: { includeByName: ['cacheControl', 'typeDirective'] }, - }, - ], - otherItemsGroupName: 'Other', - } + requireExactGroups: false + groups: + - name: 'GraphQL custom group' + directives: + includeByName: + - cacheControl + - typeDirective + otherItemsGroupName: 'Other' sidebar: separatorLine: true linePosition: top @@ -1048,7 +1044,7 @@ describe('lint', () => { "from": undefined, "location": [ { - "pointer": "#/i18n/locales/0/code", + "pointer": "#/l10n/locales/0/code", "reportOnKey": false, "source": "", }, @@ -1252,12 +1248,12 @@ describe('lint', () => { "from": undefined, "location": [ { - "pointer": "#/i18n", + "pointer": "#/l10n", "reportOnKey": true, "source": "", }, ], - "message": "Property \`i18n\` is not expected here.", + "message": "Property \`l10n\` is not expected here.", "ruleId": "configuration spec", "severity": "error", "suggest": [],