@ibm-cloud/openapi-ruleset
Advanced tools
Comparing version 0.14.0 to 0.14.1
@@ -0,1 +1,8 @@ | ||
## @ibm-cloud/openapi-ruleset [0.14.1](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@0.14.0...@ibm-cloud/openapi-ruleset@0.14.1) (2022-04-19) | ||
### Bug Fixes | ||
* **content-entry-provided:** dont require content entry for 304 responses ([82c0c0a](https://github.com/IBM/openapi-validator/commit/82c0c0af2b2d41e8fc1ebdaf6ff2740a39d4ac06)) | ||
# @ibm-cloud/openapi-ruleset [0.14.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@0.13.0...@ibm-cloud/openapi-ruleset@0.14.0) (2022-04-14) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@ibm-cloud/openapi-ruleset", | ||
"description": "Spectral ruleset for validating IBM Cloud services", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "private": false, |
@@ -8,3 +8,3 @@ const { oas3 } = require('@stoplight/spectral-formats'); | ||
given: [ | ||
"$.paths[*][*].responses[?(@property != '204' && @property != '202' && @property != '101')]", | ||
"$.paths[*][*].responses[?(@property != '204' && @property != '202' && @property != '101' && @property != '304')]", | ||
'$.paths[*][*].requestBody' | ||
@@ -11,0 +11,0 @@ ], |
@@ -58,2 +58,17 @@ const { contentEntryProvided } = require('../src/rules'); | ||
it('should not error if 304 response is missing content', async () => { | ||
const testDocument = makeCopy(rootDocument); | ||
testDocument.paths['/v1/movies'].delete = { | ||
responses: { | ||
'304': { | ||
description: 'No content' | ||
} | ||
} | ||
}; | ||
const results = await testRule(name, contentEntryProvided, testDocument); | ||
expect(results).toHaveLength(0); | ||
}); | ||
it('should error if 201 response is missing content', async () => { | ||
@@ -60,0 +75,0 @@ const testDocument = makeCopy(rootDocument); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
399503
11560