Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeDef support, minor tweaks to XML output (to match XSD) #5

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

gmarcosb
Copy link
Contributor

@gmarcosb gmarcosb commented Sep 20, 2024

Primary change is adding of TypeDef support

See for example VideoStreamId @ https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/a3ef8252366959537d75d4e32060d89ca18756f1/src/app_clusters/WebRTC_Provider.adoc

And resulting output with the updates here: https://github.com/project-chip/connectedhomeip/blob/45216a86c1178f94a29688d114263e87321e8352/src/app/zap-templates/zcl/data-model/chip/web-rtc-provider-cluster.xml

Minor tweaks:

  1. added the zcl.xsd schema to the output files so that XML editors (e.g. IDEs) are able to check correctness of XML files
  2. made some minor fixes to output XML (use name attribute in domain as it's specified in XSD)

@gmarcosb gmarcosb requested a review from a team as a code owner September 20, 2024 20:23
Copy link

semanticdiff-com bot commented Sep 20, 2024

Review changes with SemanticDiff.

Analyzed 18 of 18 files.

Overall, the semantic diff is 3% smaller than the GitHub diff.

Filename Status
✔️ zap/datatype.go Analyzed
✔️ zap/generate/cluster.go 69.82% smaller
✔️ zap/generate/configurator.go Analyzed
✔️ matter/cluster.go Analyzed
✔️ matter/sections.go Analyzed
✔️ matter/typedef.go Analyzed
✔️ matter/types/base.go Analyzed
✔️ matter/types/entity.go Analyzed
✔️ matter/spec/build.go Analyzed
✔️ matter/spec/cluster.go 13.87% smaller
✔️ matter/spec/datatypes.go 0.05% smaller
✔️ matter/spec/global.go Analyzed
✔️ matter/spec/section.go Analyzed
✔️ matter/spec/spec.go Analyzed
✔️ matter/spec/typedef.go Analyzed
✔️ errata/spec.go 0.81% smaller
✔️ db/datatypes.go Analyzed
✔️ db/schema.go Analyzed

…ng to simple types for better referenceability (e.g. for an ID which belongs to some non-global space)
@gmarcosb gmarcosb changed the title Minor tweaks to improve XML being output Minor tweaks to improve XML being output, add TypeDef support Sep 26, 2024
@gmarcosb gmarcosb changed the title Minor tweaks to improve XML being output, add TypeDef support Add TypeDef support, minor tweaks to XML output (to match XSD) Sep 26, 2024
@gmarcosb
Copy link
Contributor Author

@hasty to review, @bzbarsky-apple asked me to reach out regarding adding this support @ project-chip/connectedhomeip#35773

zap/generate/configurator.go Outdated Show resolved Hide resolved
matter/spec/cluster.go Show resolved Hide resolved
hasty and others added 2 commits September 30, 2024 08:06
Missed this in conflict resolution
Co-authored-by: Hasty Granbery <[email protected]>
@hasty hasty merged commit 2cff917 into project-chip:main Sep 30, 2024
2 checks passed
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