This repo shows of how to create super simple JAVA API using Spring Boot (Company API) or Jersey (Vehicle API).
It also explore how to do it by older version of JAVA (1.8, sorry =P).
Main objective is generate Open API style documentation for both APIs and them merge it in one single file.
To do so:
- Get Open Api specification from
company-api
:- Navigate to
src/company-api
- Run
./mvnw spring-boot:run -Dmaven.test.skip=true
- Grab the spec from
http://localhost:9998/api-docs
and save it
- Navigate to
- Get Open Api specification from
vehicle-api
:- Navigate to
src/vehicle-api
- Run
./mvnw spring-boot:run -Dmaven.test.skip=true
- Grab the spec from
http://localhost:9999/api-docs
and save it
- Navigate to
- Run merger
- Update
src/index.json
to fix file paths. - Run
npx swagger-merger --input index.json
- Update