Update swagger

This commit is contained in:
Juan Font 2022-11-26 00:03:20 +00:00
parent cd2d2ef7e5
commit 68d2eaaaa6

View File

@ -367,13 +367,12 @@
}, },
"/api/v1/machine/{machineId}/routes": { "/api/v1/machine/{machineId}/routes": {
"get": { "get": {
"summary": "--- Route start ---", "operationId": "HeadscaleService_GetMachineRoutes",
"operationId": "HeadscaleService_GetMachineRoute",
"responses": { "responses": {
"200": { "200": {
"description": "A successful response.", "description": "A successful response.",
"schema": { "schema": {
"$ref": "#/definitions/v1GetMachineRouteResponse" "$ref": "#/definitions/v1GetMachineRoutesResponse"
} }
}, },
"default": { "default": {
@ -395,45 +394,6 @@
"tags": [ "tags": [
"HeadscaleService" "HeadscaleService"
] ]
},
"post": {
"operationId": "HeadscaleService_EnableMachineRoutes",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1EnableMachineRoutesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "machineId",
"in": "path",
"required": true,
"type": "string",
"format": "uint64"
},
{
"name": "routes",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
}
],
"tags": [
"HeadscaleService"
]
} }
}, },
"/api/v1/machine/{machineId}/tags": { "/api/v1/machine/{machineId}/tags": {
@ -722,6 +682,91 @@
"HeadscaleService" "HeadscaleService"
] ]
} }
},
"/api/v1/routes": {
"get": {
"summary": "--- Route start ---",
"operationId": "HeadscaleService_GetRoutes",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetRoutesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"HeadscaleService"
]
}
},
"/api/v1/routes/{routeId}/disable": {
"post": {
"operationId": "HeadscaleService_DisableRoute",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1DisableRouteResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "routeId",
"in": "path",
"required": true,
"type": "string",
"format": "uint64"
}
],
"tags": [
"HeadscaleService"
]
}
},
"/api/v1/routes/{routeId}/enable": {
"post": {
"operationId": "HeadscaleService_EnableRoute",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1EnableRouteResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "routeId",
"in": "path",
"required": true,
"type": "string",
"format": "uint64"
}
],
"tags": [
"HeadscaleService"
]
}
} }
}, },
"definitions": { "definitions": {
@ -875,13 +920,11 @@
"v1DeleteNamespaceResponse": { "v1DeleteNamespaceResponse": {
"type": "object" "type": "object"
}, },
"v1EnableMachineRoutesResponse": { "v1DisableRouteResponse": {
"type": "object", "type": "object"
"properties": { },
"routes": { "v1EnableRouteResponse": {
"$ref": "#/definitions/v1Routes" "type": "object"
}
}
}, },
"v1ExpireApiKeyRequest": { "v1ExpireApiKeyRequest": {
"type": "object", "type": "object",
@ -924,11 +967,14 @@
} }
} }
}, },
"v1GetMachineRouteResponse": { "v1GetMachineRoutesResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
"routes": { "routes": {
"$ref": "#/definitions/v1Routes" "type": "array",
"items": {
"$ref": "#/definitions/v1Route"
}
} }
} }
}, },
@ -940,6 +986,17 @@
} }
} }
}, },
"v1GetRoutesResponse": {
"type": "object",
"properties": {
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Route"
}
}
}
},
"v1ListApiKeysResponse": { "v1ListApiKeysResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1151,20 +1208,39 @@
} }
} }
}, },
"v1Routes": { "v1Route": {
"type": "object", "type": "object",
"properties": { "properties": {
"advertisedRoutes": { "id": {
"type": "array", "type": "string",
"items": { "format": "uint64"
"type": "string"
}
}, },
"enabledRoutes": { "machine": {
"type": "array", "$ref": "#/definitions/v1Machine"
"items": { },
"type": "string" "prefix": {
} "type": "string"
},
"advertised": {
"type": "boolean"
},
"enabled": {
"type": "boolean"
},
"isPrimary": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"deletedAt": {
"type": "string",
"format": "date-time"
} }
} }
}, },