{
  "swagger": "2.0",
  "info": {
    "title": "Bar API",
    "version": "0.1.0",
    "contact": {
      "name": "John Doe",
      "email": "john.dow@example.com"
    }
  },
  "tags": [
    {
      "name": "BarAPI"
    }
  ],
  "schemes": [
    "http",
    "https",
    "wss"
  ],
  "consumes": [
    "application/json",
    "application/protobuf"
  ],
  "produces": [
    "application/json",
    "application/protobuf"
  ],
  "paths": {
    "/bar/health": {
      "post": {
        "summary": "Health test.",
        "operationId": "BarAPI_Health",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1HealthResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "BarAPI"
        ]
      }
    },
    "/bar/ping": {
      "post": {
        "summary": "Reachability test.",
        "operationId": "BarAPI_Ping",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Pong"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "BarAPI"
        ]
      }
    },
    "/bar/request": {
      "post": {
        "summary": "Sample request.",
        "operationId": "BarAPI_Request",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/samplev1Response"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "BarAPI"
        ]
      }
    }
  },
  "definitions": {
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "samplev1Response": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "title": "A key on the entity"
        }
      },
      "description": "Generic request response."
    },
    "v1HealthResponse": {
      "type": "object",
      "properties": {
        "alive": {
          "type": "boolean",
          "description": "Generic availability check, set to 'false' in case of errors."
        }
      },
      "description": "Health test response."
    },
    "v1Pong": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "title": "Whether the service is 'ready-for-use'"
        }
      },
      "description": "Reachability test response."
    }
  },
  "securityDefinitions": {
    "bearer": {
      "type": "apiKey",
      "description": "Authentication token provided as: 'Bearer {token}'",
      "name": "Authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}