Skip to content

HTTP operation binding

Contains information about the operation representation in HTTP.

Structure

copy

Examples

Get

json
{
      "method": "GET", 
      "query": {
        "type": "object",
        "required": [
          "companyId"
        ],
        "properties": {
          "companyId": {
            "type": "number",
            "minimum": 1,
            "description": "The Id of the company."
          }
        },
        "additionalProperties": false
      },
      "bindingVersion": "0.2.0"
}

Post

json
{
    "method": "POST", 
    "query": {
        "type": "object",
        "required": [
            "companyId"
        ],
        "properties": {
            "companyId": {
                "type": "number",
                "minimum": 1,
                "description": "The Id of the company."
            }
        },
        "additionalProperties": false
    },
    "bindingVersion": "0.2.0"
}

Changelog

Removed

type

json
{
    "type": { 
      "type": "string", 
      "enum": [ 
        "request", 
        "response"
      ], 
      "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'."
    } 
}

Changed

query

query can't be Reference anymore. Only Schema

json
{
    "query": {
      "oneOf": [ 
        { 
          "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
        }, 
        { 
          "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
        } 
      ], 
      "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key."
    }
}