Skip to content

Commit 58b25c9

Browse files
(SCHEMA) Update casing for secureString and secureObject
This change updates the casing for the secure parameter types from `securestring` and `secureobject` to `secureString` and `secureObject`, as implemented in PowerShell#364. It updates both the source and composed schemas.
1 parent 92e79f0 commit 58b25c9

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

schemas/2024/04/bundled/config/document.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
{
130130
"properties": {
131131
"type": {
132-
"const": "securestring"
132+
"const": "secureString"
133133
}
134134
}
135135
},
@@ -146,13 +146,13 @@
146146
"properties": {
147147
"minLength": {
148148
"title": "Minimum length",
149-
"description": "The minimum valid length for a `string`, `securestring`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
149+
"description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
150150
"type": "integer",
151151
"minimum": 0
152152
},
153153
"maxLength": {
154154
"title": "Maximum length",
155-
"description": "The maximum valid length for a `string`, `securestring`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
155+
"description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
156156
"type": "integer",
157157
"minimum": 0
158158
}
@@ -172,7 +172,7 @@
172172
{
173173
"properties": {
174174
"type": {
175-
"const": "securestring"
175+
"const": "secureString"
176176
}
177177
}
178178
}
@@ -204,7 +204,7 @@
204204
{
205205
"properties": {
206206
"type": {
207-
"const": "secureobject"
207+
"const": "secureObject"
208208
}
209209
}
210210
}
@@ -325,11 +325,11 @@
325325
"type": "string",
326326
"enum": [
327327
"string",
328-
"securestring",
328+
"secureString",
329329
"int",
330330
"bool",
331331
"object",
332-
"secureobject",
332+
"secureObject",
333333
"array"
334334
]
335335
},

schemas/2024/04/bundled/config/document.vscode.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
{
274274
"properties": {
275275
"type": {
276-
"const": "securestring"
276+
"const": "secureString"
277277
}
278278
}
279279
},
@@ -290,17 +290,17 @@
290290
"properties": {
291291
"minLength": {
292292
"title": "Minimum length",
293-
"description": "The minimum valid length for a `string`, `securestring`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
293+
"description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
294294
"type": "integer",
295295
"minimum": 0,
296-
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid length for a `string`, `securestring`, or `array`. If defined with\nthe `maxLength` property, this value must be less than the value of `maxLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minLength\n"
296+
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `maxLength` property, this value must be less than the value of `maxLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minLength\n"
297297
},
298298
"maxLength": {
299299
"title": "Maximum length",
300-
"description": "The maximum valid length for a `string`, `securestring`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
300+
"description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
301301
"type": "integer",
302302
"minimum": 0,
303-
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid length for a `string`, `securestring`, or `array`. If defined with\nthe `minLength` property, this value must be less than the value of `minLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxLength\n"
303+
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `minLength` property, this value must be less than the value of `minLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxLength\n"
304304
}
305305
}
306306
}
@@ -318,7 +318,7 @@
318318
{
319319
"properties": {
320320
"type": {
321-
"const": "securestring"
321+
"const": "secureString"
322322
}
323323
}
324324
}
@@ -350,7 +350,7 @@
350350
{
351351
"properties": {
352352
"type": {
353-
"const": "secureobject"
353+
"const": "secureObject"
354354
}
355355
}
356356
}
@@ -512,14 +512,14 @@
512512
"type": "string",
513513
"enum": [
514514
"string",
515-
"securestring",
515+
"secureString",
516516
"int",
517517
"bool",
518518
"object",
519-
"secureobject",
519+
"secureObject",
520520
"array"
521521
],
522-
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the data type for the parameter value.\n\nThe valid data types for a parameter are:\n\n- `array` for arrays\n- `bool` for booleans\n- `int` for integers\n- `object` for objects\n- `string` for strings\n- `secureobject` for secure objects\n- `securestring` for secure strings\n\nAccess parameters in a configuration using this syntax:\n\n```yaml\n\"[parameter('<parameter-name>')]\"\n```\n\nIn YAML, the parameter syntax needs to be enclosed in double-quotes when used as an inline value.\nIf the syntax isn't quoted, YAML interprets the syntax as an array.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true\n",
522+
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the data type for the parameter value.\n\nThe valid data types for a parameter are:\n\n- `array` for arrays\n- `bool` for booleans\n- `int` for integers\n- `object` for objects\n- `string` for strings\n- `secureObject` for secure objects\n- `secureString` for secure strings\n\nAccess parameters in a configuration using this syntax:\n\n```yaml\n\"[parameter('<parameter-name>')]\"\n```\n\nIn YAML, the parameter syntax needs to be enclosed in double-quotes when used as an inline value.\nIf the syntax isn't quoted, YAML interprets the syntax as an array.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true\n",
523523
"markdownEnumDescriptions": [
524524
"_Strings are an arbitrary set of text._\n\n> To define a long strings in YAML, use the folded block syntax or literal block syntax by\n> adding a `>` or `|` and a line break after the key. Then, indent the next line. Every line\n> in the string must start at the same level of indentation. You can trim the trailing\n> whitespace by using `>-` or `|-` instead.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#strings\n",
525525
"_Secure strings are text that needs to be handled securely._\n\n> Secure strings are an arbitrary set of text that DSC and integrating tools shouldn't log or\n> record. If a secure data type parameter is used for a resource instance property that doesn't\n> expect a secure value, the resource may still log or record the value. If the resource has\n> independent logging or recording that isn't handled by DSC, the value may be stored\n> insecurely.\n>\n> Use secure strings for passwords and secrets. Never define a default value for secure string\n> parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n",

schemas/2024/04/config/document.parameter.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
{
7373
"properties": {
7474
"type": {
75-
"const": "securestring"
75+
"const": "secureString"
7676
}
7777
}
7878
},
@@ -89,13 +89,13 @@
8989
"properties": {
9090
"minLength": {
9191
"title": "Minimum length",
92-
"description": "The minimum valid length for a `string`, `securestring`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
92+
"description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
9393
"type": "integer",
9494
"minimum": 0
9595
},
9696
"maxLength": {
9797
"title": "Maximum length",
98-
"description": "The maximum valid length for a `string`, `securestring`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
98+
"description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
9999
"type": "integer",
100100
"minimum": 0
101101
}
@@ -115,7 +115,7 @@
115115
{
116116
"properties": {
117117
"type": {
118-
"const": "securestring"
118+
"const": "secureString"
119119
}
120120
}
121121
}
@@ -147,7 +147,7 @@
147147
{
148148
"properties": {
149149
"type": {
150-
"const": "secureobject"
150+
"const": "secureObject"
151151
}
152152
}
153153
}

schemas/2024/04/definitions/parameters/dataTypes.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"type": "string",
77
"enum": [
88
"string",
9-
"securestring",
9+
"secureString",
1010
"int",
1111
"bool",
1212
"object",
13-
"secureobject",
13+
"secureObject",
1414
"array"
1515
]
1616
}

schemas/src/config/document.parameter.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ allOf:
165165
- if:
166166
oneOf:
167167
- properties: { type: { const: string } }
168-
- properties: { type: { const: securestring } }
168+
- properties: { type: { const: secureString } }
169169
- properties: { type: { const: array } }
170170
then:
171171
properties:
172172
minLength:
173173
title: Minimum length
174174
description: >-
175-
The minimum valid length for a `string`, `securestring`, or `array`. If defined with
175+
The minimum valid length for a `string`, `secureString`, or `array`. If defined with
176176
the `maxLength` property, this value must be less than the value of `maxLength`.
177177
type: integer
178178
minimum: 0
@@ -182,14 +182,14 @@ allOf:
182182
[_Online Documentation_][01]
183183
***
184184
185-
The minimum valid length for a `string`, `securestring`, or `array`. If defined with
185+
The minimum valid length for a `string`, `secureString`, or `array`. If defined with
186186
the `maxLength` property, this value must be less than the value of `maxLength`.
187187
188188
[01]: <DOCS_BASE_URL>/reference/schemas/config/parameter?<DOCS_VERSION_PIN>#minLength
189189
maxLength:
190190
title: Maximum length
191191
description: >-
192-
The maximum valid length for a `string`, `securestring`, or `array`. If defined with
192+
The maximum valid length for a `string`, `secureString`, or `array`. If defined with
193193
the `minLength` property, this value must be less than the value of `minLength`.
194194
type: integer
195195
minimum: 0
@@ -199,23 +199,23 @@ allOf:
199199
[_Online Documentation_][01]
200200
***
201201
202-
The maximum valid length for a `string`, `securestring`, or `array`. If defined with
202+
The maximum valid length for a `string`, `secureString`, or `array`. If defined with
203203
the `minLength` property, this value must be less than the value of `minLength`.
204204
205205
[01]: <DOCS_BASE_URL>/reference/schemas/config/parameter?<DOCS_VERSION_PIN>#maxLength
206206
# defaultValue strict validation
207207
- if:
208208
oneOf:
209209
- properties: { type: { const: string } }
210-
- properties: { type: { const: securestring } }
210+
- properties: { type: { const: secureString } }
211211
then:
212212
properties:
213213
defaultValue: { type: string }
214214
allowedValues: { items: { type: string } }
215215
- if:
216216
oneOf:
217217
- properties: { type: { const: object } }
218-
- properties: { type: { const: secureobject } }
218+
- properties: { type: { const: secureObject } }
219219
then:
220220
properties:
221221
defaultValue: { type: object }

schemas/src/definitions/parameters/dataTypes.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ description: >-
88
type: string
99
enum:
1010
- string
11-
- securestring
11+
- secureString
1212
- int
1313
- bool
1414
- object
15-
- secureobject
15+
- secureObject
1616
- array
1717

1818
# VS Code only
@@ -30,8 +30,8 @@ markdownDescription: |
3030
- `int` for integers
3131
- `object` for objects
3232
- `string` for strings
33-
- `secureobject` for secure objects
34-
- `securestring` for secure strings
33+
- `secureObject` for secure objects
34+
- `secureString` for secure strings
3535
3636
Access parameters in a configuration using this syntax:
3737
@@ -56,7 +56,7 @@ markdownEnumDescriptions:
5656
5757
[01]: <DOCS_BASE_URL>/reference/schemas/definitions/parameters/datatypes?<DOCS_VERSION_PIN>#strings
5858
59-
- | # securestring
59+
- | # secureString
6060
_Secure strings are text that needs to be handled securely._
6161
6262
> Secure strings are an arbitrary set of text that DSC and integrating tools shouldn't log or
@@ -105,7 +105,7 @@ markdownEnumDescriptions:
105105
106106
[01]: <DOCS_BASE_URL>/reference/schemas/definitions/parameters/datatypes?<DOCS_VERSION_PIN>#objects
107107
108-
- | # secureobject
108+
- | # secureObject
109109
_Secure objects are key-value pairs that need to be handled securely._
110110
111111
> Secure objects define a set of key-value pairs that DSC and integrating tools shouldn't log

0 commit comments

Comments
 (0)