8000 GitHub - tepeka/swagger-to-document: Generate a PDF document from a Swagger API easily.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tepeka/swagger-to-document

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

The intened use of this repository is to create a PDF document from an existing Swagger API description. This container takes use from two tools:

  1. swagger2markup: Creates AsciiDoc files from Swagger API descriptions.
  2. Asciidoctor: Renders AsciiDoc files as PDF (for example).

How To

Create PDF from swagger YAML

The default container command creates a PDF document from a given Swagger YAML file.

docker run --rm -it -v <path-to-documents-dir>:/documents tepeka/swagger-to-document

There have to be two files mounted using the volume /documents:

  1. swagger.yaml contains the full API documentation
  2. index.adoc is used to bundle the single AsciiDoc files generated by swagger2markup. It can also be extend by manually written AsciiDoc files. Here is an example of a basic AsciiDoc index file:
include::./generated/overview.adoc[]
include::./generated/security.adoc[]
include::./generated/paths.adoc[]
include::./generated/definitions.adoc[]

Example

The example folder contains a update-api-doc command to update the Swagger API in documents.

Simply change the swagger.yaml API description or extend the index.adoc by manually written documentation and then execute the update-api-doc command to create the PDF.

About

Generate a PDF document from a Swagger API easily.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0