openapi-docgen

Generates OpenAPI (Swagger) documentation from an openapi formatted yaml or json file. Includes a Maven plugin that can perform generation of documentation.

License

License

GroupId

GroupId

com.markstickel.openapi
ArtifactId

ArtifactId

openapi-docgen
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

pom
Description

Description

openapi-docgen
Generates OpenAPI (Swagger) documentation from an openapi formatted yaml or json file. Includes a Maven plugin that can perform generation of documentation.
Project URL

Project URL

https://github.com/mstickel/openapi-docgen
Source Code Management

Source Code Management

https://github.com/mstickel/openapi-docgen

Download openapi-docgen

Filename Size
openapi-docgen-1.0.pom 6 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.markstickel.openapi/openapi-docgen/ -->
<dependency>
    <groupId>com.markstickel.openapi</groupId>
    <artifactId>openapi-docgen</artifactId>
    <version>1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.markstickel.openapi/openapi-docgen/
implementation 'com.markstickel.openapi:openapi-docgen:1.0'
// https://jarcasting.com/artifacts/com.markstickel.openapi/openapi-docgen/
implementation ("com.markstickel.openapi:openapi-docgen:1.0")
'com.markstickel.openapi:openapi-docgen:pom:1.0'
<dependency org="com.markstickel.openapi" name="openapi-docgen" rev="1.0">
  <artifact name="openapi-docgen" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.markstickel.openapi', module='openapi-docgen', version='1.0')
)
libraryDependencies += "com.markstickel.openapi" % "openapi-docgen" % "1.0"
[com.markstickel.openapi/openapi-docgen "1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • openapi-docgen-core
  • openapi-docgen-maven-plugin

openapi-docgen

Generates standalone html documentation from openapi yaml.

Prerequisites

You must have node installed.

Modules

This project contains two modules:

  1. The core library, which wraps Node's redoc-cli library (and installs it if it is not present on your system)
  2. A openapi-docgen-maven-plugin module. This is a Maven plugin that you can use as part of your build process to generate the documentation during the Maven lifecycle.

Using the openapi-docgen Maven plugin

    <build>
        <plugins>
            <plugin>
                <groupId>com.markstickel.openapi</groupId>
                <artifactId>openapi-docgen-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>generate-openapi-doc</id>
                        <phase>generate-resources</phase>
                        <inherited>false</inherited>
                        <configuration>
                            <input>petstore.yml</input>
                            <output>target/petstore-api.html</output>
                        </configuration>
                        <goals>
                            <goal>docgen</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

This configuration triggers the plugin during Maven's generate-resources phase.

Arguments

  • input: the filename of a yaml- or json-formatted OpenAPI document to read in
  • output: the filename to write the generated HTML to.

Versions

Version
1.0