The primary goal of Swagger2Markup is to simplify the generation of an up-to-date RESTful API documentation by combining documentation that’s been hand-written with auto-generated API documentation produced by Swagger. The result is intended to be an up-to-date, easy-to-read, on- and offline user guide, comparable to GitHub’s API documentation. The output of the plugin can be used as an alternative to swagger-ui and can be served as static content.
The Swagger2Markup Maven Plugin simplifies the usage of Swagger2Markup. The Plugin adds a Maven goal which converts a Swagger JSON or YAML file into several AsciiDoc or GitHub Flavored Markdown documents. The plugin supports the Swagger 1.2 and 2.0 specification. Internally the plugin uses Swagger2Markup which in turn uses the official swagger-parser and a markup-document-builder.
You can use the plugin to convert your contract-first Swagger YAML file into a human-readable format and combine it with hand-written documentation. As an alternative, you can choose the code-first approach and use Swagger2Markup together with Swagger JAX-RS, springfox or spring-restdocs. See Swagger2Markup user guide for more details.
AsciiDoc is preferable to Markdown as it has more features. AsciiDoc is a text document format for writing documentation, articles, books, ebooks, slideshows, web pages and blogs. AsciiDoc files can be converted to HTML, PDF and EPUB. AsciiDoc is much better suited for describing public APIs than JavaDoc or Annotations.
You can generate your HTML5, PDF and EPUB documentation via the asciidoctor-gradle-plugin. You can also use JBake, MkDocs, ReadTheDocs or slate to publish your AsciiDoc or Markdown documentation.
The project requires at least JDK 7.
The documentation can be found at Reference documentation
Copyright 2015 RedOwl Analytics
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.