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 <livio.a@gmail.com>
This commit is contained in:
Silvan
2021-04-07 08:23:47 +02:00
committed by GitHub
parent 2e02f2a695
commit e4fe097ec4
24 changed files with 3649 additions and 521 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/query"
metrics "github.com/caos/zitadel/internal/telemetry/metrics/config"
"github.com/caos/zitadel/openapi"
"github.com/caos/logging"
@@ -177,6 +178,11 @@ func startAPI(ctx context.Context, conf *Config, authZRepo *authz_repo.EsReposit
op := oidc.NewProvider(ctx, conf.API.OIDC, command, query, authRepo, conf.SystemDefaults.KeyConfig.EncryptionConfig, *localDevMode)
apis.RegisterHandler("/oauth/v2", op.HttpHandler())
}
openAPIHandler, err := openapi.Start()
logging.Log("ZITAD-8pRk1").OnError(err).Fatal("Unable to start openapi handler")
apis.RegisterHandler("/openapi/v2/swagger", openAPIHandler)
apis.Start(ctx)
}