Skip to content

Commit 5938a18

Browse files
(SCHEMA) Update canonical property reference requirements
Prior to this change, the schema source always expected an embedded schema referencing a canonical property to use the current version. It also didn't support using the shortened form. This change converts the constant for the restriction to point to the valid versions of the schema.
1 parent 934d6fd commit 5938a18

File tree

1 file changed

+60
-8
lines changed

1 file changed

+60
-8
lines changed

schemas/src/resource/manifest.schema.yaml

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,21 @@ properties:
345345
description: >-
346346
Indicates that the DSC resource uses the standard `_exist` property to specify
347347
whether an instance should exist as a boolean value that defaults to `true`.
348-
const:
349-
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/exist.yaml
348+
enum:
349+
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/exist.json
350+
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/exist.json
351+
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/exist.json
352+
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/exist.json
353+
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/exist.json
354+
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/exist.json
355+
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/exist.json
356+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json
357+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/exist.json
358+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/exist.json
359+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/exist.json
360+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/exist.json
361+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json
362+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json
350363
# VS Code only
351364
markdownDescription: |
352365
***
@@ -374,8 +387,21 @@ properties:
374387
Indicates that the DSC resource returns this value for it's own `test` method. This
375388
read-only property is mandatory when the manifest defines the `test` property. It
376389
shouldn't be included if the DSC resource relies on DSC's synthetic testing.
377-
const:
378-
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/inDesiredState.yaml
390+
enum:
391+
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/inDesiredState.json
392+
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/inDesiredState.json
393+
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/inDesiredState.json
394+
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/inDesiredState.json
395+
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/inDesiredState.json
396+
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/inDesiredState.json
397+
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/inDesiredState.json
398+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/inDesiredState.json
399+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/inDesiredState.json
400+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/inDesiredState.json
401+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/inDesiredState.json
402+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/inDesiredState.json
403+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json
404+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json
379405
# VS Code only
380406
markdownDescription: |
381407
***
@@ -393,8 +419,21 @@ properties:
393419
Indicates that the DSC resource uses the standard `_purge` property to specify
394420
whether the DSC resource should remove all non-specified members when it manages
395421
an array of members or values.
396-
const:
397-
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/purge.yaml
422+
enum:
423+
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/purge.json
424+
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/purge.json
425+
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/purge.json
426+
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/purge.json
427+
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/purge.json
428+
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/purge.json
429+
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/purge.json
430+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/purge.json
431+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/purge.json
432+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/purge.json
433+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/purge.json
434+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/purge.json
435+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json
436+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json
398437
# VS Code only
399438
markdownDescription: |
400439
***
@@ -412,8 +451,21 @@ properties:
412451
Indicates whether a resource instance requires a reboot after a set operation. To use
413452
DSC's built-in reboot notification processing, resources must define this property in
414453
their manifest.
415-
const:
416-
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/rebootRequested.yaml
454+
enum:
455+
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/rebootRequested.json
456+
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/rebootRequested.json
457+
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/rebootRequested.json
458+
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/rebootRequested.json
459+
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/rebootRequested.json
460+
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/rebootRequested.json
461+
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/rebootRequested.json
462+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/rebootRequested.json
463+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/rebootRequested.json
464+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/rebootRequested.json
465+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/rebootRequested.json
466+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/rebootRequested.json
467+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json
468+
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json
417469
# VS Code only
418470
markdownDescription: |
419471
***

0 commit comments

Comments
 (0)