{
  "swagger": "2.0",
  "info": {
    "title": "examples/examplepb/a_bit_of_everything.proto",
    "version": "version not set"
  },
  "schemes": [
    "http",
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/example/a_bit_of_everything": {
      "post": {
        "operationId": "CreateBody",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v1/example/a_bit_of_everything/echo/{value}": {
      "get": {
        "operationId": "Echo",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/subStringMessage"
            }
          }
        },
        "parameters": [
          {
            "name": "value",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v1/example/a_bit_of_everything/query/{uuid}": {
      "get": {
        "operationId": "GetQuery",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/protobufEmpty"
            }
          }
        },
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "single_nested.name",
            "description": "name is nested field.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "single_nested.amount",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "single_nested.ok",
            "description": " - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "FALSE",
              "TRUE"
            ],
            "default": "FALSE"
          },
          {
            "name": "float_value",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "float"
          },
          {
            "name": "double_value",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "double"
          },
          {
            "name": "int64_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "uint64_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "int32_value",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "fixed64_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "fixed32_value",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "bool_value",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          },
          {
            "name": "string_value",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "uint32_value",
            "description": "TODO(yugui) add bytes_value.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "enum_value",
            "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ZERO",
              "ONE"
            ],
            "default": "ZERO"
          },
          {
            "name": "sfixed32_value",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sfixed64_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "sint32_value",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sint64_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "repeated_string_value",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "oneof_string",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "nonConventionalNameValue",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "timestamp_value",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "repeated_enum_value",
            "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ZERO",
                "ONE"
              ]
            }
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}": {
      "post": {
        "operationId": "Create",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        },
        "parameters": [
          {
            "name": "float_value",
            "in": "path",
            "required": true,
            "type": "number",
            "format": "float"
          },
          {
            "name": "double_value",
            "in": "path",
            "required": true,
            "type": "number",
            "format": "double"
          },
          {
            "name": "int64_value",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "uint64_value",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "int32_value",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "fixed64_value",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "fixed32_value",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "bool_value",
            "in": "path",
            "required": true,
            "type": "boolean",
            "format": "boolean"
          },
          {
            "name": "string_value",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "uint32_value",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "sfixed32_value",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sfixed64_value",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "sint32_value",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sint64_value",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "nonConventionalNameValue",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v1/example/a_bit_of_everything/{single_nested.name}": {
      "post": {
        "operationId": "DeepPathEcho",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        },
        "parameters": [
          {
            "name": "single_nested.name",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v1/example/a_bit_of_everything/{uuid}": {
      "get": {
        "operationId": "Lookup",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        },
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      },
      "delete": {
        "operationId": "Delete",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/protobufEmpty"
            }
          }
        },
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      },
      "put": {
        "operationId": "Update",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/protobufEmpty"
            }
          }
        },
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/examplepbABitOfEverything"
            }
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v2/example/echo": {
      "get": {
        "operationId": "Echo",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/subStringMessage"
            }
          }
        },
        "parameters": [
          {
            "name": "value",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      },
      "post": {
        "operationId": "Echo",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/subStringMessage"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    },
    "/v2/example/timeout": {
      "get": {
        "operationId": "Timeout",
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/protobufEmpty"
            }
          }
        },
        "tags": [
          "ABitOfEverythingService"
        ]
      }
    }
  },
  "definitions": {
    "ABitOfEverythingNested": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "name is nested field."
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "ok": {
          "$ref": "#/definitions/NestedDeepEnum"
        }
      },
      "description": "Nested is nested type."
    },
    "NestedDeepEnum": {
      "type": "string",
      "enum": [
        "FALSE",
        "TRUE"
      ],
      "default": "FALSE",
      "description": "DeepEnum is one or zero.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true."
    },
    "examplepbABitOfEverything": {
      "type": "object",
      "properties": {
        "single_nested": {
          "$ref": "#/definitions/ABitOfEverythingNested"
        },
        "uuid": {
          "type": "string"
        },
        "nested": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ABitOfEverythingNested"
          }
        },
        "float_value": {
          "type": "number",
          "format": "float"
        },
        "double_value": {
          "type": "number",
          "format": "double"
        },
        "int64_value": {
          "type": "string",
          "format": "int64"
        },
        "uint64_value": {
          "type": "string",
          "format": "uint64"
        },
        "int32_value": {
          "type": "integer",
          "format": "int32"
        },
        "fixed64_value": {
          "type": "string",
          "format": "uint64"
        },
        "fixed32_value": {
          "type": "integer",
          "format": "int64"
        },
        "bool_value": {
          "type": "boolean",
          "format": "boolean"
        },
        "string_value": {
          "type": "string"
        },
        "uint32_value": {
          "type": "integer",
          "format": "int64",
          "title": "TODO(yugui) add bytes_value"
        },
        "enum_value": {
          "$ref": "#/definitions/examplepbNumericEnum"
        },
        "sfixed32_value": {
          "type": "integer",
          "format": "int32"
        },
        "sfixed64_value": {
          "type": "string",
          "format": "int64"
        },
        "sint32_value": {
          "type": "integer",
          "format": "int32"
        },
        "sint64_value": {
          "type": "string",
          "format": "int64"
        },
        "repeated_string_value": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oneof_empty": {
          "$ref": "#/definitions/protobufEmpty"
        },
        "oneof_string": {
          "type": "string"
        },
        "map_value": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/examplepbNumericEnum"
          }
        },
        "mapped_string_value": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "mapped_nested_value": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ABitOfEverythingNested"
          }
        },
        "nonConventionalNameValue": {
          "type": "string"
        },
        "timestamp_value": {
          "type": "string",
          "format": "date-time"
        },
        "repeated_enum_value": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/examplepbNumericEnum"
          },
          "title": "repeated enum value. it is comma-separated in query"
        }
      },
      "title": "Intentionaly complicated message type to cover much features of Protobuf.\nNEXT ID: 27"
    },
    "examplepbNumericEnum": {
      "type": "string",
      "enum": [
        "ZERO",
        "ONE"
      ],
      "default": "ZERO",
      "description": "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
    },
    "protobufDuration": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "string",
          "format": "int64",
          "description": "Signed seconds of the span of time. Must be from -315,576,000,000\nto +315,576,000,000 inclusive."
        },
        "nanos": {
          "type": "integer",
          "format": "int32",
          "description": "Signed fractions of a second at nanosecond resolution of the span\nof time. Durations less than one second are represented with a 0\n`seconds` field and a positive or negative `nanos` field. For durations\nof one second or more, a non-zero value for the `nanos` field must be\nof the same sign as the `seconds` field. Must be from -999,999,999\nto +999,999,999 inclusive."
        }
      },
      "description": "A Duration represents a signed, fixed-length span of time represented\nas a count of seconds and fractions of seconds at nanosecond\nresolution. It is independent of any calendar and concepts like \"day\"\nor \"month\". It is related to Timestamp in that the difference between\ntwo Timestamp values is a Duration and it can be added or subtracted\nfrom a Timestamp. Range is approximately +-10,000 years.\n\nExample 1: Compute Duration from two Timestamps in pseudo code.\n\n    Timestamp start = ...;\n    Timestamp end = ...;\n    Duration duration = ...;\n\n    duration.seconds = end.seconds - start.seconds;\n    duration.nanos = end.nanos - start.nanos;\n\n    if (duration.seconds \u003c 0 \u0026\u0026 duration.nanos \u003e 0) {\n      duration.seconds += 1;\n      duration.nanos -= 1000000000;\n    } else if (durations.seconds \u003e 0 \u0026\u0026 duration.nanos \u003c 0) {\n      duration.seconds -= 1;\n      duration.nanos += 1000000000;\n    }\n\nExample 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n\n    Timestamp start = ...;\n    Duration duration = ...;\n    Timestamp end = ...;\n\n    end.seconds = start.seconds + duration.seconds;\n    end.nanos = start.nanos + duration.nanos;\n\n    if (end.nanos \u003c 0) {\n      end.seconds -= 1;\n      end.nanos += 1000000000;\n    } else if (end.nanos \u003e= 1000000000) {\n      end.seconds += 1;\n      end.nanos -= 1000000000;\n    }\n\nExample 3: Compute Duration from datetime.timedelta in Python.\n\n    td = datetime.timedelta(days=3, minutes=10)\n    duration = Duration()\n    duration.FromTimedelta(td)"
    },
    "protobufEmpty": {
      "type": "object",
      "description": "service Foo {\n      rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n    }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
      "title": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:"
    },
    "sub2IdMessage": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        }
      }
    },
    "subStringMessage": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        }
      }
    }
  }
}
