PowerShell + AutoRest + Swagger = Instant Modules
summary
AutoRest generates PowerShell modules from a Swagger/OpenAPI spec and the demo shows it actually produces usable cmdlets within minutes. Requirements are Node.js, AutoRest beta, PowerShell 6.1+, and .NET Core SDK. Output is a compiled DLL plus script proxy cmdlets that call it, packaged as a NuGet module and installable to PowerShell. The xkcd example works end to end. Real projects need custom code for auth and a few spec tweaks so authentication often requires custom C# hooks, AutoRest generates PowerShell modules from a Swagger/OpenAPI spec, produces a compiled DLL plus script cmdlets.
AI-written summary · about
chapters (10)
- 0:00Start
- 7:26Yaml Spec
- 14:04Requirements for Running Autorest
- 25:48What Types Are Available within that Dll
- 26:53Generating a New Spec File
- 28:07Nuget File
- 34:29Fiddler
- 36:42Windows Authentication
- 44:01Literate Configuration File
- 45:08Final Thoughts
related talks
47mAutoRest: The Module Generator
47mCode generation From API Swagger Yaml schema to PowerShell module in 4 easy steps
47mThink Abstract, abstracting your PowerShell code
01h 33mA hands-on lab working
47mLeveraging Web Services with PowerShell
01h 30mConjuring data with APIs
48mAPIs are for Automata, PowerShell is for People
48mFrom API to usable PowerShell module
