route/proto/route.swagger.json

275 lines
5.2 KiB
JSON
Raw Normal View History

2017-01-27 02:43:17 +00:00
{
"swagger": "2.0",
"info": {
"title": "route.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
2017-04-28 21:56:52 +00:00
"/v1/routes": {
"get": {
"operationId": "GetAll",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeGetAllRoutesResponse"
}
}
},
"tags": [
"Routes"
]
},
2017-01-27 02:43:17 +00:00
"post": {
2017-04-28 21:56:52 +00:00
"operationId": "Put",
2017-01-27 02:43:17 +00:00
"responses": {
"200": {
"description": "",
"schema": {
2017-04-28 21:56:52 +00:00
"$ref": "#/definitions/routeIDResponse"
2017-01-27 02:43:17 +00:00
}
}
},
"tags": [
2017-04-28 21:56:52 +00:00
"Routes"
2017-01-27 02:43:17 +00:00
]
}
},
2017-04-28 21:56:52 +00:00
"/v1/routes/{host}": {
2017-01-27 02:43:17 +00:00
"get": {
2017-04-28 21:56:52 +00:00
"operationId": "Get",
2017-01-27 02:43:17 +00:00
"responses": {
"200": {
"description": "",
"schema": {
2017-04-28 21:56:52 +00:00
"$ref": "#/definitions/routeRoute"
2017-01-27 02:43:17 +00:00
}
}
},
"parameters": [
{
"name": "host",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
2017-04-28 21:56:52 +00:00
"Routes"
2017-01-27 02:43:17 +00:00
]
},
"delete": {
2017-04-28 21:56:52 +00:00
"operationId": "Delete",
2017-01-27 02:43:17 +00:00
"responses": {
"200": {
"description": "",
"schema": {
2017-04-28 21:56:52 +00:00
"$ref": "#/definitions/routeIDResponse"
2017-01-27 02:43:17 +00:00
}
}
},
"parameters": [
{
"name": "host",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
2017-04-28 21:56:52 +00:00
"Routes"
2017-01-27 02:43:17 +00:00
]
}
},
2017-04-28 21:56:52 +00:00
"/v1/tokens": {
"get": {
"operationId": "GetAll",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeTokenSet"
}
}
},
"tags": [
"Tokens"
]
},
"delete": {
"operationId": "Delete",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeNil"
}
}
},
"tags": [
"Tokens"
]
},
2017-01-27 02:43:17 +00:00
"post": {
2017-04-28 21:56:52 +00:00
"operationId": "Put",
2017-01-27 02:43:17 +00:00
"responses": {
"200": {
"description": "",
"schema": {
2017-04-29 02:47:24 +00:00
"$ref": "#/definitions/routeToken"
2017-01-27 02:43:17 +00:00
}
}
},
"tags": [
"Tokens"
]
}
},
2017-04-28 21:56:52 +00:00
"/v1/tokens/deactivate": {
2017-01-27 02:43:17 +00:00
"post": {
2017-04-28 21:56:52 +00:00
"operationId": "Deactivate",
2017-01-27 02:43:17 +00:00
"responses": {
"200": {
"description": "",
"schema": {
2017-04-28 21:56:52 +00:00
"$ref": "#/definitions/routeNil"
2017-01-27 02:43:17 +00:00
}
}
},
"tags": [
2017-04-28 21:56:52 +00:00
"Tokens"
2017-01-27 02:43:17 +00:00
]
}
},
2017-04-28 21:56:52 +00:00
"/v1/tokens/one": {
"get": {
"operationId": "Get",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeToken"
}
}
2017-01-27 02:43:17 +00:00
},
2017-04-28 21:56:52 +00:00
"parameters": [
{
"name": "token",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "id",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Tokens"
]
2017-01-27 02:43:17 +00:00
}
2017-04-28 21:56:52 +00:00
}
},
"definitions": {
"routeGetAllRoutesResponse": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
2017-04-28 21:56:52 +00:00
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/routeRoute"
}
2017-01-27 02:43:17 +00:00
}
}
},
2017-04-28 21:56:52 +00:00
"routeGetRouteRequest": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
2017-04-28 21:56:52 +00:00
"host": {
2017-01-27 02:43:17 +00:00
"type": "string"
}
}
},
2017-04-28 21:56:52 +00:00
"routeGetTokenRequest": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
"token": {
"type": "string"
},
2017-04-28 21:56:52 +00:00
"id": {
2017-01-27 02:43:17 +00:00
"type": "string"
}
}
},
2017-04-28 21:56:52 +00:00
"routeIDResponse": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
2017-04-28 21:56:52 +00:00
"routeNil": {
"type": "object"
2017-01-27 02:43:17 +00:00
},
2017-04-28 21:56:52 +00:00
"routeRoute": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
"id": {
"type": "string"
},
2017-04-28 21:56:52 +00:00
"creator": {
2017-01-27 02:43:17 +00:00
"type": "string"
},
2017-04-28 21:56:52 +00:00
"host": {
2017-01-27 02:43:17 +00:00
"type": "string"
}
}
},
2017-04-28 21:56:52 +00:00
"routeToken": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
2017-04-28 21:56:52 +00:00
"id": {
2017-01-27 02:43:17 +00:00
"type": "string"
},
2017-04-28 21:56:52 +00:00
"body": {
2017-01-27 02:43:17 +00:00
"type": "string"
},
2017-04-28 21:56:52 +00:00
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"format": "boolean"
2017-01-27 02:43:17 +00:00
}
}
},
2017-04-28 21:56:52 +00:00
"routeTokenSet": {
2017-01-27 02:43:17 +00:00
"type": "object",
"properties": {
2017-04-28 21:56:52 +00:00
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/routeToken"
}
2017-01-27 02:43:17 +00:00
}
}
}
}
}