Open glennsarti opened 6 years ago
I'm all for PRs that make use of this, in whole or in part!
The link to metadata-json-schema.json in the original issue description stale, as that project now directly sources the official schema published on the Forge - https://forgeapi.puppet.com/schemas/module.json
As part of the Puppet VS Code extension I ended up writing a JSON Schema doc for metadata.json. This gem already makes use of the JSON Schema gem (https://github.com/voxpupuli/metadata-json-lint/blob/master/lib/metadata_json_lint.rb#L85-L89)
Instead of writing/encoding the JSON rules in ruby, they can easily be expressed in JSON Schema format. Although the more esoteric rules may require more ruby magic.
This would hopefully make it easy to consume this gem programmatically (as per #85)
Source code for JSON Schema Doc. https://github.com/jpogran/puppet-vscode/blob/master/client/src/metadata-json-schema.json