-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
In PowerShell it's possible to use a .psd1 file to provide data to a cmdlet. DSC does this for example with its configuration data.
We are developing a module which deals with environment preparation and configuration. It takes a configuration file (.psd1) which contains the required information about the environment.
This could be quite a bit of information so we do plan to use plenty of documentation to tell the users what the file should look like and runtime validation to point out errors. However, it struck me that it would be a nice idea to be able to apply a schema in a similar fashion to XML and JSON schemas. If an editor understands the schema, then it can show intellisense and flag errors.
And it also means that the cmdlet can check for errors by running the schema validation and give consistent errors.
JSON schemas work by adding a $id to the root element which specifies a schema URI.