FAQ

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

    oas2PolymorphicOneOf


    oas2PolymorphicOneOf will check a specification to ensure that if it’s a Swagger specification (OpenAPI 2.0), then it has not made use of oneOf.

    Example ruleset configuration

    oas2-oneOf:
      description: "Check for invalid use of 'oneOf'"
      type: "validation"
      recommended: true
      severity: "err"
      given: "$"
      then:
        function: "oas2PolymorphicOneOf"
    

    The function is used by the oas2-oneOf Rule


    View Function Source