diff --git a/sps-api-standards.spectral.yml b/sps-api-standards.spectral.yml index 883f58a..911cd37 100644 --- a/sps-api-standards.spectral.yml +++ b/sps-api-standards.spectral.yml @@ -19,6 +19,25 @@ rules: values: - application/problem+xml - application/problem+json + sps-fingerprint-naming: + description: Rather than property names refering to the implementation for 'hash' or 'hashkey', you MUST use the property name 'fingerprint'. + message: '{{property}} is not using property name fingerprint.' + severity: error + formats: [oas3] + given: '$.components.schemas..properties.*~' + then: + function: pattern + functionOptions: + notMatch: '^hashkey|hashKey|hash$' + sps-fingerprint-type: + description: Fingerprint values MUST use a data type of `string`. + severity: error + formats: [oas3] + given: '$.components.schemas..properties..[?(@property=== "fingerprint")].type' + then: + function: pattern + functionOptions: + match: '^string$' sps-request-get-no-body: description: A `GET` request MUST NOT accept a request body severity: error