https://github.com/prpundge/githubexplorer
A RESTful API for exploring GitHub repositories.
https://github.com/prpundge/githubexplorer
github java java21 maven spring-boot spring-boot-3
Last synced: 10 months ago
JSON representation
A RESTful API for exploring GitHub repositories.
- Host: GitHub
- URL: https://github.com/prpundge/githubexplorer
- Owner: prpundge
- Created: 2024-08-22T04:23:16.000Z (over 1 year ago)
- Default Branch: repo_explorer
- Last Pushed: 2024-08-22T04:49:20.000Z (over 1 year ago)
- Last Synced: 2025-01-19T13:16:20.636Z (11 months ago)
- Topics: github, java, java21, maven, spring-boot, spring-boot-3
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GitHub Repository Explorer API
======================
A RESTful API for exploring GitHub repositories.
Overview
-----------
This API provides a simple way to retrieve information about GitHub repositories. It handles exceptions and returns error responses in a standardized format.
This code uses the following technologies:
* Java 21
* Spring Boot 3
* Spring Data JPA
* H2 in-memory database
Endpoints
------------
* `GET /repositories/{owner}/{repo}`: Retrieve information about a specific repository.
Error Handling
-----------------
The API uses a global exception handler to catch and handle unexpected errors. Error responses are returned in the following format:
```json
{
"statusCode": 500,
"message": "An unexpected error occurred."
}
```
Curl Command
-----------------
```bash
curl --silent --location --request GET 'http://localhost:8080/repositories/black-forest-labs/flux'
```
```bash
curl --silent --location --request GET 'http://localhost:8080/repositories/no_one/Angular_Practice'
```