mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 12:47:48 +00:00
639 lines
15 KiB
JavaScript
639 lines
15 KiB
JavaScript
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`E2E lint-config test with option: { dirName: 'config-structure', option: 'error' } 1`] = `
|
|
|
|
[1] .redocly.yaml:1:13 at #/licenseKey
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
1 | licenseKey: 123 # Must be a string
|
|
| ^^^
|
|
2 |
|
|
3 | apis:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[2] .redocly.yaml:94:5 at #/sso/0
|
|
|
|
\`sso\` can be one of the following only: "REDOCLY", "CORPORATE", "GUEST".
|
|
|
|
92 |
|
|
93 | sso:
|
|
94 | - WRONG # Does not match allowed options
|
|
| ^^^^^
|
|
95 |
|
|
96 | developerOnboarding:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[3] .redocly.yaml:127:1 at #/not-listed-filed
|
|
|
|
Property \`not-listed-filed\` is not expected here.
|
|
|
|
125 | test: anything
|
|
126 |
|
|
127 | not-listed-filed: Must be reported as not expected
|
|
| ^^^^^^^^^^^^^^^^
|
|
128 |
|
|
129 | env:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[4] .redocly.yaml:156:1 at #/asyncapi
|
|
|
|
Property \`asyncapi\` is not expected here.
|
|
|
|
154 | altText: Test
|
|
155 | link: /
|
|
156 | asyncapi:
|
|
| ^^^^^^^^
|
|
157 | hideInfo: false
|
|
158 | expandSchemas:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[5] .redocly.yaml:19:5 at #/redirects/some-redirect/t1o
|
|
|
|
Property \`t1o\` is not expected here.
|
|
|
|
Did you mean:
|
|
- to
|
|
- type
|
|
|
|
17 | redirects:
|
|
18 | some-redirect:
|
|
19 | t1o: Wrong name, should be 'two'
|
|
| ^^^
|
|
20 | type: wrong type, must be a number
|
|
21 |
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[6] .redocly.yaml:20:11 at #/redirects/some-redirect/type
|
|
|
|
Expected type \`number\` but got \`string\`.
|
|
|
|
18 | some-redirect:
|
|
19 | t1o: Wrong name, should be 'two'
|
|
20 | type: wrong type, must be a number
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
21 |
|
|
22 | rbac:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[7] .redocly.yaml:15:13 at #/seo/keywords
|
|
|
|
Expected type \`array\` but got \`integer\`.
|
|
|
|
13 |
|
|
14 | seo:
|
|
15 | keywords: 789 # Must be an array
|
|
| ^^^
|
|
16 |
|
|
17 | redirects:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[8] .redocly.yaml:53:23 at #/rbac/content/**/additionalProp
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
51 | content:
|
|
52 | '**':
|
|
53 | additionalProp: 456 # Must be a stirng
|
|
| ^^^
|
|
54 | foo:
|
|
55 | additionalProp2: 789 # Must be a stirng
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[9] .redocly.yaml:55:24 at #/rbac/content/foo/additionalProp2
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
53 | additionalProp: 456 # Must be a stirng
|
|
54 | foo:
|
|
55 | additionalProp2: 789 # Must be a stirng
|
|
| ^^^
|
|
56 |
|
|
57 | responseHeaders:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[10] .redocly.yaml:50:16 at #/rbac/additional-property/something
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
48 | anonymous: read
|
|
49 | additional-property:
|
|
50 | something: 123 # Must be a string
|
|
| ^^^
|
|
51 | content:
|
|
52 | '**':
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[11] .redocly.yaml:58:16 at #/responseHeaders/some-header
|
|
|
|
Expected type \`rootRedoclyConfigSchema.responseHeaders_additionalProperties\` (array) but got \`string\`
|
|
|
|
56 |
|
|
57 | responseHeaders:
|
|
58 | some-header: wrong, must be an array
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
59 | some-header2:
|
|
60 | - wrong, must be an object
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[12] .redocly.yaml:60:7 at #/responseHeaders/some-header2/0
|
|
|
|
Expected type \`rootRedoclyConfigSchema.responseHeaders_additionalProperties_items\` (object) but got \`string\`
|
|
|
|
58 | some-header: wrong, must be an array
|
|
59 | some-header2:
|
|
60 | - wrong, must be an object
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
61 | - unexpected-property: Should fail
|
|
62 | # name: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[13] .redocly.yaml:61:7 at #/responseHeaders/some-header2/1
|
|
|
|
The field \`name\` must be present on this level.
|
|
|
|
59 | some-header2:
|
|
60 | - wrong, must be an object
|
|
61 | - unexpected-property: Should fail
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
62 | # name: Must be reported as a missing required prop
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
63 | value: 123 # Must be a string
|
|
| ^^^^^^^^^^
|
|
64 |
|
|
65 | ssoOnPrem:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[14] .redocly.yaml:61:7 at #/responseHeaders/some-header2/1/unexpected-property
|
|
|
|
Property \`unexpected-property\` is not expected here.
|
|
|
|
59 | some-header2:
|
|
60 | - wrong, must be an object
|
|
61 | - unexpected-property: Should fail
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
62 | # name: Must be reported as a missing required prop
|
|
63 | value: 123 # Must be a string
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[15] .redocly.yaml:63:14 at #/responseHeaders/some-header2/1/value
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
61 | - unexpected-property: Should fail
|
|
62 | # name: Must be reported as a missing required prop
|
|
63 | value: 123 # Must be a string
|
|
| ^^^
|
|
64 |
|
|
65 | ssoOnPrem:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[16] .redocly.yaml:4:3 at #/apis/without-root
|
|
|
|
The field \`root\` must be present on this level.
|
|
|
|
2 |
|
|
3 | apis:
|
|
4 | without-root:
|
|
| ^^^^^^^^^^^^
|
|
5 | foo: Not expected!
|
|
6 | output: file.json
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[17] .redocly.yaml:5:5 at #/apis/without-root/foo
|
|
|
|
Property \`foo\` is not expected here.
|
|
|
|
Did you mean: root ?
|
|
|
|
3 | apis:
|
|
4 | without-root:
|
|
5 | foo: Not expected!
|
|
| ^^^
|
|
6 | output: file.json
|
|
7 | with-wrong-root:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[18] .redocly.yaml:8:11 at #/apis/with-wrong-root/root
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
6 | output: file.json
|
|
7 | with-wrong-root:
|
|
8 | root: 456 # Must be a string
|
|
| ^^^
|
|
9 | with-theme:
|
|
10 | root: ./openapi.yaml
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[19] .redocly.yaml:12:5 at #/apis/with-theme/not-expected
|
|
|
|
Property \`not-expected\` is not expected here.
|
|
|
|
10 | root: ./openapi.yaml
|
|
11 | openapi: wrong, must be an object
|
|
12 | not-expected: Must fail
|
|
| ^^^^^^^^^^^^
|
|
13 |
|
|
14 | seo:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[20] .redocly.yaml:11:14 at #/apis/with-theme/openapi
|
|
|
|
Expected type \`rootRedoclyConfigSchema.apis_additionalProperties.openapi\` (object) but got \`string\`
|
|
|
|
9 | with-theme:
|
|
10 | root: ./openapi.yaml
|
|
11 | openapi: wrong, must be an object
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
12 | not-expected: Must fail
|
|
13 |
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[21] .redocly.yaml:67:12 at #/ssoOnPrem/oidc/title
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
65 | ssoOnPrem:
|
|
66 | oidc:
|
|
67 | title: 456 # Must be a string
|
|
| ^^^
|
|
68 | type: OIDC
|
|
69 | configurationUrl: http://localhost/oidc/.well-known/openid-configuration
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[22] .redocly.yaml:85:9 at #/ssoOnPrem/oidc/defaultTeams/0
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
83 | additional-propery: Must be allowed
|
|
84 | defaultTeams:
|
|
85 | - 456 # Must be a string
|
|
| ^^^
|
|
86 |
|
|
87 | sso-config-schema-without-configurationUrl:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[23] .redocly.yaml:80:5 at #/ssoOnPrem/oidc/configuration
|
|
|
|
The field \`authorization_endpoint\` must be present on this level.
|
|
|
|
78 | login_hint: 789 # Must be a string
|
|
79 | prompt: login
|
|
80 | configuration:
|
|
| ^^^^^^^^^^^^^
|
|
81 | token_endpoint: 123 # Must be a string
|
|
82 | # authorization_endpoint: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[24] .redocly.yaml:81:23 at #/ssoOnPrem/oidc/configuration/token_endpoint
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
79 | prompt: login
|
|
80 | configuration:
|
|
81 | token_endpoint: 123 # Must be a string
|
|
| ^^^
|
|
82 | # authorization_endpoint: Must be reported as a missing required prop
|
|
83 | additional-propery: Must be allowed
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[25] .redocly.yaml:78:19 at #/ssoOnPrem/oidc/authorizationRequestCustomParams/login_hint
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
76 | - default
|
|
77 | authorizationRequestCustomParams:
|
|
78 | login_hint: 789 # Must be a string
|
|
| ^^^
|
|
79 | prompt: login
|
|
80 | configuration:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[26] .redocly.yaml:87:3 at #/ssoOnPrem/sso-config-schema-without-configurationUrl
|
|
|
|
The field \`clientId\` must be present on this level.
|
|
|
|
85 | - 456 # Must be a string
|
|
86 |
|
|
87 | sso-config-schema-without-configurationUrl:
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
88 | type: OIDC
|
|
89 | # clientId: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[27] .redocly.yaml:87:3 at #/ssoOnPrem/sso-config-schema-without-configurationUrl
|
|
|
|
The field \`configurationUrl\` must be present on this level.
|
|
|
|
85 | - 456 # Must be a string
|
|
86 |
|
|
87 | sso-config-schema-without-configurationUrl:
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
88 | type: OIDC
|
|
89 | # clientId: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[28] .redocly.yaml:97:3 at #/developerOnboarding/wrong
|
|
|
|
Property \`wrong\` is not expected here.
|
|
|
|
95 |
|
|
96 | developerOnboarding:
|
|
97 | wrong: A not allowed field
|
|
| ^^^^^
|
|
98 | adapters:
|
|
99 | - should be object
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[29] .redocly.yaml:99:7 at #/developerOnboarding/adapters/0
|
|
|
|
Expected type \`APIGEE_X\` (object) but got \`string\`
|
|
|
|
97 | wrong: A not allowed field
|
|
98 | adapters:
|
|
99 | - should be object
|
|
| ^^^^^^^^^^^^^^^^
|
|
100 | - type: 123 # Must be a string
|
|
101 | - type: APIGEE_X
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[30] .redocly.yaml:100:7 at #/developerOnboarding/adapters/1
|
|
|
|
The field \`organizationName\` must be present on this level.
|
|
|
|
98 | adapters:
|
|
99 | - should be object
|
|
100 | - type: 123 # Must be a string
|
|
| ^^^^^^^^^
|
|
101 | - type: APIGEE_X
|
|
102 | # organizationName: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[31] .redocly.yaml:100:7 at #/developerOnboarding/adapters/1
|
|
|
|
The field \`auth\` must be present on this level.
|
|
|
|
98 | adapters:
|
|
99 | - should be object
|
|
100 | - type: 123 # Must be a string
|
|
| ^^^^^^^^^
|
|
101 | - type: APIGEE_X
|
|
102 | # organizationName: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[32] .redocly.yaml:100:13 at #/developerOnboarding/adapters/1/type
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
98 | adapters:
|
|
99 | - should be object
|
|
100 | - type: 123 # Must be a string
|
|
| ^^^
|
|
101 | - type: APIGEE_X
|
|
102 | # organizationName: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[33] .redocly.yaml:101:7 at #/developerOnboarding/adapters/2
|
|
|
|
The field \`organizationName\` must be present on this level.
|
|
|
|
99 | - should be object
|
|
100 | - type: 123 # Must be a string
|
|
101 | - type: APIGEE_X
|
|
| ^^^^^^^^^^^^^^
|
|
102 | # organizationName: Must be reported as a missing required prop
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
… | < 5 more lines >
|
|
108 | not-expected: Must fail
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
109 | - type: APIGEE_X
|
|
110 | organizationName: Test
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[34] .redocly.yaml:103:7 at #/developerOnboarding/adapters/2/auth
|
|
|
|
The field \`tokenEndpoint\` must be present on this level.
|
|
|
|
101 | - type: APIGEE_X
|
|
102 | # organizationName: Must be reported as a missing required prop
|
|
103 | auth:
|
|
| ^^^^
|
|
104 | type: OAUTH2
|
|
105 | # tokenEndpoint: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[35] .redocly.yaml:106:19 at #/developerOnboarding/adapters/2/auth/clientId
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
104 | type: OAUTH2
|
|
105 | # tokenEndpoint: Must be reported as a missing required prop
|
|
106 | clientId: 456 # Must be a string
|
|
| ^^^
|
|
107 | clientSecret: '{{ process.env.secret }}'
|
|
108 | not-expected: Must fail
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[36] .redocly.yaml:108:9 at #/developerOnboarding/adapters/2/auth/not-expected
|
|
|
|
Property \`not-expected\` is not expected here.
|
|
|
|
106 | clientId: 456 # Must be a string
|
|
107 | clientSecret: '{{ process.env.secret }}'
|
|
108 | not-expected: Must fail
|
|
| ^^^^^^^^^^^^
|
|
109 | - type: APIGEE_X
|
|
110 | organizationName: Test
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[37] .redocly.yaml:111:7 at #/developerOnboarding/adapters/3/auth
|
|
|
|
The field \`serviceAccountPrivateKey\` must be present on this level.
|
|
|
|
109 | - type: APIGEE_X
|
|
110 | organizationName: Test
|
|
111 | auth:
|
|
| ^^^^
|
|
112 | type: SERVICE_ACCOUNT
|
|
113 | # serviceAccountPrivateKey: Must be reported as a missing required prop
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[38] .redocly.yaml:114:30 at #/developerOnboarding/adapters/3/auth/serviceAccountEmail
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
112 | type: SERVICE_ACCOUNT
|
|
113 | # serviceAccountPrivateKey: Must be reported as a missing required prop
|
|
114 | serviceAccountEmail: 789 # Must be a string
|
|
| ^^^
|
|
115 |
|
|
116 | l10n:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[39] .redocly.yaml:119:13 at #/l10n/locales/0/code
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
117 | defaultLocale: en-US
|
|
118 | locales:
|
|
119 | - code: 123 # Must be a string
|
|
| ^^^
|
|
120 | name: English
|
|
121 | - code: es-ES
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[40] .redocly.yaml:132:12 at #/env/some-env/mockServer/off
|
|
|
|
Expected type \`boolean\` but got \`string\`.
|
|
|
|
130 | some-env:
|
|
131 | mockServer:
|
|
132 | off: must be boolean
|
|
| ^^^^^^^^^^^^^^^
|
|
133 | not-expected: Must fail
|
|
134 | apis:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[41] .redocly.yaml:133:7 at #/env/some-env/mockServer/not-expected
|
|
|
|
Property \`not-expected\` is not expected here.
|
|
|
|
131 | mockServer:
|
|
132 | off: must be boolean
|
|
133 | not-expected: Must fail
|
|
| ^^^^^^^^^^^^
|
|
134 | apis:
|
|
135 | no-root:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[42] .redocly.yaml:135:7 at #/env/some-env/apis/no-root
|
|
|
|
The field \`root\` must be present on this level.
|
|
|
|
133 | not-expected: Must fail
|
|
134 | apis:
|
|
135 | no-root:
|
|
| ^^^^^^^
|
|
136 | # root: Must be defined
|
|
137 | rules: {}
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[43] .redocly.yaml:139:15 at #/env/some-env/apis/wrong-root/root
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
137 | rules: {}
|
|
138 | wrong-root:
|
|
139 | root: 789 # Must be a string
|
|
| ^^^
|
|
140 |
|
|
141 | referenced-env:
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
[44] env.yaml:2:5 at #/ignore/0
|
|
|
|
Expected type \`string\` but got \`integer\`.
|
|
|
|
1 | ignore:
|
|
2 | - 123 # Must be an string
|
|
| ^^^
|
|
3 | - correct
|
|
4 |
|
|
|
|
referenced from .redocly.yaml:142:5 at #/env/referenced-env
|
|
|
|
Error was generated by the configuration spec rule.
|
|
|
|
|
|
❌ Your config has 44 errors.
|
|
|
|
|
|
`;
|