sandialabs / sceptre-phenix

phenix is an orchestration tool and GUI for Sandia's minimega platform
https://sandialabs.github.io/sceptre-docs/
GNU General Public License v3.0
17 stars 23 forks source link

Add JSON schema to SchemaStore #192

Open GhostofGoes opened 1 month ago

GhostofGoes commented 1 month ago

Add JSON schemas for Topology, Scenario, Experiment, Image, and other schemas to SchemaStore. This would enable auto-completion and validation in editors such as VSCode, improving quality of life for developers.

The primry barrier to me simply opening a PR on SchemaStore is the fact the JSON schema is embedded in Go code and only generated in JSON form when doing a query to /api/v1/schemas/{version} (v1 or v2). To add it to SchemaStore, the file must be static committed into GitHub. There appears to be at least one schema file in the Builder directory, but I think it's out of date.

activeshadow commented 4 weeks ago

This seems like a good idea @GhostofGoes, and it should be possible to use Go's native file embed capabilities to facilitate having the schemas as static JSON files in the repo while still being embedded in the Go binary.