-
Notifications
You must be signed in to change notification settings - Fork 156
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
Extension Management API implementation #110
Conversation
I have a concern regarding the API response. I see on other API already implemented that types are defined, and that the types are applied to the responses. How are defined those types ? |
synopsis update for Get-VSTeamExtension
The types are created by just reviewing the repsonses from the API. The files are then added and the types applied. If these types are are going to be used in the provider you can skip the type files and just created classes. The classes are then used in the provider. We add the types because we can then assign a format to them. That way instead of seen Count and value you will get a nicely formatted list or table. |
I am going to add this to the provider now. |
I am making all the suggested changes. Let me know if you see anything wrong with my suggestions. |
Updated the docs Added formatting Added to provider and classes Updated Get-VSTeamAPIVersion
src/extensions.psm1
Outdated
) | ||
Process { | ||
|
||
if(($PublisherId -and !$ExtensionId) -or (!$PublisherId -and $ExtensionId)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With both PublisherID and ExtensionID marked as Mandatory above why is this needed?
src/extensions.psm1
Outdated
Write-Output $resp | ||
} | ||
catch { | ||
throw $_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is nothing to do with the exception beside re-throw why catch in the first place?
src/extensions.psm1
Outdated
|
||
[switch] $Force | ||
) | ||
if ($Force -or $pscmdlet.ShouldProcess($item, "Remove extension")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$item needs to be a parameter passed in. Either PublisherID or ExtensionID. I am going to set to ExtensionID
src/extensions.psm1
Outdated
[parameter(Mandatory = $true)] | ||
[string] $ExtensionId, | ||
|
||
[parameter(Mandatory = $false)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be mandatory right? What would calling this without this do?
src/extensions.psm1
Outdated
$obj = @{ | ||
extensionId = $ExtensionId | ||
publisherId = $PublisherId | ||
installState = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are missing a @ before the { I will add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you run this command with -Verbose you will see what I mean.
PR Summary
This is a basic Extension Management API implementation
PR Checklist