Created
February 14, 2019 10:22
-
-
Save anfibiacreativa/3dabce765d0c13e9f92680830cff37a1 to your computer and use it in GitHub Desktop.
Validation schema for angular schematics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema", | |
"id": "SchematicsGenerateFilesApp", | |
"title": "Application Options Schema for Angular projects feat Aliased SASS", | |
// the type of the schema object (obviously object!) | |
"type": "object", | |
// the properties of that object | |
"properties": { | |
// name, maps to an option you expect from the command line, flagged --name | |
"name": { | |
"description": "The name of the application.", | |
// you expect for it to be a string | |
"type": "string", | |
"$default": { | |
"$source": "argv", | |
"index": 0 | |
} | |
} | |
}, | |
// it is requiered! (so your schematic will fail if you don't pass this option) | |
"required": [ | |
"name" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment