mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 17:14:28 +00:00
Add swagger docs
This commit is contained in:
110
server/docs/docs.go
Normal file
110
server/docs/docs.go
Normal file
@@ -0,0 +1,110 @@
|
||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "MIT License",
|
||||
"url": "https://opensource.org/license/mit/"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/server/devices": {
|
||||
"get": {
|
||||
"description": "Returns a list of available devices for the llama server",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "List available devices for llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of devices",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/server/help": {
|
||||
"get": {
|
||||
"description": "Returns the help text for the llama server command",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "Get help for llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Help text",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/server/version": {
|
||||
"get": {
|
||||
"description": "Returns the version of the llama server command",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "Get version of llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Version information",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "/api/v1",
|
||||
Schemes: []string{},
|
||||
Title: "Llama Server Control",
|
||||
Description: "This is a control server for managing Llama Server instances.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
||||
85
server/docs/swagger.json
Normal file
85
server/docs/swagger.json
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a control server for managing Llama Server instances.",
|
||||
"title": "Llama Server Control",
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "MIT License",
|
||||
"url": "https://opensource.org/license/mit/"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/api/v1",
|
||||
"paths": {
|
||||
"/server/devices": {
|
||||
"get": {
|
||||
"description": "Returns a list of available devices for the llama server",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "List available devices for llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of devices",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/server/help": {
|
||||
"get": {
|
||||
"description": "Returns the help text for the llama server command",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "Get help for llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Help text",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/server/version": {
|
||||
"get": {
|
||||
"description": "Returns the version of the llama server command",
|
||||
"tags": [
|
||||
"server"
|
||||
],
|
||||
"summary": "Get version of llama server",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Version information",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
server/docs/swagger.yaml
Normal file
56
server/docs/swagger.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
basePath: /api/v1
|
||||
info:
|
||||
contact: {}
|
||||
description: This is a control server for managing Llama Server instances.
|
||||
license:
|
||||
name: MIT License
|
||||
url: https://opensource.org/license/mit/
|
||||
title: Llama Server Control
|
||||
version: "1.0"
|
||||
paths:
|
||||
/server/devices:
|
||||
get:
|
||||
description: Returns a list of available devices for the llama server
|
||||
responses:
|
||||
"200":
|
||||
description: List of devices
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
type: string
|
||||
summary: List available devices for llama server
|
||||
tags:
|
||||
- server
|
||||
/server/help:
|
||||
get:
|
||||
description: Returns the help text for the llama server command
|
||||
responses:
|
||||
"200":
|
||||
description: Help text
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
type: string
|
||||
summary: Get help for llama server
|
||||
tags:
|
||||
- server
|
||||
/server/version:
|
||||
get:
|
||||
description: Returns the version of the llama server command
|
||||
responses:
|
||||
"200":
|
||||
description: Version information
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
type: string
|
||||
summary: Get version of llama server
|
||||
tags:
|
||||
- server
|
||||
swagger: "2.0"
|
||||
Reference in New Issue
Block a user