Skip to content

Commit 348e049

Browse files
committed
feat: add separate arazzo rule-set
1 parent 0b265e1 commit 348e049

File tree

160 files changed

+1778
-865
lines changed

Some content is hidden

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

160 files changed

+1778
-865
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@redocly/openapi-core": patch
3+
"@redocly/cli": patch
4+
---
5+
6+
Updated `sourceDescriptions` to enforce a valid type field, ensuring compliance with the Arazzo specification.

.changeset/strong-ties-argue.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@redocly/openapi-core": patch
3+
"@redocly/cli": patch
4+
---
5+
6+
Introduced `struct` rule.
7+
Added Arazzo version 1 ruleset.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ output/
1212
*.tsbuildinfo
1313
*.tgz
1414
redoc-static.html
15-
packages/cli/README.md
15+
packages/cli/README.md

__tests__/check-config/config-type-extensions-in-assertions/snapshot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`E2E check-config config type extension in assertions 1`] = `
44
5+
The 'spec' field is deprecated. Use struct instead.
56
✅ Your config is valid.
67
78
`;

__tests__/check-config/wrong-config-type-extensions-in-assertions/redocly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins:
44
- plugins/type-extention.js
55

66
rules:
7-
spec: warn
7+
struct: warn
88
rule/metadata-lifecycle:
99
subject:
1010
type: WrongXMetaData

__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/lint-config/invalid-definition-and-config/config-with-warn.snapshot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The field \`title\` must be present on this level.
3333
5 | description: Example description
3434
6 | version: '1.0'
3535
36-
Error was generated by the spec rule.
36+
Error was generated by the struct rule.
3737
3838
3939
[2] ../__fixtures__/invalid-openapi.yaml:10:5 at #/paths/~1pet~1findByStatus/get/summary
@@ -60,7 +60,7 @@ Expected type \`Responses\` (object) but got \`null\`
6060
| ^^^^^^^^^^
6161
12 |
6262
63-
Error was generated by the spec rule.
63+
Error was generated by the struct rule.
6464
6565
6666
[4] ../__fixtures__/invalid-openapi.yaml:4:1 at #/info

__tests__/lint/arazzo-not-valid-test-description/snapshot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The field \`info\` must be present on this level.
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1919
18 |
2020
21-
Error was generated by the spec rule.
21+
Error was generated by the struct rule.
2222
2323
2424
[2] museum.yaml:9:5 at #/workflows/0
@@ -36,7 +36,7 @@ The field \`steps\` must be present on this level.
3636
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3737
18 |
3838
39-
Error was generated by the spec rule.
39+
Error was generated by the struct rule.
4040
4141
4242
museum.yaml: validated in <test>ms

__tests__/lint/arazzo-type-extensions-with-plugin/plugins/type-extention.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const XMetaData = {
99
module.exports = {
1010
id: 'type-extension',
1111
typeExtension: {
12-
arazzo(types) {
12+
arazzo1(types) {
1313
newTypes = {
1414
...types,
1515
XMetaData: XMetaData,

0 commit comments

Comments
 (0)