|
| 1 | +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema |
| 2 | +$schema: https://json-schema.org/draft/2020-12/schema |
| 3 | +$id: <HOST>/<PREFIX>/<VERSION>/extension/manifest.discover.yaml |
| 4 | + |
| 5 | +title: Get Method |
| 6 | +description: >- |
| 7 | + Defines how DSC must call the DSC extension to discover the paths to resource manifests. |
| 8 | +markdownDescription: | # VS Code only |
| 9 | + *** |
| 10 | + [_Online Documentation_][00] |
| 11 | + *** |
| 12 | +
|
| 13 | + Defines how DSC must call the DSC extension to discover the paths to resource manifests. An |
| 14 | + extension that defines this field in its manifest has the `discover` capability. |
| 15 | + |
| 16 | + By default, DSC only discovers resource manifests in the `PATH` environment variable. If the |
| 17 | + `DSC_RESOURCE_PATH` environment variable is defined, DSC searches those paths for resource |
| 18 | + manifests instead. |
| 19 | +
|
| 20 | + If initial discovery finds any extension manifests that have the `discover` capability, DSC uses |
| 21 | + those extensions to recursively discover resources that aren't available in `PATH` or |
| 22 | + `DSC_RESOURCE_PATH`. |
| 23 | +
|
| 24 | + For more information about the output DSC expects the extension to emit for this command, see |
| 25 | + [Discover extension operation stdout][01]. |
| 26 | +
|
| 27 | + [00]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN> |
| 28 | + [00]: <DOCS_BASE_URL>/reference/schemas/extension/stdout/discover?<DOCS_VERSION_PIN> |
| 29 | +
|
| 30 | +type: object |
| 31 | +required: |
| 32 | + - executable |
| 33 | +properties: |
| 34 | + executable: |
| 35 | + $ref: /<PREFIX>/<VERSION>/definitions/commandExecutable.yaml |
| 36 | + markdownDescription: | |
| 37 | + *** |
| 38 | + [_Online Documentation_][01] |
| 39 | + *** |
| 40 | +
|
| 41 | + Defines the name of the command to run. The value must be the name of a command discoverable |
| 42 | + in the system's `PATH` environment variable or the full path to the command. A file extension |
| 43 | + is only required when the command isn't recognizable by the operating system as an |
| 44 | + executable. |
| 45 | +
|
| 46 | + [01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>#executable |
| 47 | + args: |
| 48 | + $ref: /<PREFIX>/<VERSION>/definitions/commandArgs.yaml |
| 49 | + markdownDescription: | |
| 50 | + *** |
| 51 | + [_Online Documentation_][01] |
| 52 | + *** |
| 53 | +
|
| 54 | + Defines an array of strings to pass as arguments to the command. DSC passes the arguments to |
| 55 | + the command in the order they're specified. |
| 56 | +
|
| 57 | + For example, the given the following definition: |
| 58 | +
|
| 59 | + ```json |
| 60 | + { |
| 61 | + "executable": "myextension", |
| 62 | + "args": ["discover", "--all"], |
| 63 | + } |
| 64 | + ``` |
| 65 | +
|
| 66 | + DSC invokes the command for the resource as: |
| 67 | +
|
| 68 | + ```bash |
| 69 | + myextension discover --all |
| 70 | + ``` |
| 71 | +
|
| 72 | + [01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>#args |
| 73 | +
|
| 74 | +defaultSnippets: # VS Code only |
| 75 | + - label: ' Define without arguments' |
| 76 | + markdownDescription: | |
| 77 | + Define the `discover` command for the extension when no arguments are required. |
| 78 | + body: |
| 79 | + executable: ${2:executable_name} |
| 80 | + - label: ' Define with arguments' |
| 81 | + markdownDescription: |- |
| 82 | + Define the `discover` command for the extension when at least one argument is required. |
| 83 | + body: |
| 84 | + executable: ${2:executable_name} |
| 85 | + args: |
| 86 | + - ${3:--first-argument} |
0 commit comments