AsyncAPI

Checks on an AsyncAPI document and the configuration that binds its channels to methods, plus configuration that only applies to OpenAPI input.

Rule Default Summary
AsyncApi/AmbiguousProtocol warn A channel's servers disagree about the protocol; document order picked one.
AsyncApi/ChannelNotConfigured warn A declared channel is bound by no configured method, so it is not in the SDK.
AsyncApi/NoMethodsGenerated warn A configured target gets no operations at all from the AsyncAPI document.
AsyncApi/OperationNotFound warn A configured AsyncAPI operation id does not target the bound channel.
AsyncApi/TransformationsIgnored info Configured openapi.transformations are skipped for a non-OpenAPI input.
AsyncApi/UnnamedSecurityScheme warn A server states a security scheme inline, so no credential is generated.
AsyncApi/UnsendablePayload warn A channel is configured at a bodyless verb, so the messages it sends are dropped.

AsyncApi/AmbiguousProtocol

A channel's servers disagree about the protocol; document order picked one.

Default severity Fix lives in
warn Your API description (document)

When it fires

A channel's servers disagree on protocol; names which one won.

Changing or silencing it

Each finding's suppression key is the channel id, such as chat.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/AmbiguousProtocol": "info"
    },
    "ignored": {
      "AsyncApi/AmbiguousProtocol": "<suppression key>"
    }
  }
}

AsyncApi/ChannelNotConfigured

A declared channel is bound by no configured method, so it is not in the SDK.

Default severity Fix lives in
warn Your SDK configuration (config)

When it fires

The document declares a channel no configured method binds.

Changing or silencing it

Each finding's suppression key is the channel id.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/ChannelNotConfigured": "info"
    },
    "ignored": {
      "AsyncApi/ChannelNotConfigured": "<suppression key>"
    }
  }
}

AsyncApi/NoMethodsGenerated

A configured target gets no operations at all from the AsyncAPI document.

Default severity Fix lives in
warn Your SDK configuration (config)

When it fires

A target ends up with models and a client but no methods.

Changing or silencing it

Each finding's suppression key is /channels; the target is in the finding's target field.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/NoMethodsGenerated": "info"
    },
    "ignored": {
      "AsyncApi/NoMethodsGenerated": "<suppression key>"
    }
  }
}

AsyncApi/OperationNotFound

A configured AsyncAPI operation id does not target the bound channel.

Default severity Fix lives in
warn Your SDK configuration (config)

When it fires

asyncapi.operations names ids no operation on the channel answers to.

Changing or silencing it

Each finding's suppression key is the channel id and the operation ids it lists, such as chat sendMessage.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/OperationNotFound": "info"
    },
    "ignored": {
      "AsyncApi/OperationNotFound": "<suppression key>"
    }
  }
}

AsyncApi/TransformationsIgnored

Configured openapi.transformations are skipped for a non-OpenAPI input.

Default severity Fix lives in
info Your SDK configuration (config)

When it fires

openapi.transformations is configured for a document that is not OpenAPI.

Changing or silencing it

Each finding's suppression key is /openapi/transformations.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/TransformationsIgnored": "off"
    },
    "ignored": {
      "AsyncApi/TransformationsIgnored": "<suppression key>"
    }
  }
}

AsyncApi/UnnamedSecurityScheme

A server states a security scheme inline, so no credential is generated.

Default severity Fix lives in
warn Your API description (document)

When it fires

A server states a security scheme inline instead of referencing one.

Changing or silencing it

Each finding's suppression key is the server name.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/UnnamedSecurityScheme": "info"
    },
    "ignored": {
      "AsyncApi/UnnamedSecurityScheme": "<suppression key>"
    }
  }
}

AsyncApi/UnsendablePayload

A channel is configured at a bodyless verb, so the messages it sends are dropped.

Default severity Fix lives in
warn Your SDK configuration (config)

When it fires

An HTTP channel's outbound payloads sit on a verb that cannot carry a body.

Changing or silencing it

Each finding's suppression key is the channel id.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "AsyncApi/UnsendablePayload": "info"
    },
    "ignored": {
      "AsyncApi/UnsendablePayload": "<suppression key>"
    }
  }
}

See also

What did you think of this content?