Giter Club home page Giter Club logo

swagger-codegen-cli.docker's Introduction

Dockerfile for running Swagger Codegen.

This allows users to generate code without installing Java on the host machine, or without updating from Java 1.6 (we all have our reasons).

This container image is also helpful if you can't, or don't want to, install Bash in your environment.

Options

Swagger Codegen CLI options are available:

  • generate
  • help
  • langs
  • meta
  • config-help

The default is help.

Usage

All options for the CLI are supported.

docker run -it myworkout/swagger-codegen-cli config-help -l csharp

For full options details, see the Swagger Codegen README.

Output Folder

Mount a volume to /swagger-api/out for output.

Example:

docker run -it -v ~/temp/swagger-generated:/swagger-api/out \
    myworkout/swagger-codegen-cli generate \
    -i /swagger-api/yaml/petstore-with-fake-endpoints-models-for-testing.yaml \
    -l csharp \
    -o /swagger-api/out/cs

Your generated code will now be accessible under ~/temp/swagger-generated/cs.

Input Swagger Definition

To read in a swagger definition from a local file, just map a volume to /swagger-api/yaml.

Example:

docker run -it -v ~/temp/swagger-generated:/swagger-api/out \
    -v ~/temp/swagger-definitions:/swagger-api/yaml \
    myworkout/swagger-codegen-cli generate \
    -i /swagger-api/yaml/twitter.yaml \
    -l csharp \
    -o /swagger-api/out/twitter

Your generated code will now be accessible under ~/temp/swagger-generated/twitter.

swagger-codegen-cli.docker's People

Contributors

grevenx avatar jimschubert avatar

Watchers

 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.