blob: 35bbca50ddc7bfcfc83fc37f637f85b923c00d39 [file] [log] [blame]
{
"swagger": "2.0",
"info": {
"title": "test.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/examples.example.ABitOfEverything"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/examples.example.ABitOfEverything"
}
}
],
"tags": [
"ABitOfEverythingService"
]
}
},
"/v1/example/a_bit_of_everything/echo/{value}": {
"get": {
"operationId": "Echo",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/examples.sub.StringMessage"
}
}
},
"parameters": [
{
"name": "value",
"in": "path",
"required": true,
"type": "string",
"format": "string"
}
],
"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/examples.example.ABitOfEverything"
}
}
},
"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",
"format": "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",
"format": "string"
}
],
"tags": [
"ABitOfEverythingService"
]
}
},
"/v1/example/a_bit_of_everything/{single_nested.name}": {
"post": {
"operationId": "DeepPathEcho",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/examples.example.ABitOfEverything"
}
}
},
"parameters": [
{
"name": "single_nested.name",
"in": "path",
"required": true,
"type": "string",
"format": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/examples.example.ABitOfEverything"
}
}
],
"tags": [
"ABitOfEverythingService"
]
}
},
"/v1/example/a_bit_of_everything/{uuid}": {
"get": {
"operationId": "Lookup",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/examples.example.ABitOfEverything"
}
}
},
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"format": "string"
}
],
"tags": [
"ABitOfEverythingService"
]
},
"delete": {
"operationId": "Delete",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/google.protobuf.Empty"
}
}
},
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"format": "string"
}
],
"tags": [
"ABitOfEverythingService"
]
},
"put": {
"operationId": "Update",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/google.protobuf.Empty"
}
}
},
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"format": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/examples.example.ABitOfEverything"
}
}
],
"tags": [
"ABitOfEverythingService"
]
}
},
"/v2/example/echo": {
"get": {
"operationId": "Echo",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/examples.sub.StringMessage"
}
}
},
"tags": [
"ABitOfEverythingService"
]
},
"post": {
"operationId": "Echo",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/examples.sub.StringMessage"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/examples.sub.StringMessage"
}
}
],
"tags": [
"ABitOfEverythingService"
]
}
},
"/v2/example/timeout": {
"get": {
"operationId": "Timeout",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/google.protobuf.Empty"
}
}
},
"tags": [
"ABitOfEverythingService"
]
}
}
},
"definitions": {
"examples.example.ABitOfEverything.Nested": {
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string",
"format": "string",
"description": "name is nested field."
},
"ok": {
"$ref": "#/definitions/examples.example.ABitOfEverything.Nested.DeepEnum"
}
},
"description": "Nested is nested type."
},
"examples.example.ABitOfEverything.Nested.DeepEnum": {
"type": "string",
"enum": [
"FALSE",
"TRUE"
],
"default": "FALSE",
"description": "DeepEnum is one or zero.\nValid values:\n - FALSE: FALSE is false.\n - TRUE: TRUE is true."
},
"examples.example.ABitOfEverything": {
"type": "object",
"properties": {
"bool_value": {
"type": "boolean",
"format": "boolean"
},
"double_value": {
"type": "number",
"format": "double"
},
"enum_value": {
"$ref": "#/definitions/examples.example.NumericEnum"
},
"fixed32_value": {
"type": "integer",
"format": "int64"
},
"fixed64_value": {
"type": "string",
"format": "uint64"
},
"float_value": {
"type": "number",
"format": "float"
},
"int32_value": {
"type": "integer",
"format": "int32"
},
"int64_value": {
"type": "string",
"format": "int64"
},
"map_value": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/examples.example.NumericEnum"
}
},
"mapped_nested_value": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/examples.example.ABitOfEverything.Nested"
}
},
"mapped_string_value": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "string"
}
},
"nested": {
"type": "array",
"items": {
"$ref": "#/definitions/examples.example.ABitOfEverything.Nested"
}
},
"nonConventionalNameValue": {
"type": "string",
"format": "string"
},
"oneof_empty": {
"$ref": "#/definitions/google.protobuf.Empty"
},
"oneof_string": {
"type": "string",
"format": "string"
},
"repeated_string_value": {
"type": "array",
"items": {
"type": "string",
"format": "string"
}
},
"sfixed32_value": {
"type": "integer",
"format": "int32"
},
"sfixed64_value": {
"type": "string",
"format": "int64"
},
"single_nested": {
"$ref": "#/definitions/examples.example.ABitOfEverything.Nested"
},
"sint32_value": {
"type": "integer",
"format": "int32"
},
"sint64_value": {
"type": "string",
"format": "int64"
},
"string_value": {
"type": "string",
"format": "string"
},
"timestamp_value": {
"type": "string",
"format": "date-time"
},
"uint32_value": {
"type": "integer",
"format": "int64",
"description": "TODO(yugui) add bytes_value"
},
"uint64_value": {
"type": "string",
"format": "uint64"
},
"uuid": {
"type": "string",
"format": "string"
}
},
"description": "Intentionaly complicated message type to cover much features of Protobuf.\n NEXT ID: 27"
},
"examples.example.NumericEnum": {
"type": "string",
"enum": [
"ZERO",
"ONE"
],
"default": "ZERO",
"description": "NumericEnum is one or zero.\nValid values:\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
},
"google.protobuf.Empty": {
"type": "object",
"description": "A generic empty message that you can re-use to avoid defining duplicated\n empty messages in your APIs. A typical example is to use it as the request\n or the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\n The JSON representation for `Empty` is empty JSON object `{}`."
},
"sub2.IdMessage": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "string"
}
}
},
"examples.sub.StringMessage": {
"type": "object",
"properties": {
"value": {
"type": "string",
"format": "string"
}
}
}
}
}