Rule: resource-object-id-required is triggering on allOf items that fail the rule even though another item passes the check:
Example doc snippet:
MyResourceResponseObject:
allOf:
- $ref: '#/components/schemas/IdentifierObject'
- type: object
required:
- attributes
- relationships
properties:
type:
enum:
- resources
attributes:
type: object
required:
- name
properties:
account_id:
type: string
name:
type: string
example: do-hickey
description:
type: string
example: thing that does stuff
The rule checks for the presence of id, in the above example the $ref item contains the id, the rule continues to try and validate the second item which fails and throws the alert.
Expected behavior: schema passes as one of the items meets the id requirment.
Rule:
resource-object-id-requiredis triggering on allOf items that fail the rule even though another item passes the check:Example doc snippet:
The rule checks for the presence of
id, in the above example the$refitem contains theid, the rule continues to try and validate the second item which fails and throws the alert.Expected behavior: schema passes as one of the items meets the
idrequirment.