Move XML injection to the group level #15403
Merged
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.
Param metadata is generated from source param definitions. The xmloutput parser also prefixes the generated parameter.xml file with additional "injected XML" that it pulls in from a local file. The problem with this is that this injected XML is not included in the generated markdown output, and would also need to be pulled into the json parameter output and any future output formats.
What this change does is import the injected XML into parameter groups and prepend these to the parameter group list before it is passed to the output generators. With this change the groups in the XML are added for any new output.
I have tested this and the output is the almost identical to the original XML.
no_code_generation
- which is not in the "official" output - see<group name="UAVCAN Motor Parameters" no_code_generation="true">
The injected params are a subset of the original XML, so does not test all possible input. I therefore ran this to round trip the generated XML- it works for all that XML too.
Note however that it has the same limitations as the original parser - It does not check for duplication of groups/params in injected content. IMO not worth the effort.