From 66e6d561a2f18468e4ccb7dc19fde07daa974ab8 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 25 Oct 2022 14:37:32 +0000 Subject: [PATCH] chore(release): 1.1.1 [skip ci] ## [1.1.1](https://github.com/SPSCommerce/sps-api-standards/compare/v1.1.0...v1.1.1) (2022-10-25) ### Bug Fixes * sps-request-support-json - Accuracy and Testing ([#42](https://github.com/SPSCommerce/sps-api-standards/issues/42)) ([c5d374b](https://github.com/SPSCommerce/sps-api-standards/commit/c5d374bf514a8ea7c75bab414e04c0786f5f119f)) --- sps-api-standards.spectral.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sps-api-standards.spectral.yml b/sps-api-standards.spectral.yml index ddf2838..e0dd3de 100644 --- a/sps-api-standards.spectral.yml +++ b/sps-api-standards.spectral.yml @@ -60,13 +60,19 @@ rules: operation-operationId: error operation-operationId-unique: error sps-request-support-json: - description: Every request SHOULD support `application/json` media type + description: Every request MUST support `application/json` media type formats: [oas3] severity: error - message: "{{description}}: {{error}}" - given: $.paths.[*].requestBody.content[?(@property.indexOf('json') === -1)]^ + given: $.paths[*][*].requestBody.content then: - function: falsy + function: schema + functionOptions: + schema: + type: object + properties: + application/json: true + required: + - application/json sps-no-numeric-ids: description: Avoid exposing IDs as an integer, UUIDs or other interoperable strings are preferred. severity: warn