valid-identifier-spdx-license-expression
Overview
This rule belongs to the openapi-v3-syntax-linting ruleset and states that:
The License Object must define a valid SPDX license expression when using the identifier property. The license expression must use only alpha-numeric characters, hyphens, spaces, periods, colons, and plus signs. Characters beyond these must not be used.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Warning |
| Message | Identifier SPDX license expression contains invalid characters. |
| Code | OPENAPI3SYNTAX_L001 |
| Type | Linting |
| Rule System | Syntax |
| Broad Category | Licenses |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi syntax linting license expression identifier spdx license |
Suggested Fixes
- Make sure that the license identifier does not contain any forbidden characters.
- Ensure that the license identifier is valid for the following regex pattern: ^[A-Za-z0-9- .+:]+$
- Use only alpha-numeric characters, hyphens, spaces, periods, colons, and plus signs.
- Further information about the exact syntax requirements for the SPDX expression can be found in the Appendix IV of SPDX specification document.