From f2a3eeba7a3ea1d4f436a58c27121819dab2beaf Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 14 Mar 2024 19:16:44 +0000 Subject: [PATCH] chore(release): 1.11.2 [skip ci] ## [1.11.2](https://github.com/SPSCommerce/sps-api-standards/compare/v1.11.1...v1.11.2) (2024-03-14) ### Bug Fixes * make sps-ref-property-name more specific ([#81](https://github.com/SPSCommerce/sps-api-standards/issues/81)) ([0982e0b](https://github.com/SPSCommerce/sps-api-standards/commit/0982e0ba67bce3adddc88dd32d241392089b2e0f)) --- sps-api-standards.spectral.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sps-api-standards.spectral.yml b/sps-api-standards.spectral.yml index e06617c..085592f 100644 --- a/sps-api-standards.spectral.yml +++ b/sps-api-standards.spectral.yml @@ -24,7 +24,7 @@ rules: description: Property with the name 'ref' MUST be of type 'sps-ref' following URN-like reference formats. severity: error formats: [oas3] - given: '$..properties..[?((@property=== "ref" || @property === "Ref") && @.$ref == null && @.allOf == null && @.oneOf == null)]' + given: '$..properties..[?((@property=== "ref" || @property === "Ref") && @.$ref == null && @.allOf == null && @.oneOf == null && @.type != null)]' resolved: false then: - field: "format" @@ -32,10 +32,10 @@ rules: - field: "format" function: pattern functionOptions: - match: 'sps-ref' + match: "sps-ref" sps-ref-schema: description: Properties following 'sps-ref' format MUST use the standardized schema - maxLength (255), minLength(7), pattern (includes 'sps'), type (string). - message: '{{property}} is not provided or not following required schema values.' + message: "{{property}} is not provided or not following required schema values." severity: error formats: [oas3] given: '$..[?(@property=== "format" && @ == "sps-ref")]^' @@ -65,22 +65,22 @@ rules: - field: pattern function: pattern functionOptions: - match: 'sps' + match: "sps" - field: type function: pattern functionOptions: - match: '^string$' + match: "^string$" # fingerprint property usage and naming 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.' + message: "{{property}} is not using property name fingerprint." severity: error formats: [oas3] - given: '$.components.schemas..properties.*~' + given: "$.components.schemas..properties.*~" then: function: pattern functionOptions: - notMatch: '^hashkey|hashKey|hash$' + notMatch: "^hashkey|hashKey|hash$" sps-fingerprint-type: description: Fingerprint values MUST use a data type of `string`. severity: error @@ -89,7 +89,7 @@ rules: then: function: pattern functionOptions: - match: '^string$' + match: "^string$" ##### General ##### sps-invalid-response-body: description: Response bodies must be an object type.