FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor

    refSiblings


    refSiblings checks every $ref in the specification to ensure that it’s a lone child node, and does not contain and siblings.

    OpenAPI ignores everything but the ref. This is a problem because JSON Schema allows sibling nodes.

    Example ruleset configuration

    no-$ref-sibling:
      description: "Ensure there are no sibling nodes next to $ref properties"
      type: "validation"
      recommended: true
      severity: "error"
      given: "$"
      then:
        function: "refSiblings"
    

    The function is used by the no-$ref-siblings Rule


    View Function Source