Skip to content

Commit 2d1dd34

Browse files
authored
Merge pull request #622 from JamesWTruher/v2schemaUpdate01
Change v2 schema for parameter.
2 parents a5c4e03 + 21d33fc commit 2d1dd34

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

specs/PowershellCmdletV2.schema.json

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"cmdletParameters": { // naming pending? use only a single word as the name if possible
137137
"items": {
138138
"additionalProperties": false,
139-
"required": ["name", "description", "type", "position", "parameterValueGroup"],
139+
"required": ["name", "description", "type", "parameterSet"],
140140
"properties": {
141141
"name": {
142142
"type": "string"
@@ -146,42 +146,65 @@
146146
"contentType": "markdown",
147147
"tags": ["localizable"]
148148
},
149-
"isRequired": {
150-
"type": "boolean"
149+
"type": {
150+
"type": "string",
151+
"contentType": "markdown"
152+
},
153+
"parameterSet" : {
154+
"items": {
155+
"type": "array",
156+
"minItems": 1,
157+
"additionalProperties": false,
158+
"required": [ "name" ],
159+
"properties": {
160+
"name": {
161+
"type": "string"
162+
},
163+
"position": {
164+
"type": "string"
165+
},
166+
"valueByPipeline": {
167+
"type": "boolean"
168+
},
169+
"valueByPipelineByPropertyName": {
170+
"type": "boolean"
171+
},
172+
"valueFromRemainingArguments": {
173+
"type": "boolean"
174+
},
175+
"isRequired": { // mandatory
176+
"type": "boolean"
177+
}
178+
}
179+
}
151180
},
152-
"applicable": {
181+
"applicable": { // ????
153182
"items": {
154183
"type": "string"
155184
},
156185
"minItems": 1,
157186
"type": "array"
158187
},
159-
"type": {
160-
"type": "string",
161-
"contentType": "markdown"
162-
},
163188
"aliases": {
164-
"type": "string"
189+
"type": "array",
190+
"minItems": 1,
191+
"items": {
192+
"type": "string"
193+
}
165194
},
166-
"parameterValueGroup": {
195+
"isDynamic": {
196+
"type": "boolean"
197+
},
198+
"allowedValues": { // parameterValueGroup
167199
"items": {
168200
"type": "string"
169201
},
170202
"minItems": 1,
171203
"type": "array"
172204
},
173-
"parameterSetName": {
174-
"type": "string"
175-
},
176-
"position": {
177-
"type": "string"
178-
},
179205
"defaultValue": {
180206
"type": "string"
181207
},
182-
"pipelineInput": { // change from bool to string, need to change js and template
183-
"type": "string"
184-
},
185208
"acceptWildcardCharacters": {
186209
"type": "boolean"
187210
},
@@ -194,7 +217,7 @@
194217
"minItems": 1,
195218
"type": "array"
196219
},
197-
"commonParameters": {
220+
"commonParameters": { // This implies has cmdlet binding
198221
"type": "string",
199222
"contentType": "markdown",
200223
"tags": ["localizable"]

0 commit comments

Comments
 (0)