mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
fix: add api docs and http handler for openapi files (#1526)
* tests * chore: set vars for platform in dockerfile * simplyfy generate * correct dockerfile * add openapi to gitignore * object files * protos * update protoc version * admin only secuity missing * texts * start secutiry * add handler * add description * add descriptions and remove adddress * default limit * add mapping for openapi * generate statik for openapi * remove address converter * executable * operator test Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/rakyll/statik/fs"
|
||||
|
||||
_ "github.com/caos/zitadel/openapi/statik"
|
||||
)
|
||||
|
||||
func Start() (http.Handler, error) {
|
||||
statikFS, err := fs.NewWithNamespace("swagger")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
handler := &http.ServeMux{}
|
||||
handler.Handle("/", http.FileServer(statikFS))
|
||||
return handler, nil
|
||||
}
|
||||
Reference in New Issue
Block a user