Mk/fix api docs (#601)

* fix: API URLs for docs

* fix: merge issue

* fix: Lets try this again with some minor changes
This commit is contained in:
Matt Kilgore
2025-03-22 13:26:42 -04:00
committed by GitHub
parent 7279703d7c
commit 41ff4c4664
6 changed files with 16 additions and 3 deletions

View File

@@ -69,11 +69,13 @@ func validatePostgresSSLMode(sslMode string) bool {
// @contact.name Homebox Team // @contact.name Homebox Team
// @contact.url https://discord.homebox.software // @contact.url https://discord.homebox.software
// @host demo.homebox.software // @host demo.homebox.software
// @schemes https http
// @BasePath /api // @BasePath /api
// @securityDefinitions.apikey Bearer // @securityDefinitions.apikey Bearer
// @in header // @in header
// @name Authorization // @name Authorization
// @description "Type 'Bearer TOKEN' to correctly set the API Key" // @description "Type 'Bearer TOKEN' to correctly set the API Key"
// @externalDocs.url https://homebox.software/en/api
func main() { func main() {
zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack

View File

@@ -3265,7 +3265,7 @@ var SwaggerInfo = &swag.Spec{
Version: "1.0", Version: "1.0",
Host: "demo.homebox.software", Host: "demo.homebox.software",
BasePath: "/api", BasePath: "/api",
Schemes: []string{}, Schemes: []string{"https", "http"},
Title: "Homebox API", Title: "Homebox API",
Description: "Track, Manage, and Organize your Things.", Description: "Track, Manage, and Organize your Things.",
InfoInstanceName: "swagger", InfoInstanceName: "swagger",

View File

@@ -1,4 +1,8 @@
{ {
"schemes": [
"https",
"http"
],
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "Track, Manage, and Organize your Things.", "description": "Track, Manage, and Organize your Things.",

View File

@@ -2045,6 +2045,9 @@ paths:
summary: Update Account summary: Update Account
tags: tags:
- User - User
schemes:
- https
- http
securityDefinitions: securityDefinitions:
Bearer: Bearer:
description: '"Type ''Bearer TOKEN'' to correctly set the API Key"' description: '"Type ''Bearer TOKEN'' to correctly set the API Key"'

View File

@@ -1,4 +1,8 @@
{ {
"schemes": [
"https",
"http"
],
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "Track, Manage, and Organize your Things.", "description": "Track, Manage, and Organize your Things.",

View File

@@ -50,7 +50,7 @@ document.head.appendChild(elementStyle);
<client-only> <client-only>
<elements-api <elements-api
:key="componentKey" :key="componentKey"
apiDescriptionUrl="https://cdn.jsdelivr.net/gh/sysadminsmedia/homebox@main/docs/docs/api/openapi-2.0.json" apiDescriptionUrl="https://cdn.jsdelivr.net/gh/sysadminsmedia/homebox@main/docs/docs/api/openapi-2.0.yaml"
router="hash" router="hash"
layout="responsive" layout="responsive"
hideSchemas="true" hideSchemas="true"