feat(api): OpenAPI documentation with Swagger UI
/api/openapi.json is generated from a table of endpoints and the Go types the handlers bind and return, including the limits of their binding tags, so the document follows the code. A test fails for routes missing from the table or documented but not served. /api/docs shows it with Swagger UI from our own assets, usable without internet access; "Try it out" works with the browser session. Closes #84 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
0c2155fdc2
commit
6d3b1dea5d
18 files changed
+1207
-297
No files matched your search
@@ -984,6 +984,10 @@ func SettingsIndex(p Page, me Me) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = settingsLink("/api/docs", "apidocs.title", "settings.apidocs").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
if me.Can["org.manage"] {
|
||||
templ_7745c5c3_Err = settingsLink("/settings/regions", "console.nav.regions", "settings.regions").Render(ctx, templ_7745c5c3_Buffer)
|
||||
|
||||
Reference in new issue
Block a user