Skip to content

Commit 5a14c1f

Browse files
authored
Merge branch 'main' into fix/bundler-sibling-refs
2 parents d78b99d + 79b61a5 commit 5a14c1f

File tree

190 files changed

+3718
-1288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+3718
-1288
lines changed

.changeset/curly-tools-tap.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/proud-phones-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/openapi-core": patch
3+
---
4+
5+
Fixed an issue where `no-required-schema-properties-undefined` rule did not evaluate properties in `any` and `oneOf`.

.changeset/tender-pigs-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/cli": patch
3+
---
4+
5+
Applied proxy settings during Respect execution.

__tests__/bundle/bundle-external-value/snapshot.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Can't resolve $ref: ENOENT: no such file or directory './__tests__/bundle/bundle
4040
26 | test-wrong-ref:
4141
27 | summary: Example shouldn't resolved to value
4242
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43-
28 | externalValue: './external-value-bad-path.json'
44-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43+
28 | externalValue: ./external-value-bad-path.json
44+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4545
29 |
4646

4747
Error was generated by the bundler rule.

__tests__/bundle/bundle-external-value/test-success.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ paths:
2525
examples:
2626
test-resolved:
2727
summary: Example should resolved to value
28-
externalValue: './external-value.json'
28+
externalValue: ./external-value.json
2929
test-no-resolved:
3030
summary: Example shouldn't be resolved to value
3131
value:
3232
type: object
33-
externalValue: './external-value.json'
33+
externalValue: ./external-value.json

__tests__/bundle/bundle-external-value/test-wrong-examples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ paths:
2525
examples:
2626
test-wrong-ref:
2727
summary: Example shouldn't resolved to value
28-
externalValue: './external-value-bad-path.json'
28+
externalValue: ./external-value-bad-path.json

__tests__/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { readFileSync } from 'node:fs';
22
import { join } from 'node:path';
33
import { spawnSync } from 'node:child_process';
4-
import { parseYaml } from '../packages/core/src/utils.js'; // not able to import from @redocly/openapi-core
4+
import { parseYaml } from '../packages/core/src/utils/yaml-fs-helper.js'; // not able to import from @redocly/openapi-core
55

66
export function getParams(indexEntryPoint: string, args: string[] = []): string[] {
77
return [indexEntryPoint, ...args];

__tests__/lint/oas3.2/snapshot.txt

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,49 @@ Property `wrong` is not expected here.
2626
Error was generated by the struct rule.
2727

2828

29-
[3] openapi.yaml:51:7 at #/paths/~1products/query/wrong
29+
[3] openapi.yaml:16:13 at #/tags/0/parent
30+
31+
Tag parent 'products' is not defined in the API description.
32+
33+
14 | summary: Books & Literature
34+
15 | description: Book catalog and recommendations
35+
16 | parent: products
36+
| ^^^^^^^^
37+
17 | kind: nav
38+
18 | wrong: Should catch wrong fields in tags!
39+
40+
Error was generated by the spec-no-invalid-tag-parents rule.
41+
42+
43+
[4] openapi.yaml:23:13 at #/tags/1/parent
44+
45+
Tag parent 'products' is not defined in the API description.
46+
47+
21 | summary: Music CDs
48+
22 | description: Music CD catalog and reviews
49+
23 | parent: products
50+
| ^^^^^^^^
51+
24 | kind: nav
52+
25 |
53+
54+
Error was generated by the spec-no-invalid-tag-parents rule.
55+
56+
57+
[5] openapi.yaml:29:13 at #/tags/2/parent
58+
59+
Tag parent 'products' is not defined in the API description.
60+
61+
27 | summary: Gift Cards
62+
28 | description: Digital and physical gift cards
63+
29 | parent: products
64+
| ^^^^^^^^
65+
30 | kind: nav
66+
31 |
67+
68+
Error was generated by the spec-no-invalid-tag-parents rule.
69+
70+
71+
[6] openapi.yaml:51:7 at #/paths/~1products/query/wrong
3072

3173
Property `wrong` is not expected here.
3274

@@ -40,7 +82,7 @@ Property `wrong` is not expected here.
4082
Error was generated by the struct rule.
4183

4284

43-
[4] openapi.yaml:48:9 at #/paths/~1products/additionalOperations/test/wrong
85+
[7] openapi.yaml:48:9 at #/paths/~1products/additionalOperations/test/wrong
4486

4587
Property `wrong` is not expected here.
4688

@@ -54,7 +96,7 @@ Property `wrong` is not expected here.
5496
Error was generated by the struct rule.
5597

5698

57-
[5] openapi.yaml:156:9 at #/components/schemas/MyResponseType/discriminator/wrong
99+
[8] openapi.yaml:156:9 at #/components/schemas/MyResponseType/discriminator/wrong
58100

59101
Property `wrong` is not expected here.
60102

@@ -68,7 +110,7 @@ Property `wrong` is not expected here.
68110
Error was generated by the struct rule.
69111

70112

71-
[6] openapi.yaml:132:11 at #/components/securitySchemes/petstore_auth/flows/implicit/wrong
113+
[9] openapi.yaml:132:11 at #/components/securitySchemes/petstore_auth/flows/implicit/wrong
72114

73115
Property `wrong` is not expected here.
74116

@@ -82,7 +124,7 @@ Property `wrong` is not expected here.
82124
Error was generated by the struct rule.
83125

84126

85-
[7] openapi.yaml:144:9 at #/components/securitySchemes/device_auth/flows/deviceAuthorization
127+
[10] openapi.yaml:144:9 at #/components/securitySchemes/device_auth/flows/deviceAuthorization
86128

87129
The field `scopes` must be present on this level.
88130

@@ -96,7 +138,7 @@ The field `scopes` must be present on this level.
96138
Error was generated by the struct rule.
97139

98140

99-
[8] openapi.yaml:2:1 at #/info
141+
[11] openapi.yaml:2:1 at #/info
100142

101143
Info object should contain `license` field.
102144

@@ -109,7 +151,7 @@ Info object should contain `license` field.
109151
Warning was generated by the info-license rule.
110152

111153

112-
[9] openapi.yaml:9:10 at #/servers/0/url
154+
[12] openapi.yaml:9:10 at #/servers/0/url
113155

114156
Server `url` should not point to example.com or localhost.
115157

@@ -123,7 +165,7 @@ Server `url` should not point to example.com or localhost.
123165
Warning was generated by the no-server-example.com rule.
124166

125167

126-
[10] openapi.yaml:39:5 at #/paths/~1giftcards/get/operationId
168+
[13] openapi.yaml:39:5 at #/paths/~1giftcards/get/operationId
127169

128170
Operation object should contain `operationId` field.
129171

@@ -137,7 +179,7 @@ Operation object should contain `operationId` field.
137179
Warning was generated by the operation-operationId rule.
138180

139181

140-
[11] openapi.yaml:49:5 at #/paths/~1products/query/operationId
182+
[14] openapi.yaml:49:5 at #/paths/~1products/query/operationId
141183

142184
Operation object should contain `operationId` field.
143185

@@ -151,7 +193,7 @@ Operation object should contain `operationId` field.
151193
Warning was generated by the operation-operationId rule.
152194

153195

154-
[12] openapi.yaml:65:7 at #/paths/~1products/query/responses
196+
[15] openapi.yaml:65:7 at #/paths/~1products/query/responses
155197

156198
Operation must have at least one `4XX` response.
157199

@@ -165,7 +207,7 @@ Operation must have at least one `4XX` response.
165207
Warning was generated by the operation-4xx-response rule.
166208

167209

168-
[13] openapi.yaml:46:7 at #/paths/~1products/additionalOperations/test/operationId
210+
[16] openapi.yaml:46:7 at #/paths/~1products/additionalOperations/test/operationId
169211

170212
Operation object should contain `operationId` field.
171213

@@ -179,7 +221,7 @@ Operation object should contain `operationId` field.
179221
Warning was generated by the operation-operationId rule.
180222

181223

182-
[14] openapi.yaml:70:5 at #/paths/~1stream/get/operationId
224+
[17] openapi.yaml:70:5 at #/paths/~1stream/get/operationId
183225

184226
Operation object should contain `operationId` field.
185227

@@ -193,7 +235,7 @@ Operation object should contain `operationId` field.
193235
Warning was generated by the operation-operationId rule.
194236

195237

196-
[15] openapi.yaml:72:7 at #/paths/~1stream/get/responses
238+
[18] openapi.yaml:72:7 at #/paths/~1stream/get/responses
197239

198240
Operation must have at least one `4XX` response.
199241

@@ -207,7 +249,7 @@ Operation must have at least one `4XX` response.
207249
Warning was generated by the operation-4xx-response rule.
208250

209251

210-
[16] openapi.yaml:83:5 at #/paths/~1thing/get/operationId
252+
[19] openapi.yaml:83:5 at #/paths/~1thing/get/operationId
211253

212254
Operation object should contain `operationId` field.
213255

@@ -221,7 +263,7 @@ Operation object should contain `operationId` field.
221263
Warning was generated by the operation-operationId rule.
222264

223265

224-
[17] openapi.yaml:85:7 at #/paths/~1thing/get/responses
266+
[20] openapi.yaml:85:7 at #/paths/~1thing/get/responses
225267

226268
Operation must have at least one `4XX` response.
227269

@@ -235,7 +277,7 @@ Operation must have at least one `4XX` response.
235277
Warning was generated by the operation-4xx-response rule.
236278

237279

238-
[18] openapi.yaml:149:5 at #/components/schemas/MyResponseType
280+
[21] openapi.yaml:149:5 at #/components/schemas/MyResponseType
239281

240282
Component: "MyResponseType" is never used.
241283

@@ -253,6 +295,6 @@ Warning was generated by the no-unused-components rule.
253295
validating openapi.yaml using lint rules for api 'main'...
254296
openapi.yaml: validated in <test>ms
255297

256-
❌ Validation failed with 7 errors and 11 warnings.
298+
❌ Validation failed with 10 errors and 11 warnings.
257299
run `redocly lint --generate-ignore-file` to add all problems to the ignore file.
258300

__tests__/respect/local-json-server/local-json-server.test.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,19 @@ describe('local-json-server', () => {
2020
});
2121

2222
afterAll(() => {
23-
// Kill the process group to ensure child processes are cleaned up
24-
process.kill(-serverProcess.pid);
23+
try {
24+
if (process.platform === 'win32') {
25+
spawn('taskkill', ['/pid', serverProcess.pid.toString(), '/f', '/t']);
26+
} else {
27+
spawn('kill', ['-TERM', `-${serverProcess.pid}`]);
28+
}
29+
} catch (error) {
30+
try {
31+
serverProcess.kill('SIGTERM');
32+
} catch (e) {
33+
// Process may have already exited
34+
}
35+
}
2536

2637
// Restore original state
2738
if (originalData) {

docs/@v1/rules/oas/array-parameter-serialization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Enforces the inclusion of `style` and `explode` fields for parameters with array
1515
```mermaid
1616
flowchart TD
1717
18-
root ==> Paths --> PathItem --> Operation --> Parameter --enforces style and explode fields for array types--> Schema
18+
Root ==> Paths --> PathItem --> Operation --> Parameter --enforces style and explode fields for array types--> Schema
1919
PathItem --> Parameter
20-
NamedParameter --> Parameter
20+
NamedParameters --> Parameter
2121
22-
root ==> components
22+
Root ==> components
2323
2424
subgraph components
25-
NamedParameter
25+
NamedParameters
2626
end
2727
2828
style Parameter fill:#codaf9,stroke:#0044d4,stroke-width:5px

0 commit comments

Comments
 (0)