Skip to content

Commit

Permalink
(SCHEMA) Add kind to resource manifest schema
Browse files Browse the repository at this point in the history
This change adds the `kind` property to the resource manifest
schema, as implemented in PowerShell#338. It updates the source schema
and regenerates the composed schemas.
  • Loading branch information
michaeltlombardi committed Apr 12, 2024
1 parent 6b7b631 commit ec78aa2
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
10 changes: 10 additions & 0 deletions schemas/2024/04/bundled/outputs/resource/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@
"description": "A short synopsis of the DSC Resource's purpose.",
"type": "string"
},
"kind": {
"title": "Resource kind",
"description": "Defines whether the resource is a normal DSC Resource, a group resource, or an adapter resource. This property is only required for group resources.",
"type": "string",
"enum": [
"Resource",
"Adapter",
"Group"
]
},
"tags": {
"title": "Tags",
"description": "Defines a list of searchable terms for the resource.",
Expand Down
10 changes: 10 additions & 0 deletions schemas/2024/04/bundled/resource/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
"description": "A short synopsis of the DSC Resource's purpose.",
"type": "string"
},
"kind": {
"title": "Resource kind",
"description": "Defines whether the resource is a normal DSC Resource, a group resource, or an adapter resource. This property is only required for group resources.",
"type": "string",
"enum": [
"Resource",
"Adapter",
"Group"
]
},
"tags": {
"title": "Tags",
"description": "Defines a list of searchable terms for the resource.",
Expand Down
16 changes: 16 additions & 0 deletions schemas/2024/04/bundled/resource/manifest.vscode.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,22 @@
"type": "string",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a short synopsis of the DSC Resource's purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#description-1\n"
},
"kind": {
"title": "Resource kind",
"description": "Defines whether the resource is a normal DSC Resource, a group resource, or an adapter resource. This property is only required for group resources.",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the resource is a normal DSC Resource, a group resource, or an adapter\nresource. This property is only required for group resources.\n\nDSC infers the default value for this property based on whether the [adapter][02] property is\ndefined in the manifest:\n\n- If the `adapter` property is defined in the manifest, the default `kind` is `Adapter`.\n- If the `adapter` property is not defined in the manifest, the default `kind` is `Resource`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n",
"type": "string",
"enum": [
"Resource",
"Adapter",
"Group"
],
"markdownEnumDescriptions": [
"<!-- force a line break -->\n\nIndicates that the manifest is for a standard command-based DSC Resource.\n",
"<!-- force a line break -->\n\nIndicates that the manifest is for an adapter resource that enables the use of\nnon-command-based resources with DSC.\n",
"<!-- force a line break -->\n\nIndicates that the manifest is for a group resource that processes an array of nested\nresource instances.\n"
]
},
"tags": {
"title": "Tags",
"description": "Defines a list of searchable terms for the resource.",
Expand Down
10 changes: 10 additions & 0 deletions schemas/2024/04/resource/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
"description": "A short synopsis of the DSC Resource's purpose.",
"type": "string"
},
"kind": {
"title": "Resource kind",
"description": "Defines whether the resource is a normal DSC Resource, a group resource, or an adapter resource. This property is only required for group resources.",
"type": "string",
"enum": [
"Resource",
"Adapter",
"Group"
]
},
"tags": {
"title": "Tags",
"description": "Defines a list of searchable terms for the resource.",
Expand Down
15 changes: 15 additions & 0 deletions schemas/src/resource/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,21 @@ properties:
- Resource
- Adapter
- Group
markdownEnumDescriptions:
- | # Resource
<!-- force a line break -->
Indicates that the manifest is for a standard command-based DSC Resource.
- | # Adapter
<!-- force a line break -->
Indicates that the manifest is for an adapter resource that enables the use of
non-command-based resources with DSC.
- | # Group
<!-- force a line break -->
Indicates that the manifest is for a group resource that processes an array of nested
resource instances.
tags:
title: Tags
description: >-
Expand Down

0 comments on commit ec78aa2

Please sign in to comment.