Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/FriedrichWeinmann/AutoRest
https://github.com/FriedrichWeinmann/AutoRest
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/FriedrichWeinmann/AutoRest
- Owner: FriedrichWeinmann
- License: mit
- Created: 2021-09-30T11:47:39.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T07:21:09.000Z (8 months ago)
- Last Synced: 2024-10-28T17:20:03.914Z (16 days ago)
- Language: PowerShell
- Size: 146 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - FriedrichWeinmann/AutoRest - (PowerShell)
README
# AutoRest (PowerShell)
Welcome to the home of the AutoRest for PowerShell project.
This toolkit is designed to help with generating client code for Rest APIs.## Installation
To install this PowerShell module - and you need it only on the machine _generating_ the code, the output itself has no dependencies in this module - run the following line in your PowerShell console of choice:
```powershell
Install-Module AutoRest -Scope CurrentUser
```## Requirements
+ PowerShell 5.1+ ([PowerShell 7+ recommended](https://aka.ms/pwsh))
+ Module: [PSFramework](https://psframework.org)
+ Module: strings> All module dependencies are installed automatically with the above install command
## Getting started
For details on how to use each command, see their help, but fundamentally, the system has two steps:
+ Convert source to Command data
+ Export Command data to file as commandExample:
```powershell
$paramConvertFromARSwagger = @{
Transformpath = '.\transform'
RestCommand = 'Invoke-ARRestRequest'
ModulePrefix = 'Mg'
PathPrefix = '/api/'
}Get-ChildItem .\swaggerfiles | ConvertFrom-ARSwagger @paramConvertFromARSwagger | Export-ARCommand -Path .
```> [More Information on Customizing the result using Transforms](https://github.com/FriedrichWeinmann/AutoRest/tree/master/AutoRest/transformExamples)
## Authentication & Invocation
The commands generated from this module assume the actual authentication and request execution is provided externally.
An example authentication component has been provided through the sister project "RestConnect"