- This is a Spectral rule:
#👻-rule
operation-parameters-must-have-description:
description: Operation parameters must have a description
given: $.paths[*][*].parameters[*]
severity: error
then:
field: description
function: truthy
- This is a test case for this rule:
#👻-failures: 1 operation-parameters-must-have-description
openapi: 3.0.1
paths:
/test/{id}:
get:
parameters:
# the 'id' parameter needs a description
- name: id #👻-fails-here: operation-parameters-must-have-description
in: path
required: true
schema:
type: string