Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/claudioaltamura/spring-boot-openapi-generator
Spring Boot OpenAPI Generator example
https://github.com/claudioaltamura/spring-boot-openapi-generator
github-actions maven openapi spring-boot
Last synced: 2 days ago
JSON representation
Spring Boot OpenAPI Generator example
- Host: GitHub
- URL: https://github.com/claudioaltamura/spring-boot-openapi-generator
- Owner: claudioaltamura
- License: mit
- Created: 2021-04-19T12:47:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T09:20:42.000Z (9 months ago)
- Last Synced: 2024-11-11T09:43:39.291Z (2 months ago)
- Topics: github-actions, maven, openapi, spring-boot
- Language: Java
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/claudioaltamura/spring-boot-openapi-generator/maven-build.yml?branch=main)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# spring-boot-openapi-generator
Spring Boot OpenAPI generator example## Attention
OpenAPI spec must be named openapi.yml.
## Generate
./mvnw clean compile
regenerating
delete the file under the folder .openapi-generator## Run
./mvnw spring-boot:run
## Example
curl http://localhost:8080/pets
## OpenAPI
http://localhost:8080/v3/api-docs
http://localhost:8080/swagger-ui/index.html
### Development
for demo purposes I configured in pom.xml
false
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
by adding ```@Controller``` classes that implement the interface. Eg:
```java
@Controller
public class PetController implements PetApi {
// implement all PetApi methods
}
```