Skip to content

馃殌[Feature]: Guidelines for PowerShell-wrapped REST methods聽#459

Description

Description

Verb Method Description
Get Get Retrieves info using an endpoint. Body is converted to querystring
New/Add Post Create a new instance of something or add to a collection
Remove Delete
Update Patch
Set Get+Post+Patch Create if not exist, update

Special cases:
Method Put - Depends on endpoint I.e enable/disable, Start/Stop

Verb Set - Reserved for anything that is of a declarative nature. For endpoints that are not declarative already, create a wrapper function that provides the declarative functionality by combining methods Get + patch/put. The declarative functions should also provide a diff if running with -WhatIf.

Use impact on functions to determine if confirmation should be requested. This could be on activities such as remove/delete org/repo. For these we add -Force switch.

Places where there are only get and put methods available, create wrapper functions that provide add and remove functionality.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions