Skip to content

murilobeltrame/java-api-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring API playground

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
  • 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
  • Run merger
    • Update src/index.json to fix file paths.
    • Run npx swagger-merger --input index.json

Dependencies

Refs

About

Java Spring Api Playground

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks