mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 11:46:43 +01:00
0b089a16be
Signed-off-by: He Weiwei <hweiwei@vmware.com>
35 lines
726 B
YAML
35 lines
726 B
YAML
extends: [[spectral:oas, all]]
|
|
|
|
functionsDir: "./tools/spectral/functions"
|
|
|
|
functions: [requireRequestId]
|
|
|
|
rules:
|
|
no-$ref-siblings: false
|
|
oas2-valid-schema-example: false
|
|
|
|
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:
|
|
description: must have a requestId parameters.
|
|
given: $.paths[*][*]
|
|
severity: error
|
|
then:
|
|
field: parameters
|
|
function: requireRequestId
|