Technology Stack :
Java 8
Spring Boot
Spring Data JPA
Spring Retry
SQL Server
lombok (Used only for Logging Purpose)
log4j
Future Scope:
More Unit Test Coverage
Solution to advanced problem
Table Structures :
- repository_tbl
- owner_tbl (Will contain login name , avatar URL etc)
How To Run :
- Create connection to DB and Database
- update required credentials in application.properties file
- Clone project from GitHub
- Run GitHubRestApiApplication.java file (It will create all required tables automatically, for new Strategy for creating
tables is 'create-drop' which will create and drop tables every time when we will restart server)
Endpoints:
-
create and display github repository metadata
-- It will take data from GitHub API and will import it in SQL Server DB and then we will display it in JSON format.
URL : http://localhost:8080/github/repositories/owner/:owner/repository/:repository
Method : POST -
get github repository metadata by name
-- display metadata by repository name
URL : http://localhost:8080/github/repositories/repository/:repository
Method : GET -
get all github repository metadata
-- display all github repository metadata
URL : http://localhost:8080/github/repositories
Method : GET