Skip to content

Commit d183905

Browse files
committed
docs: update info-license-strict rule
1 parent d2d6f17 commit d183905

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/@v2/rules/oas/info-license-strict.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2-
slug:
3-
- /docs/cli/v2/rules/oas/info-license-url
4-
- /docs/cli/v2/rules/oas/info-license-strict
2+
slug: /docs/cli/v2/rules/oas/info-license-strict
53
---
64

75
# info-license-strict
86

9-
Requires the license URL in your API descriptions.
7+
Requires either the license URL or identifier in your API descriptions.
108

119
| OAS | Compatibility |
1210
| --- | ------------- |
@@ -54,15 +52,15 @@ rules:
5452
info-license-strict: error
5553
```
5654
57-
Example of an **incorrect** license URL:
55+
Example of an **incorrect** license:
5856
5957
```yaml Object example
6058
info:
6159
license:
6260
name: MIT
6361
```
6462
65-
Example of a **correct** license URL:
63+
Example of a **correct** license with URL:
6664
6765
```yaml Object example
6866
info:
@@ -71,6 +69,15 @@ info:
7169
url: https://www.apache.org/licenses/LICENSE-2.0.html
7270
```
7371
72+
Example of a **correct** license with identifier:
73+
74+
```yaml Object example
75+
info:
76+
license:
77+
name: Apache 2.0
78+
identifier: Apache-2.0
79+
```
80+
7481
## Related rules
7582
7683
- [info-contact](./info-contact.md)

0 commit comments

Comments
 (0)