asyncapi-info-license-url
License object must include "url".
- Applies to
url- Selects
$- Function
truthy- Specs
- AsyncAPI 2.xAsyncAPI 3.x
Use it
This rule ships with OpenLint in spectral:asyncapi. It's off by default, so turn it on by name:
extends: spectral:asyncapi
rules:
asyncapi-info-license-url: true
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
asyncapi-info-license-url:
description: License object must include "url".
recommended: false
formats:
- AsyncAPI 2.x
- AsyncAPI 3.x
given: $
then:
field: info.license.url
function: truthy
About this rule
Mentioning a license is only useful if people know what the license means, so add a link to the full text for those who need it.
Good Example
asyncapi: "2.0.0"
info:
license:
name: MIT
url: https://www.tldrlegal.com/l/mit