Giter Site home page Giter Site logo

beatcracker / posh-swagger-codegen Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 65 KB

Generate PowerShell module from OpenAPI spec using Swagger Codegen

License: MIT License

PowerShell 100.00%
swagger swagger-codegen swagger-spec powershell powershell-module powershell-scripts openapi

posh-swagger-codegen's Introduction

A word of warning: this repo is probably rendered obsolete by the release of PSSwagger.


Generate PowerShell module from OpenAPI spec using Swagger Codegen.

Promo Tweet

Swagger Codegen 2.2.3 aims to have PowerShell module generator. Until it's released, you can build latest version of Swagger Codegen yourself, which already has beta-quality PowerShell support and use it to generate PowerShell module.

Info

Details

This repository contains set of scripts that will:

Usage

Generated module will be available in the ApiName\PowerShell\src\IO.Swagger directory.

To import it use: Import-Module -name .\ApiName\PowerShell\src\IO.Swagger

Build XKCD module

If run without arguments, Build.ps1 script will install all prerequisites, build Swagger Codegen and generate XKCD module using this spec: https://github.com/APIs-guru/openapi-directory/tree/master/APIs/xkcd.com/1.0.0

  • Run PowerShell/PowerShell ISE as admin
  • Run Build.ps1 script

Build custom module

If you already run Build.ps1 script and have all prerequisites, you can build custom PowerShell modules.

By API name

Build instagram.com module by API name

.\Build.ps1 -ApiName instagram.com

From custom file

Build instagram.com module from file

.\Build.ps1 -ApiName instagram.com -InFile .\path\to\spec\swagger.yml

Update Swagger Codegen

To pull latest changes and rebuild Swagger Codegen, add UpdateCodegen switch.

.\Build.ps1 -UpdateCodegen

posh-swagger-codegen's People

Contributors

beatcracker avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.