Skip to content

Change v2 schema for parameter. #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

JamesWTruher
Copy link
Contributor

Parameter now contains a collection of parameter sets which will enable tracking a number of attributes on a parameter and parameterset basis. This is because a parameter may be position in one parameter set but not positional in another parameter set.

PR Summary

PR Context

Parameter now contains a collection of parameter sets which will enable
tracking a number of attributes on a parameter _and_ parameterset basis.
This is because a parameter may be position in one parameter set but not positional in another parameter set.
@sdwheeler sdwheeler merged commit 2d1dd34 into PowerShell:master Feb 21, 2024
},
"applicable": {
"applicable": { // ????
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an Office only thing.. @theJasonHelmick was going to reach out and verify if this is still something they still need.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applicable attribute might need to be moved into parameterset.parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wasn't sure what it means (thus the ???) - there doesn't seem to be an actual parameter attribute property of this name

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used by the Merge-Markdown cmdlet.

"type": "string"
},
"position": {
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this now be an int?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it can, but i've not gone through the current examples to see if it's "named" anywhere

Copy link
Collaborator

@sdwheeler sdwheeler Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. PowerShell shows named parameters as [int]::MinValue. But we show it as Named in the markdown yaml block. So it is a data vs. rendering question.

@@ -194,7 +217,7 @@
"minItems": 1,
"type": "array"
},
"commonParameters": {
"commonParameters": { // This implies has cmdlet binding
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to be optional. Not all commands implement cmdlet binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants