Skip to content

Commit

Permalink
Add openap2postmanv2
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrom committed Apr 14, 2019
1 parent 07562b6 commit 52eb6b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN apk add --no-cache --virtual build-dependencies \
&& rm -Rf /root/.cabal/ /root/.ghc/ \
&& cd / && rm -Rf /pandoc-build

# OpenAPI to Postman
RUN npm install openapi-to-postmanv2 -g

ENV PATH "$PATH:/root/.composer/vendor/bin:${PANDOC_ROOT}/bin"

RUN mkdir /workdir
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ The jjrom/doctools docker image gives access to the following command line appli
* [widdershins](https://www.npmjs.com/package/widdershins)
* [pandoc](http://pandoc.org)
* [asciidoctor-pdf](https://asciidoctor.org)
* [openapi2postmanv2](https://github.com/postmanlabs/openapi-to-postman)

## Installation

### From dockerhub

docker pull jjrom/doctools:1.0
docker pull jjrom/doctools:2.0

### Build from source
Launch the following command and go for a (long) coffee break

docker build -t jjrom/doctools:1.0 .
docker build -t jjrom/doctools:2.0 .

## Usage
Replace ${COMMAND} with one of {openapi|api2html|widdershins|pandoc|asciidoctor-pdf}

docker run --rm -ti jjrom/doctools:1.0
docker run --rm -ti jjrom/doctools:2.0

*Note: input files must be mounted with docker -v option to be accessed by the tools*

Expand Down
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ case "$command" in
exec asciidoctor-pdf "$@"
;;

openapi2postmanv2)
exec openapi2postmanv2 "$@"
;;

debug)
exec /bin/bash
;;

*)
echo $"[ERROR] Choose one command between {openapi|api2html|widdershins|pandoc|asciidoctor-pdf}"
echo $"[ERROR] Choose one command between {openapi|api2html|widdershins|pandoc|asciidoctor-pdf|openapi2postmanv2}"
exit 1

esac

0 comments on commit 52eb6b5

Please sign in to comment.