https://github.com/IISResetMe/PSOAS
PowerShell OpenAPI Specification Client Module Generator
https://github.com/IISResetMe/PSOAS
Last synced: 4 months ago
JSON representation
PowerShell OpenAPI Specification Client Module Generator
- Host: GitHub
- URL: https://github.com/IISResetMe/PSOAS
- Owner: IISResetMe
- Created: 2020-10-26T09:47:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-26T09:48:23.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:05:29.319Z (8 months ago)
- Language: PowerShell
- Size: 1000 Bytes
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - IISResetMe/PSOAS - PowerShell OpenAPI Specification Client Module Generator (PowerShell)
README
# PSOAS
OAS 3.0 client generator in pure PowerShell
## Why PSOAS?
OpenAPI/Swagger is a popular set of open specifications for designing, exposing and consuming web APIs. Unfortunately most of the official tooling depends on Node.js, and javascript is the last thing I want running in my shell. Hence this module.
## Usage
```powershell
# Import PSOAS
Import-Module PSOAS# Generate PowerShell client module for the petstore sample API
$PetStoreModule = New-SwaggerModule 'https://petstore3.swagger.io/api/v3/openapi.json' -Prefix PetStore# Either Import and use in current session
Import-Module $PetStoreModule
$PSDefaultParameterValues['*-PetStore*:BaseUri'] = 'https://petstore3.swagger.io'
Connect-PetStoreUser
Find-PetsById -Id 123# Or save for consumption elsewhere
Save-Module $PetStoreModule -Path C:\path\to\exported\PetStoreSwaggerModule.psm1
```