Skip to content

Edited schemas and tests and Copilot did the rest to add the optional "array" property#220

Merged
James Ball (james-ball-qualcomm) merged 2 commits into
mainfrom
add_param_array
Mar 19, 2026
Merged

Edited schemas and tests and Copilot did the rest to add the optional "array" property#220
James Ball (james-ball-qualcomm) merged 2 commits into
mainfrom
add_param_array

Conversation

@james-ball-qualcomm

Copy link
Copy Markdown
Collaborator

No description provided.

… "array" property.

Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copilot AI review requested due to automatic review settings March 19, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-schema field description still says it's equivalent to the "type or range" property, but the generated schema is now also affected by the optional array bounds (it may wrap the item schema in an array schema). Please update the description to reflect that array is 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.

Comment thread schemas/param-common-schema.json
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
@james-ball-qualcomm James Ball (james-ball-qualcomm) merged commit 286c2a7 into main Mar 19, 2026
2 checks passed
@james-ball-qualcomm James Ball (james-ball-qualcomm) deleted the add_param_array branch March 19, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants