Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md

README.md

HTTP Bindings

This document defines how to describe HTTP-specific information on AsyncAPI.

Version

Current version is 0.1.0.

Server Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.

Channel Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.

Operation Binding Object

Fixed Fields
Field Name Type Description
type string Required. Type of operation. Its value MUST be either request or response.
method string When type is request, this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, CONNECT, and TRACE.
query Schema Object A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.
bindingVersion string The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

Example
channels:
  /employees:
    subscribe:
      bindings:
        http:
          type: request
          method: GET
          query:
            type: object
            required:
              - companyId
            properties:
              companyId:
                type: number
                minimum: 1
                description: The Id of the company.
            additionalProperties: false
          bindingVersion: '0.1.0'

Message Binding Object

This object contains information about the message representation in HTTP.

Fixed Fields
Field Name Type Description
headers Schema Object A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type object and have a properties key.
bindingVersion string The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

channels:
  test:
    publish:
      message:
        bindings:
          http:
            headers:
              type: object
              properties:
                Content-Type:
                  type: string
                  enum: ['application/json']
            meta:
              version: '0.1.0'
You can’t perform that action at this time.