Skip to content

AsyncAPIOperation

faststream.asyncapi.base.AsyncAPIOperation dataclass #

A class representing an asynchronous API operation.

METHOD DESCRIPTION
schema

returns the schema of the API operation as a dictionary of channel names and channel objects

include_in_schema class-attribute instance-attribute #

include_in_schema: bool = field(default=True)

name #

name() -> str

Returns the name of the API operation.

Source code in faststream/asyncapi/base.py
@abstractproperty
def name(self) -> str:
    """Returns the name of the API operation."""
    raise NotImplementedError()

schema #

schema() -> Dict[str, Channel]

Returns the schema of the API operation as a dictionary of channel names and channel objects.

Source code in faststream/asyncapi/base.py
def schema(self) -> Dict[str, Channel]:  # pragma: no cover
    """Returns the schema of the API operation as a dictionary of channel names and channel objects."""
    return {}