You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ibm-well-defined-dictionaries): include patternProperties in validation (#713)
Currently, the rule only considers dictionaries defined with
`additionalProperties`. OpenAPI 3.1.x supports defining dictionaries
with `patternProperties`, so this commit adds consideration for this
field in its validation, in addition to `additionalProperties`.
Signed-off-by: Dustin Popp <[email protected]>
Copy file name to clipboardExpand all lines: docs/ibm-cloud-rules.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -7328,8 +7328,8 @@ paths:
7328
7328
This rule validates that any dictionary schemas are well defined and that all values share a single type.
7329
7329
Dictionaries are defined as object type schemas that have variable key names. They are distinct from model types,
7330
7330
which are objects with pre-defined properties. A schema must not define both concrete properties and variable key names.
7331
-
Practically, this means a schema must explicitly define a `properties` object or an `additionalProperties` schema, but not both.
7332
-
If used, the `additionalProperties` schema must define a concrete type. The concrete type of the values must not be a dictionary itself. See the <a href="https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-types">IBM Cloud API Handbook documentation on types</a> for more info.
7331
+
Practically, this means a schema must explicitly define a `properties` object or an `(additional|pattern)Properties` schema, but not both.
7332
+
If used, the `(additional|pattern)Properties` schema must define a concrete type. The concrete type of the values must not be a dictionary itself. See the <a href="https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-types">IBM Cloud API Handbook documentation on types</a> for more info.
0 commit comments