FAQ

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

    asyncApiContentType


    asyncApiContentType is an AsyncAPI-specific function for vacuum rules.

    What does it validate?

    Ensures payload-bearing messages have contentType or use root defaultContentType.

    Options

    No function options are required.

    Result behavior

    Messages missing content type information are reported on the message node.

    Example ruleset configuration

    rules:
      example-asyncapicontenttype:
        description: Validate message content type declarations.
        severity: error
        formats: [asyncapi3]
        given: $
        then:
          function: asyncApiContentType
    

    Used by


    View Function Source