fix configuration validation for extensions' server commands

This commit is contained in:
Willy Kloucek
2022-06-02 09:55:56 +02:00
parent b5bb5ed087
commit 27b2fbe7e0
33 changed files with 47 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ import (
// ParseConfig loads the ocis configuration and
// copies applicable parts into the commons part, from
// where the extensions can copy it into their own config
func ParseConfig(cfg *config.Config) error {
func ParseConfig(cfg *config.Config, skipValidate bool) error {
_, err := config.BindSourcesToStructs("ocis", cfg)
if err != nil {
return err
@@ -29,6 +29,10 @@ func ParseConfig(cfg *config.Config) error {
EnsureCommons(cfg)
if skipValidate {
return nil
}
return Validate(cfg)
}