Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berkleytechnologyservices/restdocs-spec-example
https://github.com/berkleytechnologyservices/restdocs-spec-example
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/berkleytechnologyservices/restdocs-spec-example
- Owner: BerkleyTechnologyServices
- License: apache-2.0
- Created: 2018-09-13T17:01:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-19T18:24:13.000Z (6 days ago)
- Last Synced: 2024-12-19T19:28:47.305Z (5 days ago)
- Language: Java
- Size: 216 KB
- Stars: 16
- Watchers: 7
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example using restdocs-spec-maven-plugin
[![Build Status](https://github.com/BerkleyTechnologyServices/restdocs-spec-example/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/BerkleyTechnologyServices/restdocs-spec-example/actions?query=branch%3Amaster+workflow%3ACI)
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:
```sh
./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:
```sh
./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:* http://localhost:8080/docs/openapi-2.0.yml - OpenAPI 2.0 specification
* http://localhost:8080/docs/index.html - HTML documentation[Spring REST Docs]: https://spring.io/projects/spring-restdocs
[restdocs-api-spec]: https://github.com/ePages-de/restdocs-api-spec
[restdocs-spec-maven-plugin]: https://github.com/BerkleyTechnologyServices/restdocs-spec