parameter-description

Ensure that every parameter has a description.

OAS Compatibility
2.0
3.0
3.1

API design principles

A parameter should have a description because documentation is important. That parameter filter that is self-documenting and intuitive is the same filter that you need to look into the source code to determine what kind of values to provide to it 7 months from now. Document it!

Configuration

Option Type Description
severity string Possible values: off, warn, error. Default off (in recommended configuration).

An example configuration:

Copy
Copied
styleguide:
  rules:
    parameter-description: error

Examples

Given this configuration:

Copy
Copied
styleguide:
  rules:
    parameter-description: error

Example of an incorrect parameter:

Copy
Copied
paths:
  /customers/{id}:
    post:
      parameters:
        - name: id
          in: path
          required: true

Example of a correct parameter:

Copy
Copied
paths:
  /customers/{id}:
    post:
      parameters:
        - name: id
          in: path
          required: true
          description: The customer's ID.

Related rules

Resources