Skip to content

Commit e80c2aa

Browse files
(SCHEMA) Update command doc keywords to point to new stdout schemas
This change updates the documentation keywords for the various resource commands to point to the newly defined stdout JSON Schemas. This change was kept separate from the implementation of those schemas to simplify review.
1 parent 80365ff commit e80c2aa

10 files changed

+69
-31
lines changed

schemas/src/resource/manifest.adapter.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ properties:
2727
Defines how DSC must call the DSC resource adapter to list its supported DSC resources.
2828
markdownDescription: | # VS Code only
2929
***
30-
[_Online Documentation_][01]
30+
[_Online Documentation_][00]
3131
***
3232
3333
Defines how DSC must call the DSC resource adapter to list its supported DSC resources.
3434
35-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/adapter?<DOCS_VERSION_PIN>#list
35+
For more information about the output DSC expects from the resource for this command,
36+
see [List resource operation stdout][01].
37+
38+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/adapter?<DOCS_VERSION_PIN>#list
39+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/list?<DOCS_VERSION_PIN>
3640
type: object
3741
required:
3842
- executable

schemas/src/resource/manifest.delete.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ description: >-
1212
1313
markdownDescription: | # VS Code only
1414
***
15-
[_Online Documentation_][01]
15+
[_Online Documentation_][00]
1616
***
1717
1818
Defines how DSC must call the DSC resource to delete an instance. Define this method for
19-
resources as an alternative to handling the [`_exist`][02] property in a `set` operation, which
19+
resources as an alternative to handling the [`_exist`][01] property in a `set` operation, which
2020
can lead to highly complex code. If the `set` method for the resource is able to handle deleting
21-
an instance when `_exist` is `false`, set the [`handlesExist`][03] property of the set method
21+
an instance when `_exist` is `false`, set the [`handlesExist`][02] property of the set method
2222
definition to `true` instead.
2323
2424
If you define the delete method in a resource manifest, ensure that you also define the
25-
[`_exist`][02] property in the [JSON schema for the resource's properties][04].
25+
[`_exist`][01] property in the [JSON schema for the resource's properties][03].
26+
27+
DSC doesn't expect this command to return any output to stdout.
2628
2729
DSC sends data to the command in three ways:
2830
@@ -39,10 +41,10 @@ markdownDescription: | # VS Code only
3941
You must define the `input` property, one JSON input argument in the `args` property array, or
4042
both.
4143
42-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/delete?<DOCS_VERSION_PIN>
43-
[02]: <DOCS_BASE_URL>/reference/schemas/resource/properties/exist?<DOCS_VERSION_PIN>
44-
[03]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>#handlesExist
45-
[04]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/property?<DOCS_VERSION_PIN>
44+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/delete?<DOCS_VERSION_PIN>
45+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/properties/exist?<DOCS_VERSION_PIN>
46+
[02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>#handlesExist
47+
[03]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/property?<DOCS_VERSION_PIN>
4648
4749
type: object
4850
required:

schemas/src/resource/manifest.export.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ description: >-
77
Defines how DSC must call the DSC resource to get the current state of every instance.
88
markdownDescription: | # VS Code only
99
***
10-
[_Online Documentation_][01]
10+
[_Online Documentation_][00]
1111
***
1212
1313
Defines how DSC must call the DSC resource to get the current state of every instance.
1414
15+
For more information about the output DSC expects the resource to emit for this command, see
16+
[Export resource operation stdout][01].
17+
1518
DSC sends data to the command in three ways:
1619
1720
1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed
@@ -27,7 +30,8 @@ markdownDescription: | # VS Code only
2730
You must define the `input` property, one JSON input argument in the `args` property array, or
2831
both.
2932
30-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/export?<DOCS_VERSION_PIN>
33+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/export?<DOCS_VERSION_PIN>
34+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>
3135
3236
type: object
3337
required:

schemas/src/resource/manifest.get.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ description: >-
77
Defines how DSC must call the DSC resource to get the current state of an instance.
88
markdownDescription: | # VS Code only
99
***
10-
[_Online Documentation_][01]
10+
[_Online Documentation_][00]
1111
***
1212
1313
Defines how DSC must call the DSC resource to get the current state of an instance.
14+
15+
For more information about the output DSC expects the resource to emit for this command, see
16+
[Get resource operation stdout][01].
1417
1518
DSC sends data to the command in three ways:
1619
@@ -27,7 +30,8 @@ markdownDescription: | # VS Code only
2730
You must define the `input` property, one JSON input argument in the `args` property array, or
2831
both.
2932
30-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/get?<DOCS_VERSION_PIN>
33+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/get?<DOCS_VERSION_PIN>
34+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/get?<DOCS_VERSION_PIN>
3135
3236
type: object
3337
required:

schemas/src/resource/manifest.resolve.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ description: >-
1010
1111
markdownDescription: | # VS Code only
1212
***
13-
[_Online Documentation_][01]
13+
[_Online Documentation_][00]
1414
***
1515
1616
Defines how DSC must call the DSC resource to resolve an external source to nested DSC
1717
configuration document. Define this method for [importer resources][02] and set the [kind][03]
1818
property in the manifest root to `importer`.
1919
20+
For more information about the output DSC expects the resource to emit for this command, see
21+
[Resolve resource operation stdout][01].
22+
2023
DSC sends data to the command in three ways:
2124
2225
1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed
@@ -32,7 +35,8 @@ markdownDescription: | # VS Code only
3235
You must define the `input` property, one JSON input argument in the `args` property array, or
3336
both.
3437
35-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/resolve?<DOCS_VERSION_PIN>
38+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/resolve?<DOCS_VERSION_PIN>
39+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/resolve?<DOCS_VERSION_PIN>
3640
[02]: <DOCS_BASE_URL>/reference/schemas/definitions/resourceKind?<DOCS_VERSION_PIN>#importer-resources
3741
[03]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/root?<DOCS_VERSION_PIN>#kind
3842

schemas/src/resource/manifest.schema.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,17 @@ properties:
7474
# VS Code only
7575
markdownDescription: |
7676
***
77-
[_Online Documentation_][01]
77+
[_Online Documentation_][00]
7878
***
7979
8080
Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob
8181
representing an instance of the DSC resource.
8282
83-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/property?<DOCS_VERSION_PIN>#command
83+
For more information about the output DSC expects the resource to emit for this command, see
84+
[Schema resource command stdout][01].
85+
86+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/property?<DOCS_VERSION_PIN>#command
87+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/schema?<DOCS_VERSION_PIN>
8488
defaultSnippets:
8589
- label: ' Define without arguments'
8690
markdownDescription: |

schemas/src/resource/manifest.set.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ description: >-
88
process the output from the DSC resource.
99
markdownDescription: | # VS Code only
1010
***
11-
[_Online Documentation_][01]
11+
[_Online Documentation_][00]
1212
***
1313
1414
Defines how DSC must call the DSC resource to set the desired state of an instance and how to
1515
process the output from the DSC resource.
1616
17+
For more information about the output DSC expects the resource to emit for this command, see
18+
[Set resource operation stdout][01].
19+
1720
DSC sends data to the command in three ways:
1821
1922
1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed
@@ -29,7 +32,8 @@ markdownDescription: | # VS Code only
2932
You must define the `input` property, one JSON input argument in the `args` property array, or
3033
both.
3134
32-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>
35+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>
36+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/set?<DOCS_VERSION_PIN>
3337
3438
type: object
3539
required:

schemas/src/resource/manifest.test.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ description: >-
88
to process the output from the DSC resource.
99
markdownDescription: | # VS Code only
1010
***
11-
[_Online Documentation_][01]
11+
[_Online Documentation_][00]
1212
***
1313
1414
Defines how DSC must call the DSC resource to test if an instance is in the desired state and how
1515
to process the output from the DSC resource.
1616
17+
For more information about the output DSC expects the resource to emit for this command, see
18+
[Test resource operation stdout][01].
19+
1720
DSC sends data to the command in three ways:
1821
1922
1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed
@@ -29,7 +32,8 @@ markdownDescription: | # VS Code only
2932
You must define the `input` property, one JSON input argument in the `args` property array, or
3033
both.
3134
32-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/test?<DOCS_VERSION_PIN>
35+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/test?<DOCS_VERSION_PIN>
36+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/test?<DOCS_VERSION_PIN>
3337
3438
3539
type: object

schemas/src/resource/manifest.validate.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ description: >-
99
1010
markdownDescription: | # VS Code only
1111
***
12-
[_Online Documentation_][01]
12+
[_Online Documentation_][00]
1313
***
1414
1515
Defines how DSC must call the DSC resource to validate the state of an instance. This method is
1616
mandatory for DSC group resources. It's ignored for all other DSC resources.
1717
18+
For more information about the output DSC expects the resource to emit for this command, see
19+
[Validate resource operation stdout][01].
20+
1821
DSC sends data to the command in three ways:
1922
2023
1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed
@@ -30,7 +33,8 @@ markdownDescription: | # VS Code only
3033
You must define the `input` property, one JSON input argument in the `args` property array, or
3134
both.
3235
33-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/validate?<DOCS_VERSION_PIN>
36+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/validate?<DOCS_VERSION_PIN>
37+
[01]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/validate?<DOCS_VERSION_PIN>
3438
3539
type: object
3640
required:

schemas/src/resource/manifest.whatIf.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ description: >-
88
modify an instance and how to process the output from the DSC resource.
99
markdownDescription: | # VS Code only
1010
***
11-
[_Online Documentation_][01]
11+
[_Online Documentation_][00]
1212
***
1313
1414
Defines how DSC must call the DSC resource to indicate whether and how the set command will
1515
modify an instance and how to process the output from the DSC resource. If a resource doesn't
16-
define this method in the manifest, DSC synthesizes this behavior by converting the result of
17-
the test operation for the resource into the [set result][02].
16+
define this command in the manifest, DSC synthesizes this behavior by converting the result of
17+
the test operation for the resource into the [set result][01].
1818
19-
This method definition has the same structure as the [set method][03] in the resource manifest.
19+
This command definition has the same structure as the [set command][02] in the resource manifest.
20+
21+
For more information about the output DSC expects the resource to emit for this command, see
22+
[What-if resource operation stdout][03].
2023
2124
DSC sends data to the command in three ways:
2225
@@ -33,9 +36,10 @@ markdownDescription: | # VS Code only
3336
You must define the `input` property, one JSON input argument in the `args` property array, or
3437
both.
3538
36-
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/whatif?<DOCS_VERSION_PIN>
37-
[02]: <DOCS_BASE_URL>/reference/schemas/outputs/resource/set?<DOCS_VERSION_PIN>
38-
[03]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>
39+
[00]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/whatif?<DOCS_VERSION_PIN>
40+
[01]: <DOCS_BASE_URL>/reference/schemas/outputs/resource/set?<DOCS_VERSION_PIN>
41+
[02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/set?<DOCS_VERSION_PIN>
42+
[03]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/whatif?<DOCS_VERSION_PIN>
3943
4044
type: object
4145
required:

0 commit comments

Comments
 (0)