-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Expand file tree
/
Copy pathschema.json
More file actions
40 lines (40 loc) · 1.6 KB
/
schema.json
File metadata and controls
40 lines (40 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsAngularEnum",
"title": "Angular Enum Options Schema",
"type": "object",
"description": "Creates a new enum in your project. Enums (enumerations) are a way to define a set of named constants, making your code more readable and maintainable. This schematic generates a new enum with the specified name and type.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name for the new enum. This will be used to create the enum file (e.g., `my-enum.enum.ts`).",
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "What name would you like to use for the enum?"
},
"path": {
"type": "string",
"format": "path",
"$default": {
"$source": "workingDirectory"
},
"description": "The path where the enum file should be created, relative to the current workspace. If not specified, the enum will be created in the current directory.",
"visible": false
},
"project": {
"type": "string",
"description": "The name of the project where the enum should be created. If not specified, the CLI will determine the project from the current directory.",
"$default": {
"$source": "projectName"
}
},
"type": {
"type": "string",
"description": "Adds a custom type to the filename, allowing you to create more descriptive enum names. For example, if you set the type to `status`, the filename will be `my-enum.status.ts`."
}
},
"required": ["name", "project"]
}