api-quality-spectral-ruleset 1.4.0-beta.2 → 1.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apq-spectral.yaml +7 -3
- package/package.json +1 -1
package/apq-spectral.yaml
CHANGED
|
@@ -621,13 +621,17 @@ rules:
|
|
|
621
621
|
message: "OAR044: Declared media type range should conform to RFC7231."
|
|
622
622
|
severity: "error"
|
|
623
623
|
given:
|
|
624
|
-
- "$.paths.*.*.responses
|
|
625
|
-
- "$.paths
|
|
624
|
+
- "$.paths.*.*.responses[?(@property !== '204')].content.*~"
|
|
625
|
+
- "$.paths.*[post,put,patch].requestBody.content.*~"
|
|
626
|
+
- "$.paths.*.*.parameters[*].content.*~"
|
|
627
|
+
- "$.paths.*.parameters[*].content.*~"
|
|
628
|
+
- "$.components.responses.*.content.*~"
|
|
626
629
|
- "$.components.requestBodies.*.content.*~"
|
|
630
|
+
- "$.components.parameters.*.content.*~"
|
|
627
631
|
then:
|
|
628
632
|
function: pattern
|
|
629
633
|
functionOptions:
|
|
630
|
-
match: "^(\\*|[a-zA-Z0-9][a-zA-Z0-9
|
|
634
|
+
match: "^(\\*|[a-zA-Z0-9.][a-zA-Z0-9.!#$&_^+\\-]+)/(\\*|[a-zA-Z0-9.][a-zA-Z0-9.!#$&_^+\\-]+(; charset=[a-zA-Z0-9_\\-]+)?)$"
|
|
631
635
|
apiq:OAR045:
|
|
632
636
|
description: "Response schema is required for responses with status codes 201 and others that return content."
|
|
633
637
|
message: "OAR045: Response schema is required for status code '{{property}}'."
|