Skip to content

BerkleyTechnologyServices/restdocs-spec-example

Repository files navigation

Example using restdocs-spec-maven-plugin

Build Status

This example project demonstrates how to integrate Spring REST Docs, restdocs-api-spec, and the restdocs-spec-maven-plugin to generate both HTML documentation and an OpenAPI 2.0 spec file at the same time.

Usage

You can build the project with the following command:

./mvnw clean prepare-package

That should produce the following:

  • ./target/classes/static/docs/openapi-2.0.yml - An OpenAPI 2.0 specification file for the API
  • ./target/classes/static/docs/index.html - The HTML documentation for the API. This documentation also includes a link to download the OpenAPI 2.0 specification file mentioned above.

You can also run the sample application with the following command:

./mvnw prepare-package spring-boot:run

After the application has started, open up a web browser and navigate to the documentation at the following URLs:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages