Commit Graph

6 Commits (8b6d0920a8df97e00e84c54cb521ed6d177b5662)

Author SHA1 Message Date
Jimmy Brisson 243b079d2b Pass requires in mbed_app.json test 2019-01-15 17:05:43 -06:00
Steven Cartmell b1ea3881be Fix test errors produced by JSON schema after rebase
- Modified the expected error code in some of the test cases. The error
  message is now issued by the JSON validator.

- Stop validation code being called if no application configuration is
  given to validate.

- Change test mock code to check for specific calls, instead of number of
  calls.

- Derive absolute paths for JSON schema files before loading them, which
  seems to work better with the URI path resolution of the schema parser.
2018-02-01 17:18:41 +00:00
Steven Cartmell 7010010ffc Remove placeholder $id from JSON schema and fix description 2018-02-01 17:18:41 +00:00
Steven Cartmell 151f2fa3a6 Refactor common JSON schema definitions into a seperate file
- Moved all common definitions from schema_app and schema_lib into a
  separate definitions file.

- Changed the calling code to resolve multiple schema files correctly.
2018-02-01 17:18:40 +00:00
Steven Cartmell 3ff7de9771 Remove config_path setting and amend regex in mbed config JSON schema
- Removed the config_path setting from schema and moved the addition of the
config_path value after the validation is done.

- Altered the macro validation regex to be more lenient. Now verifies that
  if '=' is used in the macro definition that something comes after it.
2018-02-01 17:18:40 +00:00
Steven Cartmell fd208e6751 Add JSON schema based validation to mbed config script
- Added app and lib JSON schema definition files which specify the valid
  keys and values that can be used in mbed library and application
  configuration files. The primary different between the app and lib
  schema is that the lib config requires a name key.

- Modified the expected error code in some of the test cases. The error
  message is now issued by the JSON validator.

- Added some validation code to the config script which checks the
  validity of the mbed_app.json file when it is initially loaded.

- Added some validation code to config script which checks each of the
  mbed_lib.json scripts when they are loaded.

- Removed manual checks for allowable config keys from within the mbed_app
  and mbed_lib json files.

- Removed the check_dict_types() function which was no longer being
  called.
2018-02-01 17:18:39 +00:00