forked from mirrors/homebox
fix: export child relationships (#385)
* tidy * ensure export contains locations path * update pnpm lock file * fix swagger stuff * code gen * fix linter issue * fix reverse order bug in test
This commit is contained in:
parent
6a853c07a0
commit
ced5aef6d1
17 changed files with 1965 additions and 1686 deletions
|
@ -13,7 +13,6 @@ import (
|
|||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
|
||||
"github.com/hay-kot/homebox/backend/app/api/static/docs"
|
||||
"github.com/hay-kot/homebox/backend/internal/core/services"
|
||||
"github.com/hay-kot/homebox/backend/internal/data/ent"
|
||||
"github.com/hay-kot/homebox/backend/internal/data/migrations"
|
||||
|
@ -39,7 +38,6 @@ var (
|
|||
// @version 1.0
|
||||
// @description Track, Manage, and Organize your Things.
|
||||
// @contact.name Don't
|
||||
// @license.name MIT
|
||||
// @BasePath /api
|
||||
// @securityDefinitions.apikey Bearer
|
||||
// @in header
|
||||
|
@ -53,8 +51,6 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
docs.SwaggerInfo.Host = cfg.Swagger.Host
|
||||
|
||||
if err := run(cfg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
|
@ -41,7 +40,7 @@ func (a *app) mountRoutes(r *chi.Mux, chain *errchain.ErrChain, repos *repo.AllR
|
|||
registerMimes()
|
||||
|
||||
r.Get("/swagger/*", httpSwagger.Handler(
|
||||
httpSwagger.URL(fmt.Sprintf("%s://%s/swagger/doc.json", a.conf.Swagger.Scheme, a.conf.Swagger.Host)),
|
||||
httpSwagger.URL("/swagger/doc.json"),
|
||||
))
|
||||
|
||||
// =========================================================================
|
||||
|
|
|
@ -13,9 +13,6 @@ const docTemplate = `{
|
|||
"contact": {
|
||||
"name": "Don't"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
"contact": {
|
||||
"name": "Don't"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/api",
|
||||
|
|
|
@ -702,8 +702,6 @@ info:
|
|||
contact:
|
||||
name: Don't
|
||||
description: Track, Manage, and Organize your Things.
|
||||
license:
|
||||
name: MIT
|
||||
title: Homebox API
|
||||
version: "1.0"
|
||||
paths:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue