Skip to content

chhorz/oas-generator

Repository files navigation

OAS Generator

Java CI Maven Central

About

The OAS Generator is a java annotation processor that generates an OpenAPI specification file from the java annotations within the source code. Because the file is generated during compilation, the documentation is always up-to-date and references the current state of the implementation.

  • OpenAPI Specification 3.1.0 (Link)

Getting Started

  1. Add the corresponding dependency to your project

    <dependency>
        <groupId>com.github.chhorz</groupId>
        <artifactId>oas-generator-{spring-web|jaxrs|schema|asciidoctor}</artifactId>
        <version>${oas-generator.version}</version>
    </dependency>
  2. Create a configuration file oas-generator.yml (per default in /src/main/resources). An example can be found in the reference documentation.

  3. Update the Javadoc comments to match the requirements

Documentation

The documentation can be found on the separate GitHub Page. The page also includes the reference documentation for all versions.

Snapshots

Snapshots are available from the Sonatype OSS Snapshots repository. To configure the repository for your project to use the latest snapshot versions you have to add the following repository to your maven pom:

<repositories>
    <repository>
        <id>ossrh</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>

License

OAS Generator is Open Source software released under the Apache 2.0 license.