Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

isaaceindhoven/swagger-docgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swagger spec to PDF documentation tool

This tool takes a Swagger API specification (in yaml or json) and converts it into a PDF file.

Examples

Surely you’re wondering what this tool can do for you. Have a look at some of our examples!

Usage

The tool can be executed from the command line.

Swagger2PDF -i path/to/spec.yaml -o path/to/api.pdf

Options

Short Long Description Example

Required options

-i

--input

Input Swagger spec

spec.yaml

-o

--output

Output PDF file

api.pdf

Other options

-t

--toc

Generate Table of Contents

boolean

-g

--groupbytags

Group paths by tags.
Cannot be combined with -r

boolean

-r

--headerregex

RegEx pattern used for determining operation categories. First capture group will be category name.
Cannot be combined with -g

\/operations\/(\w+).*$

Styling options

-s

--style

Asciidoctor style

default

-d

--styledir

Asciidoctor styles directory

styles

-p

--imagesdir

Asciidoctor images directory

styles/img

-f

--fontsdir

Asciidoctor fonts directory

style/fonts

-h

--highlighter

Asciidoctor code highlighting engine
Possible values: rouge, pygments, coderay

coderay

Tools

This project depends on a few different tools to make everything possible. Go give them some love too!