openapi-docgen-core

Library that generates HTML documentation from OpenAPI-formatted inputs. Uses node's redoc-cli under the hood.

License

License

GroupId

GroupId

com.markstickel.openapi
ArtifactId

ArtifactId

openapi-docgen-core
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

openapi-docgen-core
Library that generates HTML documentation from OpenAPI-formatted inputs. Uses node's redoc-cli under the hood.

Download openapi-docgen-core

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.25

runtime (1)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3

test (1)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.5.1

Project Modules

There are no modules declared in this project.

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