Skip to content

Commit 5aab0e8

Browse files
schema updates via CR
1 parent 060c083 commit 5aab0e8

File tree

2 files changed

+48
-40
lines changed

2 files changed

+48
-40
lines changed

src/dsc/psresources.dsc.resource.json

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
3-
"description": "This resource manages PowerShell resources using PSResourceGet.",
3+
"description": "Manage PowerShell resources using PSResourceGet.",
44
"type": "Microsoft.PowerShell.PSResourceGet/PSResources",
55
"version": "0.0.1",
66
"get": {
@@ -38,35 +38,36 @@
3838
},
3939
"schema": {
4040
"embedded": {
41-
"$schema": "http://json-schema.org/draft-04/schema#",
41+
"$schema": "http://json-schema.org/draft-2020-12/schema#",
4242
"title": "PSResources",
4343
"type": "object",
4444
"additionalProperties": false,
4545
"properties": {
4646
"repositoryName": {
47-
"type": [
48-
"null",
49-
"string"
50-
]
47+
"title": "Repository Name",
48+
"description": "The name of the repository from where the resources are acquired.",
49+
"type": "string"
5150
},
5251
"scope": {
53-
"$ref": "#/definitions/Scope",
52+
"title": "Scope",
53+
"description": "The scope of the resources. Can be 'CurrentUser' or 'AllUsers'.",
54+
"$ref": "#/$defs/Scope",
5455
"writeOnly": true
5556
},
5657
"resources": {
57-
"type": [
58-
"array",
59-
"null"
60-
],
58+
"title": "Resources",
59+
"description": "The list of resources to manage.",
60+
"type": "array",
6161
"items": {
62-
"$ref": "#/definitions/PSResource"
62+
"$ref": "#/$defs/PSResource"
6363
}
6464
}
6565
},
66-
"definitions": {
66+
"$defs": {
6767
"Scope": {
6868
"type": "integer",
69-
"description": "",
69+
"title": "Scope",
70+
"description": "Scope of the resource installation.",
7071
"enum": [
7172
"CurrentUser",
7273
"AllUsers"
@@ -77,28 +78,29 @@
7778
"additionalProperties": false,
7879
"properties": {
7980
"name": {
80-
"type": [
81-
"null",
82-
"string"
83-
]
81+
"title": "Name",
82+
"description": "The name of the resource.",
83+
"type": "string"
8484
},
8585
"version": {
86-
"type": [
87-
"null",
88-
"string"
89-
]
86+
"title": "Version",
87+
"description": "The version range of the resource.",
88+
"type": "string"
9089
},
9190
"scope": {
92-
"$ref": "#/definitions/Scope",
91+
"title": "Scope",
92+
"description": "The scope of the resource. Can be 'CurrentUser' or 'AllUsers'.",
93+
"$ref": "#/$defs/Scope",
9394
"writeOnly": true
9495
},
9596
"repositoryName": {
96-
"type": [
97-
"null",
98-
"string"
99-
]
97+
"title": "Repository Name",
98+
"description": "The name of the repository from where the resource is acquired.",
99+
"type": "string"
100100
},
101101
"preRelease": {
102+
"title": "Pre-Release version",
103+
"description": "Indicates whether to include pre-release versions of the resource.",
102104
"type": "boolean",
103105
"writeOnly": true
104106
},

src/dsc/repository.dsc.resource.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
3-
"description": "This resource manages PowerShell repositories using PSResourceGet.",
3+
"description": "Manage PowerShell repositories using PSResourceGet.",
44
"type": "Microsoft.PowerShell.PSResourceGet/Repository",
55
"version": "0.0.1",
66
"get": {
@@ -38,40 +38,46 @@
3838
},
3939
"schema": {
4040
"embedded": {
41-
"$schema": "http://json-schema.org/draft-04/schema#",
41+
"$schema": "http://json-schema.org/draft-2020-12/schema#",
4242
"title": "Repository",
43+
"description": "A PowerShell Resource repository from where to acquire the resources.",
4344
"type": "object",
4445
"additionalProperties": false,
4546
"properties": {
4647
"name": {
47-
"type": [
48-
"null",
49-
"string"
50-
]
48+
"title": "Name",
49+
"description": "The name of the repository.",
50+
"type": "string"
5151
},
5252
"uri": {
53-
"type": [
54-
"null",
55-
"string"
56-
]
53+
"title": "URI",
54+
"description": "The URI of the repository.",
55+
"type": "string"
5756
},
5857
"trusted": {
58+
"title": "Trusted",
59+
"description": "Indicates whether the repository is trusted.",
5960
"type": "boolean"
6061
},
6162
"priority": {
63+
"title": "Priority",
64+
"description": "The priority of the repository. Lower numbers indicate higher priority.",
6265
"type": "integer"
6366
},
6467
"repositoryType": {
65-
"$ref": "#/definitions/RepositoryType"
68+
"title": "Repository Type",
69+
"description": "The type of the repository.",
70+
"$ref": "#/$defs/RepositoryType"
6671
},
6772
"_exists": {
6873
"type": "boolean"
6974
}
7075
},
71-
"definitions": {
76+
"$defs": {
7277
"RepositoryType": {
7378
"type": "integer",
74-
"description": "",
79+
"title": "Repository Type",
80+
"description": "The type of the repository. Can be 'Unknown', 'V2', 'V3', 'Local', 'NugetServer', or 'ContainerRegistry'.",
7581
"enum": [
7682
"Unknown",
7783
"V2",

0 commit comments

Comments
 (0)