123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {
- "$schema": "http://json-schema.org/draft-07/schema",
- "$id": "SchematicsAngularInterface",
- "title": "Angular Interface Options Schema",
- "type": "object",
- "additionalProperties": false,
- "description": "Creates a new interface in your project. Interfaces define the structure of objects in TypeScript, ensuring type safety and code clarity. This schematic generates a new interface with the specified name and type.",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name for the new interface. This will be used to create the interface file (e.g., `my-interface.interface.ts`).",
- "$default": {
- "$source": "argv",
- "index": 0
- },
- "x-prompt": "What name would you like to use for the interface?"
- },
- "path": {
- "type": "string",
- "format": "path",
- "$default": {
- "$source": "workingDirectory"
- },
- "description": "The path where the interface file should be created, relative to the workspace root. If not provided, the interface will be created in the current directory.",
- "visible": false
- },
- "project": {
- "type": "string",
- "description": "The name of the project where the interface should be created. If not specified, the CLI will determine the project from the current directory.",
- "$default": {
- "$source": "projectName"
- }
- },
- "prefix": {
- "type": "string",
- "description": "A prefix to be added to the interface name. This is typically not used for interfaces, as they don't have selectors like components or directives."
- },
- "type": {
- "type": "string",
- "description": "Adds a custom type to the filename, allowing you to create more descriptive interface names. For example, if you set the type to `data`, the filename will be `my-interface.data.ts`.",
- "$default": {
- "$source": "argv",
- "index": 1
- }
- }
- },
- "required": ["name", "project"]
- }
|