spectral:arazzo warn on by default

arazzo-source-descriptions-type

Source Description "type" should be present.

Applies to
type
Selects
$.sourceDescriptions[*]
Function
truthy
Specs
Arazzo 1.0

Use it

This rule ships with OpenLint in spectral:arazzo. Extending the ruleset turns it on:

extends: spectral:arazzo
rules:
  arazzo-source-descriptions-type: warn   # or off, or another severity

Definition

As defined in @openlint/openlint-rulesets. Functions show by name.

arazzo-source-descriptions-type:
  description: Source Description "type" should be present.
  severity: warn
  given: '$.sourceDescriptions[*]'
  then:
    field: type
    function: truthy

About this rule

Source Description type should be present. This means that tooling does not need to immediately parse/resolve the sourceDescriptions to know what type of document they are.

Good Example

sourceDescriptions:
  - name: BnplApi
    url: https://raw.githubusercontent.com/OAI/Arazzo-Specification/main/examples/1.0.0/bnpl-openapi.yaml
    type: openapi

Sources