The client API described in OpenAPI, and both APIs in Swagger UI

/v1/openapi.json is the API clients use — OpenAI's endpoints, Anthropic's,
and what llmgw adds — in OpenAPI 3.1, generated from internal/clientapi's
route table by the generator the admin API's document comes from, now
told each document's title, server, token and error. A test reads the
router's mux.HandleFunc calls and refuses a route described and not
mounted, or mounted and not described. Asked for before there is a key,
so it needs none.

/docs/api shows it in Swagger UI 5.33.1 (Apache 2.0, served from the
gateway as the page's policy requires): Authorize takes a key, Try it out
sends to this gateway. Staff are offered the admin API's document too,
from /docs/api/admin.json, which nobody else is given.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-10 20:22:48 +02:00
1 parent 41601bc5ef
commit fd3c7bda32
26 files changed
+3956 -48

No files matched your search

+3
View File
@@ -23,6 +23,7 @@
<div class="docs">
<aside class="docs-side" aria-label="{{t "docs.documents"}}">
<ul>
<li><a href="/docs/api">{{t "docs.api_title"}}</a></li>
{{range .Docs}}
<li><a href="/docs/{{.Key}}"{{if and $.Doc (eq $.Doc.Key .Key)}} aria-current="page"{{end}}>{{.Title}}</a>
{{- if and $.Doc (eq $.Doc.Key .Key) $.Doc.Sections}}
@@ -48,6 +49,8 @@
</section>
{{end}}
<p><a href="/docs/api">{{t "docs.api_link"}}</a></p>
<h2>{{t "docs.every"}}</h2>
<ul class="docs-index">
{{range .Docs}} <li><a href="/docs/{{.Key}}">{{.Title}}</a></li>