Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandcastle/swagger-codegen-docker
Docker container for running swagger-codegen during builds
https://github.com/sandcastle/swagger-codegen-docker
Last synced: 9 days ago
JSON representation
Docker container for running swagger-codegen during builds
- Host: GitHub
- URL: https://github.com/sandcastle/swagger-codegen-docker
- Owner: sandcastle
- Created: 2015-09-08T15:02:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T01:46:57.000Z (over 9 years ago)
- Last Synced: 2024-11-19T15:57:45.318Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 164 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# swagger-codegen-docker
> Container for building swagger code## Getting Started
### Docker Image
Before you can generate code, you first need to aquire the docker image.
#### Local Build
To build the image from source, run the following command:
```sh
sh script/build
```#### DockerHub
To pull the latest version of the image from DockerHub, run the following command:
```sh
docker pull sandcastle/swagger-codegen-docker
```### Usage
To generate swagger output - run the following docker command:
```sh
docker run \
-v "${PWD}/spec:/spec" \
-v "${PWD}/tmp/output/html:/gen" \
-e "LANGUAGE=dynamic-html" \
-e "SWAGGER_FILE=swagger.yml" \
sandcastle/swagger-codegen-docker
```Below explains what each line does:
- `-v "${PWD}/spec:/spec" \` - maps the local spec folder (`${PWD}/spec`) to the internal spec folder (`/spec`)
- `-v "${PWD}/tmp/output/html:/gen" \` - maps the local output folder (`${PWD}/tmp/output/html`) to the internal output folder (`/gen`)
- `-e "LANGUAGE=dynamic-html" \` - the language to generate the output in (see below)
- `-e "SWAGGER_FILE=swagger.yml" \` - the name of the swagger file (within the `/spec` volume above)
- `sandcastle/swagger-codegen-docker` - the name of the docker image to run## Available Languages
The following languages are available for generation:
- android
- async-scala
- csharp
- flash
- java
- jaxrs
- inflector
- nodejs
- objc
- perl
- php
- python
- python3
- qt5cpp
- retrofit
- ruby
- scala
- scalatra
- silex-PHP
- sinatra
- spring-mvc
- dynamic-html
- html
- swagger
- swagger-yaml
- swift
- tizen
- typescript-angular
- typescript-node
- akka-scala
- CsharpDotNet2