Last updated

operation-parameters-unique

Verifies parameters are unique for any given operation.

OASCompatibility
2.0
3.0
3.1

API design principles

Identical twins are the topic of social research. And some interesting studies have been published over the years that used identical twins in their studies. Identical parameters, on the other hand, are a design mistake. Solve it before you ship it.

Configuration

OptionTypeDescription
severitystringPossible values: off, warn, error. Default error (in recommended configuration).

An example configuration:

rules:
  operation-parameters-unique: error

Examples

Given this configuration:

rules:
  operation-parameters-unique: error

Example of an incorrect operation:

paths:
  /cars:
    get:
      parameters:
        - name: filter
          in: query
        - name: filter
          in: query

Example of a correct operation:

paths:
  /cars:
    get:
      parameters:
        - name: filter
          in: query
        - name: another-filter
          in: query

Resources