From 2714bd1178a9172825fbd2b87002a450f9c44e34 Mon Sep 17 00:00:00 2001 From: "zero@thinky" Date: Sun, 5 Apr 2026 07:50:57 +0300 Subject: [PATCH] docs --- backend/docs/docs.go | 139 ++++++++++++++++++++++++++++++++++++++ backend/docs/swagger.json | 139 ++++++++++++++++++++++++++++++++++++++ backend/docs/swagger.yaml | 86 +++++++++++++++++++++++ 3 files changed, 364 insertions(+) diff --git a/backend/docs/docs.go b/backend/docs/docs.go index 95d94bc..3445cbd 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go @@ -994,6 +994,145 @@ const docTemplate = `{ } } }, + "/graph": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns the service dependency graph as raw YAML text", + "produces": [ + "text/plain" + ], + "tags": [ + "graph" + ], + "summary": "Get dependency graph YAML", + "responses": { + "200": { + "description": "YAML content", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Replaces the service dependency graph YAML and reloads it", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Update dependency graph YAML", + "parameters": [ + { + "description": "New YAML content", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/graph/cycle": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns whether the dependency graph contains cycles", + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Check for cycles", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + } + } + } + }, + "/graph/order": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns the topologically sorted service startup order", + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Get startup order", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, "/jobs": { "post": { "description": "Sends a command to the specified agent and returns a URL to wait for the result", diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json index 2fa0494..14e776b 100644 --- a/backend/docs/swagger.json +++ b/backend/docs/swagger.json @@ -983,6 +983,145 @@ } } }, + "/graph": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns the service dependency graph as raw YAML text", + "produces": [ + "text/plain" + ], + "tags": [ + "graph" + ], + "summary": "Get dependency graph YAML", + "responses": { + "200": { + "description": "YAML content", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Replaces the service dependency graph YAML and reloads it", + "consumes": [ + "text/plain" + ], + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Update dependency graph YAML", + "parameters": [ + { + "description": "New YAML content", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/graph/cycle": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns whether the dependency graph contains cycles", + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Check for cycles", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + } + } + } + }, + "/graph/order": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "Returns the topologically sorted service startup order", + "produces": [ + "application/json" + ], + "tags": [ + "graph" + ], + "summary": "Get startup order", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, "/jobs": { "post": { "description": "Sends a command to the specified agent and returns a URL to wait for the result", diff --git a/backend/docs/swagger.yaml b/backend/docs/swagger.yaml index e82e629..2c2b740 100644 --- a/backend/docs/swagger.yaml +++ b/backend/docs/swagger.yaml @@ -1157,6 +1157,92 @@ paths: summary: Validate token tags: - auth + /graph: + get: + description: Returns the service dependency graph as raw YAML text + produces: + - text/plain + responses: + "200": + description: YAML content + schema: + type: string + security: + - Bearer: [] + summary: Get dependency graph YAML + tags: + - graph + put: + consumes: + - text/plain + description: Replaces the service dependency graph YAML and reloads it + parameters: + - description: New YAML content + in: body + name: body + required: true + schema: + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: + type: string + type: object + "400": + description: Bad Request + schema: + additionalProperties: + type: string + type: object + security: + - Bearer: [] + summary: Update dependency graph YAML + tags: + - graph + /graph/cycle: + get: + description: Returns whether the dependency graph contains cycles + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: + type: boolean + type: object + security: + - Bearer: [] + summary: Check for cycles + tags: + - graph + /graph/order: + get: + description: Returns the topologically sorted service startup order + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + type: string + type: array + "400": + description: Bad Request + schema: + additionalProperties: + type: string + type: object + security: + - Bearer: [] + summary: Get startup order + tags: + - graph /jobs: post: consumes: