Closed somedaygone closed 5 months ago
Also I'm not a GitHub expert, but I think you are going to want to put the reportThemeSchema json files in a folder. Once you get a dozen files out there, the README.md page gets buried. It would be nice if the latest version stayed at this top level with a consistent name reportThemeSchema.json
and a version number inside the schema file.
In the future, I believe we'll eventually put these schema in the main microsoft/json-schemas repository, where they do want versioned schemas in different folders. We're waiting for the report schema work to stabilize a little before we do this (probably by mid-2024).
You're on the right track in that the $schema
property is wholly ignored by the Power BI code. The theme is tagged with the version of Desktop where it was last added to the report, which helps to prevent wildcarded properties from applying to newly added formatting properties in future (forward compatibility). I would argue against an architecture that uses the schema as versioning for exactly that forward compatibility reason, but if it becomes necessary to add versioning to a theme, a new top-level "version"
would likely be added.
@yelper
After using $schema to test a theme, do you recommend keeping it in the theme to show the version used when developing the theme, or should this be removed before loading the theme to Power BI? If you leave it in, I assume Power BI will ignore it and use the latest schema.
Can you add the answer to the README.md page?
Also is there some sort of permalink to the most recent schema (eg. reportThemeSchema.json)? Right now it looks like the only file has a version number, eg. https://raw.githubusercontent.com/microsoft/powerbi-desktop-samples/main/Report Theme JSON Schema/reportThemeSchema-2.114.json