Add ids to config schemas
Also enforce a max complexity for functions and add some new tests for config. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
a746d673b1
commit
f7d8087694
5 changed files with 30 additions and 18 deletions
|
|
@ -307,7 +307,10 @@ def _validate_against_schema(config, schema_filename, format_checker=[], service
|
|||
schema = json.load(schema_fh)
|
||||
|
||||
resolver = RefResolver(resolver_full_path, schema)
|
||||
validation_output = Draft4Validator(schema, resolver=resolver, format_checker=FormatChecker(format_checker))
|
||||
validation_output = Draft4Validator(
|
||||
schema,
|
||||
resolver=resolver,
|
||||
format_checker=FormatChecker(format_checker))
|
||||
|
||||
errors = [error for error in sorted(validation_output.iter_errors(config), key=str)]
|
||||
if errors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue