feat: add a config.schema.json and validate the configuration against it#1733
feat: add a config.schema.json and validate the configuration against it#1733
Conversation
|
As I found out it is not possible with jsonschema to have |
|
That is not a good idea, especially with secrets. Let’s nit do that please and figure out another way to tackle this. If no secret is set, then it should not pass validation, right? If it should pass, then minItems should not be 1 |
|
@zepatrik what's the status of this? Will you continue working on it? |
# Conflicts: # client/sql_migration_files.go # consent/sql_migration_files.go # go.mod # go.sum # jwk/sql_migration_files.go # oauth2/sql_migration_files.go
# Conflicts: # cmd/server/handler.go # go.mod
Co-authored-by: Amir Aslaminejad <[email protected]>
|
latest schema changes needed as workaround for ory/x#131 |
cmd/server/handler.go
Outdated
| var schemas = packr.New("schemas", "../../docs") | ||
|
|
||
| // LoggerWithValidationErrorFields adds all validation errors as fields to the logger. | ||
| func LoggerWithValidationErrorFields(l logrus.FieldLogger, err error) logrus.FieldLogger { |
There was a problem hiding this comment.
Is this not provided by the X package?
# Conflicts: # cmd/server/handler.go # docs/api.swagger.json # driver/configuration/provider_viper_test.go # go.mod # go.sum # internal/httpclient/models/consent_request.go # internal/httpclient/models/health_status.go # internal/httpclient/models/json_web_key_set_generator_request.go # internal/httpclient/models/login_request.go # internal/httpclient/models/o_auth2_client.go # internal/httpclient/models/oauth2_token_response.go # internal/httpclient/models/open_id_connect_context.go # internal/httpclient/models/well_known.go
Related issue
closes #1729
Proposed changes
Checklist
vulnerability, I confirm that I got green light (please contact [email protected]) from the maintainers to push the changes.
Further comments