AutoRest: The Module Generator
summary
AutoRest takes an OpenAPI/Swagger file and produces a PowerShell module; the build uses Node.js, the .NET SDK and AutoRest.PowerShell, requires PowerShell 6+, VS Code and a readme-driven config. The workflow actually generates C# cmdlets and models, adds a custom module class to inject an environment variable Runway session token into Authorization headers, and adds PowerShell helper commands for login; large specs can take minutes (graph ~40m) but the generated module runs, authenticates, and returns typed objects with tab completion.
AI-written summary · about
chapters (13)
- 0:00AutoRest introduction
- 2:50AutoRest and OpenAPI basics
- 6:18AutoRest setup
- 8:24OpenAPI Swagger structure
- 18:33First AutoRest module
- 22:26Generate and review module
- 26:35Run generated module
- 31:41Adding authentication to the module
- 35:51Custom PowerShell commandlets
- 39:51Quality-of-life commandlets
- 42:19Customize verbs with directives
- 44:26Finalize and test module
- 46:12Summary and publish
related talks
47mPowerShell + AutoRest + Swagger = Instant Modules
47mCode generation From API Swagger Yaml schema to PowerShell module in 4 easy steps
48mAPIs are for Automata, PowerShell is for People
19mAutomate your API to perfection
47mLeveraging Web Services with PowerShell
57mOpenAPI & .NET: You're Doing It Wrong
10mThe Power of OpenAPI - Backstage’s New Project Area
19mSecure and accelerate APIs' lifecycle with the OpenAPI specification
