Skip to content

wing328/PSPetstore

Repository files navigation

PSOpenAPITools - the PowerShell module for the OpenAPI Petstore

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

This PowerShell module is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • SDK version: 0.1.3
  • Build package: org.openapitools.codegen.languages.PowerShellClientCodegen

Frameworks supported

  • PowerShell 6.2 or later

Dependencies

Installation

To install from the source, run the following command to build and install the PowerShell module locally:

Build.ps1
Import-Module -Name '.\src\PSOpenAPITools' -Verbose

To avoid function name collision, one can use -Prefix, e.g. Import-Module -Name '.\src\PSOpenAPITools' -Prefix prefix

To uninstall the module, simply run:

Remove-Module -FullyQualifiedName @{ModuleName = "PSOpenAPITools"; ModuleVersion = "0.1.3"}

Tests

To install and run Pester, please execute the following commands in the terminal:

Install-module -name Pester -force

Invoker-Pester

For troubleshooting, please run $DebugPreference = 'Continue' to turn on debugging and disable it with $DebugPreference = 'SilentlyContinue' when done with the troubleshooting.

Documentation for API Endpoints

All URIs are relative to http://petstore.swagger.io/v2

Class Method HTTP request Description
PetApi Add-Pet POST /pet Add a new pet to the store
PetApi Invoke-DeletePet DELETE /pet/{petId} Deletes a pet
PetApi Find-PetsByStatus GET /pet/findByStatus Finds Pets by status
PetApi Find-PetsByTags GET /pet/findByTags Finds Pets by tags
PetApi Get-PetById GET /pet/{petId} Find pet by ID
PetApi Update-Pet PUT /pet Update an existing pet
PetApi Update-PetWithForm POST /pet/{petId} Updates a pet in the store with form data
PetApi Invoke-UploadFile POST /pet/{petId}/uploadImage uploads an image
StoreApi Invoke-DeleteOrder DELETE /store/order/{orderId} Delete purchase order by ID
StoreApi Get-Inventory GET /store/inventory Returns pet inventories by status
StoreApi Get-OrderById GET /store/order/{orderId} Find purchase order by ID
StoreApi Invoke-PlaceOrder POST /store/order Place an order for a pet
UserApi New-User POST /user Create user
UserApi New-UsersWithArrayInput POST /user/createWithArray Creates list of users with given input array
UserApi New-UsersWithListInput POST /user/createWithList Creates list of users with given input array
UserApi Invoke-DeleteUser DELETE /user/{username} Delete user
UserApi Get-UserByName GET /user/{username} Get user by user name
UserApi Invoke-LoginUser GET /user/login Logs user into the system
UserApi Invoke-LogoutUser GET /user/logout Logs out current logged in user session
UserApi Update-User PUT /user/{username} Updated user

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key

  • API key parameter name: api_key

  • Location: HTTP header

petstore_auth