Edited schemas and tests and Copilot did the rest to add the optional "array" property#220
Merged
Merged
Conversation
… "array" property. Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support across the parameter toolchain for an optional array: [lo, hi] property on parameter definitions, representing inclusive array bounds and flowing through JSON schema generation plus HTML/AsciiDoc rendering and test fixtures.
Changes:
- Extend parameter definition parsing and JSON Schema generation to optionally wrap scalar schemas as fixed-length arrays derived from
[lo, hi]. - Update parameter type formatting in both HTML tables and param-appendix AsciiDoc output to display
array[lo..hi] of <scalar>. - Expand test inputs and refresh all expected outputs (params JSON/HTML, param-table variants, param appendix includes, and normative-rule fixtures).
Reviewed changes
Copilot reviewed 73 out of 73 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/create_params.py | Parses optional array bounds, wraps generated JSON Schema in an array schema, and updates HTML type rendering. |
| tools/create_param_appendix.py | Updates AsciiDoc type rendering to support array[lo..hi] of ... and validates bounds. |
| tests/params/test-ch1.yaml | Adds parameter definitions exercising array across type/range variants. |
| tests/params/expected/test-params.json | Updates expected params JSON output including array and array-wrapped json-schema. |
| tests/params/expected/test-params.html | Updates expected HTML parameter tables and counts to include array parameters. |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/all_params.adoc | Includes new array parameter fragments in reordered variant. |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_WORD.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_UINT64.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_UINT5.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_NEG10TO20.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_LIST_STR.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_LIST_INT.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_INT32.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_HWORD.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_DWORD.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_BYTE.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_BOOLEAN.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/test-ch1/ARRAY_OF_BIT.adoc | New expected fragment for array parameter (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/all_params_by_chapter.adoc | Updates expected per-chapter counts to include array parameters (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-reordered/all_params_a_to_z.adoc | Updates expected A–Z listing and total counts to include array parameters (reordered variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/all_params.adoc | Includes new array parameter fragments in minimal variant. |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_WORD.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_UINT64.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_UINT5.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_NEG10TO20.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_LIST_STR.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_LIST_INT.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_INT32.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_HWORD.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_DWORD.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_BYTE.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_BOOLEAN.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/test-ch1/ARRAY_OF_BIT.adoc | New expected fragment for array parameter (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/all_params_by_chapter.adoc | Updates expected per-chapter counts to include array parameters (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-minimal/all_params_a_to_z.adoc | Updates expected A–Z listing and total counts to include array parameters (minimal variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/all_params.adoc | Includes new array parameter fragments in full-default variant. |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_WORD.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_UINT64.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_UINT5.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_NEG10TO20.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_LIST_STR.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_LIST_INT.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_INT32.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_HWORD.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_DWORD.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_BYTE.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_BOOLEAN.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/test-ch1/ARRAY_OF_BIT.adoc | New expected fragment for array parameter (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/all_params_by_chapter.adoc | Updates expected per-chapter counts to include array parameters (full-default variant). |
| tests/params/expected/test-param-table-variants/test-param-table-full-default/all_params_a_to_z.adoc | Updates expected A–Z listing and total counts to include array parameters (full-default variant). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/all_params.adoc | Includes new array parameter fragments in param-appendix include set. |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_WORD.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_UINT64.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_UINT5.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_NEG10TO20.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_LIST_STR.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_LIST_INT.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_INT32.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_HWORD.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_DWORD.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_BYTE.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_BOOLEAN.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/test-ch1/ARRAY_OF_BIT.adoc | New expected fragment for array parameter (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/all_params_by_chapter.adoc | Updates expected per-chapter counts to include array parameters (param-appendix include set). |
| tests/params/expected/test-param-appendix-adoc-includes/all_params_a_to_z.adoc | Updates expected A–Z listing and total counts to include array parameters (param-appendix include set). |
| tests/norm-rule/test-ch1.yaml | Adds a new impl-def normative rule entry (ARRAY) used by array-parameter tests. |
| tests/norm-rule/test-ch1.adoc | Adds the norm:array tag content referenced by the new impl-def. |
| tests/norm-rule/expected/test-norm-rules.json | Updates expected normative rules JSON to include the new ARRAY rule. |
| tests/norm-rule/expected/test-norm-rules.html | Updates expected normative rules HTML (counts + new table rows) for ARRAY. |
| tests/norm-rule/expected/test-ch1-norm-tags.json | Updates expected norm-tag extraction output to include norm:array. |
| schemas/params-schema.json | Allows array in output params JSON schema and (needs) updated json-schema description. |
| schemas/param-defs-schema.json | Allows array in parameter definition input schema. |
| schemas/param-common-schema.json | Introduces paramArray shared schema definition for array bounds. |
Comments suppressed due to low confidence (1)
schemas/params-schema.json:44
- The
json-schemafield description still says it's equivalent to the "type or range" property, but the generated schema is now also affected by the optionalarraybounds (it may wrap the item schema in an array schema). Please update the description to reflect thatarrayis included in the conversion.
"array": {
"$ref": "param-common-schema.json#/paramArray"
},
"json-schema": {
"type": "object",
"description": "JSON Schema equivalent of the type or range property"
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.