https://github.com/ddobrin/api-first-dev
https://github.com/ddobrin/api-first-dev
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ddobrin/api-first-dev
- Owner: ddobrin
- License: mit
- Created: 2021-07-15T20:07:48.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-30T18:50:07.000Z (almost 5 years ago)
- Last Synced: 2024-10-06T02:02:03.004Z (almost 2 years ago)
- Language: Shell
- Size: 19.9 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API First Development
To generate the code from the OpenAPI spec, please run:
```shell
java -jar bin/openapi-generator-cli.jar generate -i openapi/petclinic.yaml -o . -g spring -c ./config.yaml
```
or run the Shell scipt:
```shell
./generate.sh
```
To build the project, and test it, you can run:
```
mvn spring-boot:run
# and access the running app at
http://localhost:8080
```
To build a Docker image, you can run:
```
mvn spring-boot:build-image
# start the app
docker run --rm -p 8080:8080 api-first-development:0.0.1
# and access the running app at
http://localhost:8080
```