/Swagger2dpSlate

Generates a dpSlate formatted API Reference Guide from Swagger specifications

Primary LanguageJavaApache License 2.0Apache-2.0

Swagger2dpSlate

Software to generate a dpSlate API Reference Guide from your Swagger specification. dpSlate is great for human written documentation such as Getting Started Guides and Tutorials while Swagger is great for autogenerated documentation to provide an API Reference Guide. But if you use Swagger-UI, the most widely used way of presenting Swagger documents, your API Reference Guide will not reflect the same formatting and look and feel as your other API Documents. Swagger2dpSlate solves this problem by generating dpSlate compatible Markdown from the Swagger specification such that your documents all look consistent.

Getting Started

Swagger2dpSlate is built in Java 8 and is a pre-processor to dpSlate. When it ingests the Swagger specification, it will generate the Markdown, including the dpSlate directives, to produce a three-column dpSlate document. Because it generates Markdown, the resulting document can be tweeked by humans and will subsequently be produced in the same format as your other dpSlate documents.

Requirements
  • Java 8
  • swagger-codegen
git clone https://github.com/pnerger/Swagger2dpSlate.git
cd Swagger2dpSlate
mvn clean install -DskipTests

Running

java -jar target/client.slate-*-jar-with-dependencies.jar generate -l java,python,php -i src/main/resources/rakam-example-spec.json -o ./

It will output slate.md file in current directory, you can copy it to slate/source/index.md and Slate will update the HTML files automatically.

Currently, the supported languages are php, python java. javascript for swagger-js will be supported in first release.

Example

Rakam documentation is generated by swagger-slate.

Contribution

This project was forked by early work by Buremba and is a fork of that work.

The project is just beginning to provide the basic capability to generate API Reference Guides.

Oauth support, path and header parameter types are not supported yet.