https://github.com/maciejwalkowiak/spring-boot-openapi-client-generator-demo
https://github.com/maciejwalkowiak/spring-boot-openapi-client-generator-demo
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maciejwalkowiak/spring-boot-openapi-client-generator-demo
- Owner: maciejwalkowiak
- License: apache-2.0
- Created: 2024-07-24T18:11:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-24T18:53:28.000Z (about 1 year ago)
- Last Synced: 2025-04-11T05:57:01.467Z (6 months ago)
- Language: Java
- Size: 53.7 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot + OpenAPI Generator + RestClient demo
This project is a sample app to showcase how to generate HTTP clients from OpenAPI spec in a Spring Boot application.
More details in a blog post: [maciejwalkowiak.com/blog/spring-boot-openapi-generate-client/](https://maciejwalkowiak.com/blog/spring-boot-openapi-generate-client/)
The `petclinic-spec.yml` is copied from [spring-petclinic/spring-petclinic-rest](https://github.com/spring-petclinic/spring-petclinic-rest/blob/master/src/main/resources/openapi.yml) project and updated with security configuration.
To run example end to end, clone [spring-petclinic-rest](https://github.com/spring-petclinic/spring-petclinic-rest/blob/master/src/main/resources/openapi.yml), set `petclinic.security.enable=true` in `application.properties` and run it with `./mvnw spring-boot:run`. Then run the sample that generates the client code.