Auto-generate code!
- Get Node.js.
- Get PowerShell.
- Get AutoRest.
A simple web app and API that says whether Mt. Rainier is visible.
- OpenAPI Spec: mtrainier.yml & mtrainier.json
- Language: PowerShell
- Generated Code Folder: MtRainier
cd MtRainier
autorest --input-file=./mtrainier.yml --output-folder=./PSMtRainier --powershell
cd PSMtRainier
./build-module.ps1 -Run
- build and start a new instance of PowerShell with the module loaded.Get-MtRainier
- Run the command.
I got this from the official FDIC API docs page! The only modification was changing the server.url
since I downloaded the files and merging the files into 1 file.
- OpenAPI Spec: fdic.yaml
- Language: PowerShell
- Generated Code Folder: PSFdic
cd FDIC
autorest --input-file=./fdic.yaml --output-folder=./PSFdic --powershell --v3
cd PSFdic
- to install dependencies../build-module.ps1 -Run
- build and start a new instance of PowerShell with the module.Search-StructureInstitution -Filters 'STALP:WA'
- Run a command.
- OpenAPI Spec: fdic.yml
- Language: Node.js
- Generated Code Folder: fdic.js
cd FDIC
autorest --input-file=./fdic.yaml --output-folder=./fdic.js --nodejs --v3
npm install
- to install dependencies.npm run compile
- to compile the TypeScript. (NOTE: you may get errors, that's ok)npm start
- run the code.
- PowerShell
- AutoRest
- OpenApi Initiative
- Cool OpenApi/Swagger tools