forked from loafle/openapi-generator-original
Replace powershell generator with powershell-experimental generator (#6213)
* replace powershell generator with powershell-experimental generator * add back samples * add back scripts * remove outdated script * update doc
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -1 +0,0 @@
|
||||
4.3.1-SNAPSHOT
|
||||
@@ -1,72 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
# Version: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
function Get-FunctionsToExport {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[Alias('FullName')]
|
||||
$Path
|
||||
)
|
||||
|
||||
Process {
|
||||
$Token = $null
|
||||
$ParserErr = $null
|
||||
|
||||
$Ast = [System.Management.Automation.Language.Parser]::ParseFile(
|
||||
$Path,
|
||||
[ref]$Token,
|
||||
[ref]$ParserErr
|
||||
)
|
||||
|
||||
if ($ParserErr) {
|
||||
throw $ParserErr
|
||||
} else {
|
||||
foreach ($name in 'Begin', 'Process', 'End') {
|
||||
foreach ($Statement in $Ast."${name}Block".Statements) {
|
||||
if (
|
||||
[String]::IsNullOrWhiteSpace($Statement.Name) -or
|
||||
$Statement.Extent.ToString() -notmatch
|
||||
('function\W+{0}' -f $Statement.Name)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
$Statement.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
|
||||
$FunctionPath = 'Api', 'Model', 'Client' | ForEach-Object {Join-Path "$ScriptDir\src\PSPetstore\" $_}
|
||||
|
||||
$Manifest = @{
|
||||
Path = "$ScriptDir\src\PSPetstore\PSPetstore.psd1"
|
||||
|
||||
Author = 'OpenAPI Generator Team'
|
||||
CompanyName = 'openapitools.org'
|
||||
Description = 'PSPetstore - the PowerShell module for OpenAPI Petstore'
|
||||
|
||||
ModuleVersion = '0.1.2'
|
||||
|
||||
RootModule = 'PSPetstore.psm1'
|
||||
Guid = 'a27b908d-2a20-467f-bc32-af6f3a654ac5' # Has to be static, otherwise each new build will be considered different module
|
||||
|
||||
PowerShellVersion = '3.0'
|
||||
|
||||
FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport
|
||||
|
||||
VariablesToExport = @()
|
||||
AliasesToExport = @()
|
||||
CmdletsToExport = @()
|
||||
|
||||
}
|
||||
|
||||
New-ModuleManifest @Manifest
|
||||
@@ -1,120 +0,0 @@
|
||||
# PSPetstore - 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](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- SDK version: 0.1.2
|
||||
- Build package: org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen
|
||||
|
||||
<a name="frameworks-supported"></a>
|
||||
## Frameworks supported
|
||||
- PowerShell 5.0 or later
|
||||
|
||||
<a name="dependencies"></a>
|
||||
## Dependencies
|
||||
|
||||
<a name="installation"></a>
|
||||
## Installation
|
||||
|
||||
To install from PowerShell Gallery (https://www.powershellgallery.com/packages/PSPetstore)
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore -Verbose
|
||||
```
|
||||
|
||||
To install from the source, run the following command to build and install the PowerShell module locally:
|
||||
```powershell
|
||||
Build.ps1
|
||||
Import-Module -Name '.\src\PSPetstore' -Verbose
|
||||
```
|
||||
|
||||
To avoid function name collision, one can use `-Prefix`, e.g. `Import-Module -Name '.\src\PSPetstore' -Prefix prefix`
|
||||
|
||||
To uninstall the module, simply run:
|
||||
```powershell
|
||||
Remove-Module -FullyQualifiedName @{ModuleName = "PSPetstore"; ModuleVersion = "0.1.2"}
|
||||
```
|
||||
|
||||
<a name="tests"></a>
|
||||
## Tests
|
||||
|
||||
To install and run `Pester`, please execute the following commands in the terminal:
|
||||
|
||||
```powershell
|
||||
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:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PSPetApi* | [**Add-PSPet**](docs/PSPetApi.md#Add-PSPet) | **POST** /pet | Add a new pet to the store
|
||||
*PSPetApi* | [**Remove-Pet**](docs/PSPetApi.md#remove-pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PSPetApi* | [**Find-PSPetsByStatus**](docs/PSPetApi.md#Find-PSPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PSPetApi* | [**Find-PSPetsByTags**](docs/PSPetApi.md#Find-PSPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PSPetApi* | [**Get-PSPetById**](docs/PSPetApi.md#Get-PSPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PSPetApi* | [**Update-PSPet**](docs/PSPetApi.md#Update-PSPet) | **PUT** /pet | Update an existing pet
|
||||
*PSPetApi* | [**Update-PSPetWithForm**](docs/PSPetApi.md#Update-PSPetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PSPetApi* | [**Invoke-PSUploadFile**](docs/PSPetApi.md#Invoke-PSUploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PSStoreApi* | [**Remove-PSOrder**](docs/PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*PSStoreApi* | [**Get-PSInventory**](docs/PSStoreApi.md#Get-PSInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*PSStoreApi* | [**Get-PSOrderById**](docs/PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*PSStoreApi* | [**Invoke-PSPlaceOrder**](docs/PSStoreApi.md#Invoke-PSPlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
*PSUserApi* | [**New-PSUser**](docs/PSUserApi.md#New-PSUser) | **POST** /user | Create user
|
||||
*PSUserApi* | [**New-PSUsersWithArrayInput**](docs/PSUserApi.md#New-PSUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*PSUserApi* | [**New-PSUsersWithListInput**](docs/PSUserApi.md#New-PSUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*PSUserApi* | [**Remove-PSUser**](docs/PSUserApi.md#Remove-PSUser) | **DELETE** /user/{username} | Delete user
|
||||
*PSUserApi* | [**Get-PSUserByName**](docs/PSUserApi.md#Get-PSUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*PSUserApi* | [**Invoke-PSLoginUser**](docs/PSUserApi.md#Invoke-PSLoginUser) | **GET** /user/login | Logs user into the system
|
||||
*PSUserApi* | [**Invoke-PSLogoutUser**](docs/PSUserApi.md#Invoke-PSLogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*PSUserApi* | [**Update-PSUser**](docs/PSUserApi.md#Update-PSUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [PSPetstore/Model.ApiResponse](docs/ApiResponse.md)
|
||||
- [PSPetstore/Model.Category](docs/Category.md)
|
||||
- [PSPetstore/Model.InlineObject](docs/InlineObject.md)
|
||||
- [PSPetstore/Model.InlineObject1](docs/InlineObject1.md)
|
||||
- [PSPetstore/Model.Order](docs/Order.md)
|
||||
- [PSPetstore/Model.Pet](docs/Pet.md)
|
||||
- [PSPetstore/Model.Tag](docs/Tag.md)
|
||||
- [PSPetstore/Model.User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
### auth_cookie
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
- **API key parameter name**: AUTH_KEY
|
||||
- **Location**:
|
||||
|
||||
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.2.3-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -1,3 +1,10 @@
|
||||
#
|
||||
# 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.
|
||||
# Version: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
function Get-FunctionsToExport {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
@@ -38,51 +45,28 @@ function Get-FunctionsToExport {
|
||||
}
|
||||
|
||||
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
|
||||
$ClientPath = ("$ScriptDir\..\..\petstore\csharp\OpenAPIClient" | Resolve-Path).ProviderPath
|
||||
$FunctionPath = 'API', 'Model' | ForEach-Object {Join-Path "$ScriptDir\src\Org.OpenAPITools\" $_}
|
||||
$BinPath = "$ScriptDir\src\Org.OpenAPITools\Bin"
|
||||
|
||||
Start-Process -FilePath "$ClientPath\build.bat" -WorkingDirectory $ClientPath -Wait -NoNewWindow
|
||||
|
||||
if (!(Test-Path "$ScriptDir\src\Org.OpenAPITools\Bin" -PathType Container)) {
|
||||
New-Item "$ScriptDir\src\Org.OpenAPITools\Bin" -ItemType Directory > $null
|
||||
}
|
||||
|
||||
Copy-Item "$ClientPath\bin\*.dll" $BinPath
|
||||
$FunctionPath = 'Api', 'Model', 'Client' | ForEach-Object {Join-Path "$ScriptDir\src\PSPetstore\" $_}
|
||||
|
||||
$Manifest = @{
|
||||
Path = "$ScriptDir\src\Org.OpenAPITools\Org.OpenAPITools.psd1"
|
||||
Path = "$ScriptDir\src\PSPetstore\PSPetstore.psd1"
|
||||
|
||||
Author = 'OpenAPI Generator Team'
|
||||
CompanyName = 'openapitools.org'
|
||||
Description = 'Org.OpenAPITools - the PowerShell module for OpenAPI Petstore'
|
||||
Description = 'PSPetstore - the PowerShell module for OpenAPI Petstore'
|
||||
|
||||
RootModule = 'Org.OpenAPITools.psm1'
|
||||
ModuleVersion = '0.1.2'
|
||||
|
||||
RootModule = 'PSPetstore.psm1'
|
||||
Guid = 'a27b908d-2a20-467f-bc32-af6f3a654ac5' # Has to be static, otherwise each new build will be considered different module
|
||||
|
||||
PowerShellVersion = '3.0'
|
||||
|
||||
RequiredAssemblies = Get-ChildItem "$BinPath\*.dll" | ForEach-Object {
|
||||
Join-Path $_.Directory.Name $_.Name
|
||||
}
|
||||
|
||||
FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport
|
||||
|
||||
VariablesToExport = @()
|
||||
AliasesToExport = @()
|
||||
CmdletsToExport = @()
|
||||
|
||||
# Should we use prefix to prevent command name collisions?
|
||||
# https://www.sapien.com/blog/2016/02/15/use-prefixes-to-prevent-command-name-collision/
|
||||
#
|
||||
# Kirk Munro recommends against it:
|
||||
# https://www.sapien.com/blog/2016/02/15/use-prefixes-to-prevent-command-name-collision/#comment-20820
|
||||
#
|
||||
# If not, we'd need to generate functions name with prefix. For examples,
|
||||
#
|
||||
# DefaultCommandPrefix = 'PetApi'
|
||||
# DefaultCommandPrefix = 'StoreApi'
|
||||
# DefaultCommandPrefix = 'UserApi'
|
||||
}
|
||||
|
||||
New-ModuleManifest @Manifest
|
||||
|
||||
@@ -1,30 +1,120 @@
|
||||
# Org.OpenAPITools - the PowerShell module for the OpenAPI Petstore
|
||||
# PSPetstore - 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](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- SDK version:
|
||||
- SDK version: 0.1.2
|
||||
- Build package: org.openapitools.codegen.languages.PowerShellClientCodegen
|
||||
|
||||
<a name="frameworks-supported"></a>
|
||||
## Frameworks supported
|
||||
- PowerShell 3.0 or later
|
||||
- PowerShell 5.0 or later
|
||||
|
||||
<a name="dependencies"></a>
|
||||
## Dependencies
|
||||
- C# API client generated by OpenAPI Generator AND should be located in $ScriptDir\..\..\petstore\csharp\OpenAPIClient as stated in Build.ps1
|
||||
|
||||
<a name="installation"></a>
|
||||
## Installation
|
||||
Run the following command to generate the DLL
|
||||
- [Windows] `Build.ps1`
|
||||
|
||||
Then import module from the .\src\Org.OpenAPITools folder:
|
||||
To install from PowerShell Gallery (https://www.powershellgallery.com/packages/PSPetstore)
|
||||
```powershell
|
||||
using Org.OpenAPITools.Org.OpenAPITools/API;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Org.OpenAPITools/Model;
|
||||
Import-Module -Name PSPetstore -Verbose
|
||||
```
|
||||
|
||||
To install from the source, run the following command to build and install the PowerShell module locally:
|
||||
```powershell
|
||||
Build.ps1
|
||||
Import-Module -Name '.\src\PSPetstore' -Verbose
|
||||
```
|
||||
|
||||
To avoid function name collision, one can use `-Prefix`, e.g. `Import-Module -Name '.\src\PSPetstore' -Prefix prefix`
|
||||
|
||||
To uninstall the module, simply run:
|
||||
```powershell
|
||||
Remove-Module -FullyQualifiedName @{ModuleName = "PSPetstore"; ModuleVersion = "0.1.2"}
|
||||
```
|
||||
|
||||
<a name="tests"></a>
|
||||
## Tests
|
||||
|
||||
To install and run `Pester`, please execute the following commands in the terminal:
|
||||
|
||||
```powershell
|
||||
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:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PSPetApi* | [**Add-PSPet**](docs/PSPetApi.md#Add-PSPet) | **POST** /pet | Add a new pet to the store
|
||||
*PSPetApi* | [**Remove-Pet**](docs/PSPetApi.md#remove-pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PSPetApi* | [**Find-PSPetsByStatus**](docs/PSPetApi.md#Find-PSPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PSPetApi* | [**Find-PSPetsByTags**](docs/PSPetApi.md#Find-PSPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PSPetApi* | [**Get-PSPetById**](docs/PSPetApi.md#Get-PSPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PSPetApi* | [**Update-PSPet**](docs/PSPetApi.md#Update-PSPet) | **PUT** /pet | Update an existing pet
|
||||
*PSPetApi* | [**Update-PSPetWithForm**](docs/PSPetApi.md#Update-PSPetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PSPetApi* | [**Invoke-PSUploadFile**](docs/PSPetApi.md#Invoke-PSUploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PSStoreApi* | [**Remove-PSOrder**](docs/PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*PSStoreApi* | [**Get-PSInventory**](docs/PSStoreApi.md#Get-PSInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*PSStoreApi* | [**Get-PSOrderById**](docs/PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*PSStoreApi* | [**Invoke-PSPlaceOrder**](docs/PSStoreApi.md#Invoke-PSPlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
*PSUserApi* | [**New-PSUser**](docs/PSUserApi.md#New-PSUser) | **POST** /user | Create user
|
||||
*PSUserApi* | [**New-PSUsersWithArrayInput**](docs/PSUserApi.md#New-PSUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*PSUserApi* | [**New-PSUsersWithListInput**](docs/PSUserApi.md#New-PSUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*PSUserApi* | [**Remove-PSUser**](docs/PSUserApi.md#Remove-PSUser) | **DELETE** /user/{username} | Delete user
|
||||
*PSUserApi* | [**Get-PSUserByName**](docs/PSUserApi.md#Get-PSUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*PSUserApi* | [**Invoke-PSLoginUser**](docs/PSUserApi.md#Invoke-PSLoginUser) | **GET** /user/login | Logs user into the system
|
||||
*PSUserApi* | [**Invoke-PSLogoutUser**](docs/PSUserApi.md#Invoke-PSLogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*PSUserApi* | [**Update-PSUser**](docs/PSUserApi.md#Update-PSUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [PSPetstore/Model.ApiResponse](docs/ApiResponse.md)
|
||||
- [PSPetstore/Model.Category](docs/Category.md)
|
||||
- [PSPetstore/Model.InlineObject](docs/InlineObject.md)
|
||||
- [PSPetstore/Model.InlineObject1](docs/InlineObject1.md)
|
||||
- [PSPetstore/Model.Order](docs/Order.md)
|
||||
- [PSPetstore/Model.Pet](docs/Pet.md)
|
||||
- [PSPetstore/Model.Tag](docs/Tag.md)
|
||||
- [PSPetstore/Model.User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
### auth_cookie
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
- **API key parameter name**: AUTH_KEY
|
||||
- **Location**:
|
||||
|
||||
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 59 B After Width: | Height: | Size: 59 B |
@@ -1,164 +0,0 @@
|
||||
function Invoke-PetApiAddPet {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.Pet]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-AddPet' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.AddPet(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiDeletePet {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Int64]
|
||||
${petId},
|
||||
[Parameter(Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[String]
|
||||
${apiKey}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-DeletePet' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.DeletePet(
|
||||
${petId},
|
||||
${apiKey}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiFindPetsByStatus {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String[]]
|
||||
${status}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-FindPetsByStatus' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.FindPetsByStatus(
|
||||
${status}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiFindPetsByTags {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String[]]
|
||||
${tags}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-FindPetsByTags' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.FindPetsByTags(
|
||||
${tags}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiGetPetById {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Int64]
|
||||
${petId}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-GetPetById' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.GetPetById(
|
||||
${petId}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiUpdatePet {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.Pet]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-UpdatePet' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.UpdatePet(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiUpdatePetWithForm {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Int64]
|
||||
${petId},
|
||||
[Parameter(Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[String]
|
||||
${name},
|
||||
[Parameter(Position = 2, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[String]
|
||||
${status}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-UpdatePetWithForm' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.UpdatePetWithForm(
|
||||
${petId},
|
||||
${name},
|
||||
${status}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-PetApiUploadFile {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Int64]
|
||||
${petId},
|
||||
[Parameter(Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[String]
|
||||
${additionalMetadata},
|
||||
[Parameter(Position = 2, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[String]
|
||||
${file}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: PetApi-UploadFile' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:PetApi.UploadFile(
|
||||
${petId},
|
||||
${additionalMetadata},
|
||||
${file}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
function Invoke-StoreApiDeleteOrder {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${orderId}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: StoreApi-DeleteOrder' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:StoreApi.DeleteOrder(
|
||||
${orderId}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-StoreApiGetInventory {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: StoreApi-GetInventory' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:StoreApi.GetInventory(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-StoreApiGetOrderById {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Int64]
|
||||
${orderId}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: StoreApi-GetOrderById' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:StoreApi.GetOrderById(
|
||||
${orderId}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-StoreApiPlaceOrder {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.Order]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: StoreApi-PlaceOrder' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:StoreApi.PlaceOrder(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
function Invoke-UserApiCreateUser {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.User]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-CreateUser' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.CreateUser(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiCreateUsersWithArrayInput {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.User[]]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-CreateUsersWithArrayInput' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.CreateUsersWithArrayInput(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiCreateUsersWithListInput {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.User[]]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-CreateUsersWithListInput' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.CreateUsersWithListInput(
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiDeleteUser {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${username}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-DeleteUser' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.DeleteUser(
|
||||
${username}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiGetUserByName {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${username}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-GetUserByName' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.GetUserByName(
|
||||
${username}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiLoginUser {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${username},
|
||||
[Parameter(Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${password}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-LoginUser' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.LoginUser(
|
||||
${username},
|
||||
${password}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiLogoutUser {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-LogoutUser' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.LogoutUser(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-UserApiUpdateUser {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${username},
|
||||
[Parameter(Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[Org.OpenAPITools.Model.User]
|
||||
${body}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: UserApi-UpdateUser' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$Script:UserApi.UpdateUser(
|
||||
${username},
|
||||
${body}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
function New-ApiResponse {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int32]]
|
||||
${code},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${type},
|
||||
[Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${message}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.ApiResponse' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.ApiResponse -ArgumentList @(
|
||||
${code},
|
||||
${type},
|
||||
${message}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
function New-Category {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${id},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${name}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.Category' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.Category -ArgumentList @(
|
||||
${id},
|
||||
${name}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
function New-InlineObject {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${name},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${status}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.InlineObject' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.InlineObject -ArgumentList @(
|
||||
${name},
|
||||
${status}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
function New-InlineObject1 {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${additionalMetadata},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[String]]
|
||||
${file}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.InlineObject1' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.InlineObject1 -ArgumentList @(
|
||||
${additionalMetadata},
|
||||
${file}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
function New-Order {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${id},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${petId},
|
||||
[Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int32]]
|
||||
${quantity},
|
||||
[Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[System.DateTime]]
|
||||
${shipDate},
|
||||
[Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${status},
|
||||
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Boolean]]
|
||||
${complete}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.Order' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.Order -ArgumentList @(
|
||||
${id},
|
||||
${petId},
|
||||
${quantity},
|
||||
${shipDate},
|
||||
${status},
|
||||
${complete}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
function New-Pet {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${id},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[Org.OpenAPITools.Model.Category]
|
||||
${category},
|
||||
[Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String]
|
||||
${name},
|
||||
[Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
|
||||
[String[]]
|
||||
${photoUrls},
|
||||
[Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
|
||||
[Org.OpenAPITools.Model.Tag[]]
|
||||
${tags},
|
||||
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${status}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.Pet' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.Pet -ArgumentList @(
|
||||
${id},
|
||||
${category},
|
||||
${name},
|
||||
${photoUrls},
|
||||
${tags},
|
||||
${status}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
function New-Tag {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${id},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${name}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.Tag' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.Tag -ArgumentList @(
|
||||
${id},
|
||||
${name}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
function New-User {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int64]]
|
||||
${id},
|
||||
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${username},
|
||||
[Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${firstName},
|
||||
[Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${lastName},
|
||||
[Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${email},
|
||||
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${password},
|
||||
[Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)]
|
||||
[String]
|
||||
${phone},
|
||||
[Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)]
|
||||
[System.Nullable[Int32]]
|
||||
${userStatus}
|
||||
)
|
||||
|
||||
Process {
|
||||
'Creating object: Org.OpenAPITools.Model.User' | Write-Verbose
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
New-Object -TypeName Org.OpenAPITools.Model.User -ArgumentList @(
|
||||
${id},
|
||||
${username},
|
||||
${firstName},
|
||||
${lastName},
|
||||
${email},
|
||||
${password},
|
||||
${phone},
|
||||
${userStatus}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
#
|
||||
# Module manifest for module 'Org.OpenAPITools'
|
||||
#
|
||||
# Generated by: OpenAPI Generator Team
|
||||
#
|
||||
# Generated on: 3/29/20
|
||||
#
|
||||
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
RootModule = 'Org.OpenAPITools.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.0.1'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = 'a27b908d-2a20-467f-bc32-af6f3a654ac5'
|
||||
|
||||
# Author of this module
|
||||
Author = 'OpenAPI Generator Team'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'openapitools.org'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = '(c) OpenAPI Generator Team. All rights reserved.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'Org.OpenAPITools - the PowerShell module for OpenAPI Petstore'
|
||||
|
||||
# Minimum version of the PowerShell engine required by this module
|
||||
PowerShellVersion = '3.0'
|
||||
|
||||
# Name of the PowerShell host required by this module
|
||||
# PowerShellHostName = ''
|
||||
|
||||
# Minimum version of the PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
|
||||
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# DotNetFrameworkVersion = ''
|
||||
|
||||
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# CLRVersion = ''
|
||||
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
# ProcessorArchitecture = ''
|
||||
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
# RequiredModules = @()
|
||||
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
# RequiredAssemblies = @()
|
||||
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
# ScriptsToProcess = @()
|
||||
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
# FormatsToProcess = @()
|
||||
|
||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||
# NestedModules = @()
|
||||
|
||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||
FunctionsToExport = 'Invoke-PetApiAddPet', 'Invoke-PetApiDeletePet',
|
||||
'Invoke-PetApiFindPetsByStatus', 'Invoke-PetApiFindPetsByTags',
|
||||
'Invoke-PetApiGetPetById', 'Invoke-PetApiUpdatePet',
|
||||
'Invoke-PetApiUpdatePetWithForm', 'Invoke-PetApiUploadFile',
|
||||
'Invoke-StoreApiDeleteOrder', 'Invoke-StoreApiGetInventory',
|
||||
'Invoke-StoreApiGetOrderById', 'Invoke-StoreApiPlaceOrder',
|
||||
'Invoke-UserApiCreateUser',
|
||||
'Invoke-UserApiCreateUsersWithArrayInput',
|
||||
'Invoke-UserApiCreateUsersWithListInput',
|
||||
'Invoke-UserApiDeleteUser', 'Invoke-UserApiGetUserByName',
|
||||
'Invoke-UserApiLoginUser', 'Invoke-UserApiLogoutUser',
|
||||
'Invoke-UserApiUpdateUser', 'New-ApiResponse', 'New-Category',
|
||||
'New-InlineObject', 'New-InlineObject1', 'New-Order', 'New-Pet',
|
||||
'New-Tag', 'New-User'
|
||||
|
||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||
CmdletsToExport = @()
|
||||
|
||||
# Variables to export from this module
|
||||
# VariablesToExport = @()
|
||||
|
||||
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
|
||||
AliasesToExport = @()
|
||||
|
||||
# DSC resources to export from this module
|
||||
# DscResourcesToExport = @()
|
||||
|
||||
# List of all modules packaged with this module
|
||||
# ModuleList = @()
|
||||
|
||||
# List of all files packaged with this module
|
||||
# FileList = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
|
||||
PSData = @{
|
||||
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
# Tags = @()
|
||||
|
||||
# A URL to the license for this module.
|
||||
# LicenseUri = ''
|
||||
|
||||
# A URL to the main website for this project.
|
||||
# ProjectUri = ''
|
||||
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
# ReleaseNotes = ''
|
||||
|
||||
} # End of PSData hashtable
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
# HelpInfoURI = ''
|
||||
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#region Import functions
|
||||
|
||||
'API', 'Model', 'Private' | Get-ChildItem -Path {
|
||||
Join-Path $PSScriptRoot $_
|
||||
} -Filter '*.ps1' | ForEach-Object {
|
||||
Write-Verbose "Importing file: $($_.BaseName)"
|
||||
try {
|
||||
. $_.FullName
|
||||
} catch {
|
||||
Write-Verbose "Can't import function!"
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Initialize APIs
|
||||
|
||||
'Creating object: Org.OpenAPITools.Api.PetApi' | Write-Verbose
|
||||
$Script:PetApi= New-Object -TypeName Org.OpenAPITools.Api.PetApi -ArgumentList @($null)
|
||||
|
||||
'Creating object: Org.OpenAPITools.Api.StoreApi' | Write-Verbose
|
||||
$Script:StoreApi= New-Object -TypeName Org.OpenAPITools.Api.StoreApi -ArgumentList @($null)
|
||||
|
||||
'Creating object: Org.OpenAPITools.Api.UserApi' | Write-Verbose
|
||||
$Script:UserApi= New-Object -TypeName Org.OpenAPITools.Api.UserApi -ArgumentList @($null)
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -1,14 +0,0 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Helper function to get common parameters (Verbose, Debug, etc.)
|
||||
.Example
|
||||
Get-CommonParameters
|
||||
#>
|
||||
function Get-CommonParameters {
|
||||
function tmp {
|
||||
[CmdletBinding()]
|
||||
Param ()
|
||||
}
|
||||
|
||||
(Get-Command -Name tmp -CommandType Function).Parameters.Keys
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Helper function to format debug parameter output.
|
||||
.Example
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
#>
|
||||
function Out-DebugParameter {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(ValueFromPipeline = $true, Mandatory = $true)]
|
||||
[AllowEmptyCollection()]
|
||||
$InputObject
|
||||
)
|
||||
|
||||
Begin {
|
||||
$CommonParameters = Get-CommonParameters
|
||||
}
|
||||
|
||||
Process {
|
||||
$InputObject.GetEnumerator() | Where-Object {
|
||||
$CommonParameters -notcontains $_.Key
|
||||
} | Format-Table -AutoSize -Property (
|
||||
@{
|
||||
Name = 'Parameter'
|
||||
Expression = {$_.Key}
|
||||
},
|
||||
@{
|
||||
Name = 'Value'
|
||||
Expression = {$_.Value}
|
||||
}
|
||||
) | Out-String -Stream | ForEach-Object {
|
||||
if ($_.Trim()) {
|
||||
$_
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
PSTOPIC
|
||||
about_Org.OpenAPITools
|
||||
|
||||
SHORT DESCRIPTION
|
||||
Org.OpenAPITools - the PowerShell module for the OpenAPI Petstore
|
||||
|
||||
LONG DESCRIPTION
|
||||
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](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- SDK version:
|
||||
- Build package: org.openapitools.codegen.languages.PowerShellClientCodegen
|
||||
|
||||
Frameworks supported:
|
||||
|
||||
* PowerShell 3.0+
|
||||
* .NET 4.0 or later
|
||||
@@ -95,6 +95,21 @@ function Invoke-PSApiClient {
|
||||
$RequestBody = $Body
|
||||
}
|
||||
|
||||
# http signature authentication
|
||||
if ($null -ne $Configuration['ApiKey'] -and $Configuration['ApiKey'].Count -gt 0) {
|
||||
$httpSignHeaderArgument = @{
|
||||
Method = $Method
|
||||
UriBuilder = $UriBuilder
|
||||
Body = $Body
|
||||
}
|
||||
$signedHeader = Get-PSHttpSignedHeader @httpSignHeaderArgument
|
||||
if($null -ne $signedHeader -and $signedHeader.Count -gt 0){
|
||||
foreach($item in $signedHeader.GetEnumerator()){
|
||||
$HeaderParameters[$item.Name] = $item.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($SkipCertificateCheck -eq $true) {
|
||||
$Response = Invoke-WebRequest -Uri $UriBuilder.Uri `
|
||||
-Method $Method `
|
||||
@@ -11,7 +11,7 @@ LONG DESCRIPTION
|
||||
|
||||
- API version: 1.0.0
|
||||
- SDK version: 0.1.2
|
||||
- Build package: org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen
|
||||
- Build package: org.openapitools.codegen.languages.PowerShellClientCodegen
|
||||
|
||||
Frameworks supported:
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
# Please replace "TEST_VALUE" with a proper value and uncomment the code for testing the function
|
||||
|
||||
Describe 'Org.OpenAPITools PetApi' {
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiAddPet' {
|
||||
$ret = Invoke-PetApiGetPetById -pet "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiDeletePet' {
|
||||
$ret = Invoke-PetApiGetPetById -petId "TEST_VALUE" -apiKey "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiFindPetsByStatus' {
|
||||
$ret = Invoke-PetApiGetPetById -status "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiFindPetsByTags' {
|
||||
$ret = Invoke-PetApiGetPetById -tags "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiGetPetById' {
|
||||
$ret = Invoke-PetApiGetPetById -petId "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiUpdatePet' {
|
||||
$ret = Invoke-PetApiGetPetById -pet "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiUpdatePetWithForm' {
|
||||
$ret = Invoke-PetApiGetPetById -petId "TEST_VALUE" -name "TEST_VALUE" -status "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'PetApi' {
|
||||
It 'Invoke-PetApiUploadFile' {
|
||||
$ret = Invoke-PetApiGetPetById -petId "TEST_VALUE" -additionalMetadata "TEST_VALUE" -file "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
# Please replace "TEST_VALUE" with a proper value and uncomment the code for testing the function
|
||||
|
||||
Describe 'Org.OpenAPITools StoreApi' {
|
||||
Context 'StoreApi' {
|
||||
It 'Invoke-StoreApiDeleteOrder' {
|
||||
$ret = Invoke-PetApiGetPetById -orderId "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'StoreApi' {
|
||||
It 'Invoke-StoreApiGetInventory' {
|
||||
$ret = Invoke-PetApiGetPetById
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'StoreApi' {
|
||||
It 'Invoke-StoreApiGetOrderById' {
|
||||
$ret = Invoke-PetApiGetPetById -orderId "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'StoreApi' {
|
||||
It 'Invoke-StoreApiPlaceOrder' {
|
||||
$ret = Invoke-PetApiGetPetById -order "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
# Please replace "TEST_VALUE" with a proper value and uncomment the code for testing the function
|
||||
|
||||
Describe 'Org.OpenAPITools UserApi' {
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiCreateUser' {
|
||||
$ret = Invoke-PetApiGetPetById -user "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiCreateUsersWithArrayInput' {
|
||||
$ret = Invoke-PetApiGetPetById -user "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiCreateUsersWithListInput' {
|
||||
$ret = Invoke-PetApiGetPetById -user "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiDeleteUser' {
|
||||
$ret = Invoke-PetApiGetPetById -username "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiGetUserByName' {
|
||||
$ret = Invoke-PetApiGetPetById -username "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiLoginUser' {
|
||||
$ret = Invoke-PetApiGetPetById -username "TEST_VALUE" -password "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiLogoutUser' {
|
||||
$ret = Invoke-PetApiGetPetById
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
Context 'UserApi' {
|
||||
It 'Invoke-UserApiUpdateUser' {
|
||||
$ret = Invoke-PetApiGetPetById -username "TEST_VALUE" -user "TEST_VALUE"
|
||||
#$ret | Should BeOfType Org.OpenAPITools.Model.ModelNameHere
|
||||
#$ret.property | Should Be 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
## TODO we need to update the template to test the model files
|
||||
|
||||
|
Before Width: | Height: | Size: 59 B After Width: | Height: | Size: 59 B |
Reference in New Issue
Block a user