From 7d8f77fd9d86ddd64c7d7d0d32ad525e57eba8d3 Mon Sep 17 00:00:00 2001 From: Dustin Popp Date: Tue, 17 Sep 2024 11:53:58 -0500 Subject: [PATCH] fix(ibm-string-attributes): expand rule to apply to response schemas The rule only applied to "input" schemas, which are more important to check for the attributes, but the API Handbook recommends the attributes for repsonse schemas as well. This commit expands the rule to check for those scenarios. Signed-off-by: Dustin Popp --- docs/ibm-cloud-rules.md | 1 - .../src/functions/string-attributes.js | 24 +------- .../ruleset/test/string-attributes.test.js | 57 ++++++++++++------- packages/ruleset/test/utils/root-document.js | 14 ++++- .../mock-files/oas3/clean-with-tabs.yml | 9 +++ .../cli-validator/mock-files/oas3/clean.yml | 9 +++ .../cli-validator/mock-files/oas31/clean.yml | 9 +++ 7 files changed, 79 insertions(+), 44 deletions(-) diff --git a/docs/ibm-cloud-rules.md b/docs/ibm-cloud-rules.md index 5c052f43..300bc90a 100644 --- a/docs/ibm-cloud-rules.md +++ b/docs/ibm-cloud-rules.md @@ -6522,7 +6522,6 @@ fields in order to clearly define the set of valid values for the property. [1].

Note that these checks are bypassed for the following scenarios: