feat(swagger): update swagger (#9643)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
LocalAI [bot]
2026-05-02 22:33:47 +02:00
committed by GitHub
parent 18e039f305
commit 1ad5b5907d
3 changed files with 387 additions and 0 deletions

View File

@@ -613,6 +613,101 @@ const docTemplate = `{
}
}
},
"/api/branding": {
"get": {
"description": "Returns the configured instance name, tagline, and asset URLs. Public — no authentication required.",
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Get instance branding",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
}
}
}
},
"/api/branding/asset/{kind}": {
"post": {
"description": "Upload a custom logo, horizontal logo, or favicon. The file replaces any previous override for that kind.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Upload a branding asset",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
},
{
"type": "file",
"description": "Image file (png, jpeg, svg, webp, ico — up to 5MiB)",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Remove a custom branding asset; the UI falls back to the bundled LocalAI default.",
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Reset a branding asset to default",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
}
}
}
},
"/api/instructions": {
"get": {
"description": "Returns a compact list of instruction areas with descriptions and URLs for detailed guides",
@@ -1332,6 +1427,35 @@ const docTemplate = `{
}
}
},
"/branding/asset/{kind}": {
"get": {
"description": "Serves the admin-uploaded logo, horizontal logo, or favicon. 404 when no override is set.",
"produces": [
"image/*"
],
"tags": [
"branding"
],
"summary": "Serve a custom branding asset",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/metrics": {
"get": {
"produces": [
@@ -2931,6 +3055,26 @@ const docTemplate = `{
}
}
},
"localai.BrandingResponse": {
"type": "object",
"properties": {
"favicon_url": {
"type": "string"
},
"instance_name": {
"type": "string"
},
"instance_tagline": {
"type": "string"
},
"logo_horizontal_url": {
"type": "string"
},
"logo_url": {
"type": "string"
}
}
},
"localai.GalleryBackend": {
"type": "object",
"properties": {

View File

@@ -610,6 +610,101 @@
}
}
},
"/api/branding": {
"get": {
"description": "Returns the configured instance name, tagline, and asset URLs. Public — no authentication required.",
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Get instance branding",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
}
}
}
},
"/api/branding/asset/{kind}": {
"post": {
"description": "Upload a custom logo, horizontal logo, or favicon. The file replaces any previous override for that kind.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Upload a branding asset",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
},
{
"type": "file",
"description": "Image file (png, jpeg, svg, webp, ico — up to 5MiB)",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Remove a custom branding asset; the UI falls back to the bundled LocalAI default.",
"produces": [
"application/json"
],
"tags": [
"branding"
],
"summary": "Reset a branding asset to default",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/localai.BrandingResponse"
}
}
}
}
},
"/api/instructions": {
"get": {
"description": "Returns a compact list of instruction areas with descriptions and URLs for detailed guides",
@@ -1329,6 +1424,35 @@
}
}
},
"/branding/asset/{kind}": {
"get": {
"description": "Serves the admin-uploaded logo, horizontal logo, or favicon. 404 when no override is set.",
"produces": [
"image/*"
],
"tags": [
"branding"
],
"summary": "Serve a custom branding asset",
"parameters": [
{
"type": "string",
"description": "Asset kind: logo, logo_horizontal, or favicon",
"name": "kind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/metrics": {
"get": {
"produces": [
@@ -2928,6 +3052,26 @@
}
}
},
"localai.BrandingResponse": {
"type": "object",
"properties": {
"favicon_url": {
"type": "string"
},
"instance_name": {
"type": "string"
},
"instance_tagline": {
"type": "string"
},
"logo_horizontal_url": {
"type": "string"
},
"logo_url": {
"type": "string"
}
}
},
"localai.GalleryBackend": {
"type": "object",
"properties": {

View File

@@ -230,6 +230,19 @@ definitions:
type: string
type: array
type: object
localai.BrandingResponse:
properties:
favicon_url:
type: string
instance_name:
type: string
instance_tagline:
type: string
logo_horizontal_url:
type: string
logo_url:
type: string
type: object
localai.GalleryBackend:
properties:
id:
@@ -2511,6 +2524,72 @@ paths:
summary: Clear backend traces
tags:
- monitoring
/api/branding:
get:
description: Returns the configured instance name, tagline, and asset URLs.
Public — no authentication required.
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/localai.BrandingResponse'
summary: Get instance branding
tags:
- branding
/api/branding/asset/{kind}:
delete:
description: Remove a custom branding asset; the UI falls back to the bundled
LocalAI default.
parameters:
- description: 'Asset kind: logo, logo_horizontal, or favicon'
in: path
name: kind
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/localai.BrandingResponse'
summary: Reset a branding asset to default
tags:
- branding
post:
consumes:
- multipart/form-data
description: Upload a custom logo, horizontal logo, or favicon. The file replaces
any previous override for that kind.
parameters:
- description: 'Asset kind: logo, logo_horizontal, or favicon'
in: path
name: kind
required: true
type: string
- description: Image file (png, jpeg, svg, webp, ico — up to 5MiB)
in: formData
name: file
required: true
type: file
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/localai.BrandingResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
summary: Upload a branding asset
tags:
- branding
/api/instructions:
get:
description: Returns a compact list of instruction areas with descriptions and
@@ -2989,6 +3068,26 @@ paths:
summary: Force backend upgrade check
tags:
- backends
/branding/asset/{kind}:
get:
description: Serves the admin-uploaded logo, horizontal logo, or favicon. 404
when no override is set.
parameters:
- description: 'Asset kind: logo, logo_horizontal, or favicon'
in: path
name: kind
required: true
type: string
produces:
- image/*
responses:
"200":
description: OK
"404":
description: Not Found
summary: Serve a custom branding asset
tags:
- branding
/metrics:
get:
produces: