spectral:arazzo error on by default

arazzo-step-request-body-validation

Every step request body must have a valid `contentType` and use of runtime expressions.

Applies to
requestBody
Selects
$
Function
arazzoStepRequestBodyValidation
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-step-request-body-validation: error   # or off, or another severity

Definition

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

arazzo-step-request-body-validation:
  description: >-
    Every step request body must have a valid `contentType` and use of runtime
    expressions.
  severity: 0
  given: $
  then:
    function: arazzoStepRequestBodyValidation

About this rule

Every step request body must have an expected contentType and expected use of runtime expressions.

The contentType value will be checked against the following regex:

/^(application|audio|font|example|image|message|model|multipart|text|video)\/[a-zA-Z0-9!#$&^_.+-]{1,127}$/

Rule Checks:

_inline use of runtime expressions within payload are not yet validated

Sources