Skip to content

Commit

Permalink
expected_values in field definitions (#1952)
Browse files Browse the repository at this point in the history
* render expected_values in field details j2 template

* add check of examples against expected_values

* document expected_values attr

* incorporate cell formatting option

* note --strict validation of example against expected_values

* escape unintended copyright text replacements
  • Loading branch information
ebeahan committed Jun 20, 2022
1 parent 25ec625 commit 4a3ec76
Show file tree
Hide file tree
Showing 15 changed files with 857 additions and 771 deletions.
1 change: 1 addition & 0 deletions USAGE.md
Expand Up @@ -416,6 +416,7 @@ Strict mode requires the following conditions, else the script exits on an excep
* Short descriptions must be less than or equal to 120 characters.
* Example values containing arrays or objects must be quoted to avoid unexpected YAML interpretation when the schema files or artifacts are relied on downstream.
* If a regex `pattern` is defined, the example values will be checked against it.
* If `expected_values` is defined, the example value(s) will be checked against the list.

The current artifacts generated and published in the ECS repo will always be created using strict mode. However, older ECS versions (pre `v1.5.0`) will cause
an exception if attempting to generate them using `--strict`. This is due to schema validation checks introduced after that version was released.
Expand Down

0 comments on commit 4a3ec76

Please sign in to comment.