2021-05-19 04:36:09 +02:00
|
|
|
extends: [[spectral:oas, all]]
|
|
|
|
|
|
|
|
functionsDir: "./tools/spectral/functions"
|
|
|
|
|
|
|
|
functions: [requireRequestId]
|
|
|
|
|
|
|
|
rules:
|
|
|
|
no-$ref-siblings: false
|
2022-01-24 07:05:37 +01:00
|
|
|
oas2-valid-schema-example: false
|
2021-05-19 04:36:09 +02:00
|
|
|
|
|
|
|
required-operationId:
|
|
|
|
description: must have a operationId.
|
|
|
|
given: $.paths[*][*]
|
|
|
|
severity: error
|
|
|
|
then:
|
|
|
|
field: operationId
|
|
|
|
function: truthy
|
|
|
|
|
|
|
|
camel-case-operationId:
|
|
|
|
description: should be camelCased.
|
|
|
|
type: style
|
|
|
|
given: $.paths[*][*].operationId
|
|
|
|
then:
|
|
|
|
function: casing
|
|
|
|
functionOptions:
|
|
|
|
type: camel
|
|
|
|
|
|
|
|
requestId-required:
|
2022-01-24 07:05:37 +01:00
|
|
|
description: must have a requestId parameters.
|
2021-05-19 04:36:09 +02:00
|
|
|
given: $.paths[*][*]
|
|
|
|
severity: error
|
|
|
|
then:
|
|
|
|
field: parameters
|
|
|
|
function: requireRequestId
|