You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: __tests__/lint/x-security-scheme-name-link-rule/snapshot.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[1] museum.yaml:15:21 at #/workflows/0/x-security/0/schemeName
2
2
3
-
When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a link to a source description (e.g. `$sourceDescriptions.{name}.{scheme}`)
3
+
When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a reference to a source description (e.g. `$sourceDescriptions.{name}.{scheme}`)
4
4
5
5
13 | - workflowId: get-museum-hours
6
6
14 | x-security:
@@ -9,7 +9,7 @@ When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must
9
9
16 | values:
10
10
17 | token: some-token
11
11
12
-
Error was generated by the x-security-scheme-name-link rule.
12
+
Error was generated by the x-security-scheme-name-reference rule.
Copy file name to clipboardExpand all lines: docs/@v2/rules/built-in-rules.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,8 +136,6 @@ Within the Arazzo family of rules, there are rules for the main Arazzo specifica
136
136
-[workflow-dependsOn](./arazzo/workflow-dependsOn.md): the items in the `workflow``dependsOn` property must exist and be unique
137
137
-[workflowId-unique](./arazzo/workflowId-unique.md): the `workflowId` property must be unique across all workflows
138
138
-[sourceDescriptions-not-empty](./arazzo/sourceDescriptions-not-empty.md): the `sourceDescriptions` must be defined and the list must have at least one entry.
139
-
-[x-security-scheme-name-link](./arazzo/x-security-scheme-name-link.md): when multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must link to a source description (for example, `$sourceDescriptions.{name}.scheme`)
140
-
-[no-x-security-both-scheme-and-scheme-name](./arazzo/no-x-security-both-scheme-and-scheme-name.md): forbids using both `scheme` and `schemeName` in the same `x-security` item
141
139
142
140
### Respect
143
141
@@ -147,6 +145,8 @@ The below rules are being migrated to Respect:
147
145
-[respect-supported-versions](./respect/respect-supported-versions.md): the `version` property must be one of the supported values.
148
146
-[no-x-security-scheme-name-without-openapi](./respect/no-x-security-scheme-name-without-openapi.md): the `x-security` can't use `schemeName` when Step request is described with `x-operation`.
149
147
-[x-security-scheme-required-values](./respect/x-security-scheme-required-values.md) validate that `x-security` have all required `values` described according to the used `scheme`.
148
+
-[x-security-scheme-name-reference](./respect/x-security-scheme-name-reference.md): when multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must reference a source description (for example, `$sourceDescriptions.{name}.scheme`)
149
+
-[no-x-security-both-scheme-and-scheme-name](./respect/no-x-security-both-scheme-and-scheme-name.md): forbids using both `scheme` and `schemeName` in the same `x-security` item
Copy file name to clipboardExpand all lines: docs/@v2/rules/respect/no-x-security-both-scheme-and-scheme-name.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ Forbids using both `scheme` and `schemeName` in the same `x-security` item.
8
8
9
9
## Rationale
10
10
11
-
A single `x-security`item must reference a security scheme in exactly one way: either by embedding the `scheme` object or by referencing it with`schemeName`.
12
-
Having both is ambiguous and is rejected by the runtime.
11
+
Each `x-security`entry must reference a security scheme in exactly one way—either embed the `scheme` object or reference it via`schemeName`.
12
+
You can include multiple `x-security` entries in a workflow; this rule applies to each entry individually. Using both`scheme` and `schemeName` in the same entry is ambiguous and is rejected by the runtime.
Copy file name to clipboardExpand all lines: docs/@v2/rules/respect/x-security-scheme-name-reference.md
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
-
# x-security-scheme-name-link
1
+
# x-security-scheme-name-reference
2
2
3
-
When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a link to a specific source description (for example, `$sourceDescriptions.{name}.scheme`).
4
-
If there is only one source description, a plain string is allowed.
3
+
When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a reference to a specific source description (for example, `$sourceDescriptions.{name}.scheme`). If there is only one source description, a plain string is allowed.
5
4
6
5
| Arazzo | Compatibility |
7
6
| ------ | ------------- |
8
7
| 1.x | ✅ |
9
8
10
9
## Design principles
11
10
12
-
With multiple source descriptions, using a plain `schemeName` is ambiguous.
13
-
Requiring a link of the form `$sourceDescriptions.{name}.scheme` disambiguates which source description provides the security scheme.
11
+
With multiple source descriptions, using a plain `schemeName` is ambiguous. Requiring a reference of the form `$sourceDescriptions.{name}.scheme` disambiguates which source description provides the security scheme.
14
12
15
13
## Configuration
16
14
@@ -22,7 +20,7 @@ An example configuration:
22
20
23
21
```yaml
24
22
rules:
25
-
x-security-scheme-name-link: error
23
+
x-security-scheme-name-reference: error
26
24
```
27
25
28
26
## Examples
@@ -31,7 +29,7 @@ Given the following configuration:
31
29
32
30
```yaml
33
31
rules:
34
-
x-security-scheme-name-link: error
32
+
x-security-scheme-name-reference: error
35
33
```
36
34
37
35
Example with multiple source descriptions — incorrect (plain string `schemeName`):
@@ -48,13 +46,13 @@ sourceDescriptions:
48
46
workflows:
49
47
- workflowId: list-users
50
48
x-security:
51
-
- schemeName: BasicAuth # <- must be a link when multiple sources exist
49
+
- schemeName: BasicAuth # <- must be a reference when multiple sources exist
52
50
values:
53
51
username: test@example.com
54
52
password: 123456
55
53
```
56
54
57
-
Example with multiple source descriptions — correct (linked `schemeName`):
55
+
Example with multiple source descriptions — correct (referenced `schemeName`):
0 commit comments