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: about 1 month 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 (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T09:20:42.000Z (almost 2 years ago)
- Last Synced: 2025-02-26T15:48:00.096Z (12 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

[](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
}
```