Skip to content

Repo used to demonstrate the use of copilot to tackle common java challenges

Notifications You must be signed in to change notification settings

liatrio/pilot-java-api

Repository files navigation

Pilot Management API

Java CI with Gradle

This is a Spring Boot application that provides REST API endpoints to manage pilot information, including their names and remaining work hours for the week.

Prerequisites

  • Java 17 or higher
  • Gradle 8.12.1 or higher

Building the Project

./gradlew build

Running the Application

./gradlew bootRun

Make Commands

The project includes a Makefile with the following targets:

  • make build - Build the application
  • make run - Run the application
  • make stop - Stop the running application
  • make test - Run unit tests
  • make clean - Clean build artifacts
  • make all - Clean and build (default)
  • make help - Show available targets

Example usage:

# Build and run the application
make build
make run

# Run tests
make test

# Stop the application
make stop

API Endpoints

Get All Pilots

  • GET /api/pilots
    • Returns a list of all pilots with their names and remaining work hours

Add a New Pilot

  • POST /api/pilots
    • Add a new pilot with their name and initial work hours
    • Request body example:
      {
          "name": "John Doe",
          "hoursLeftThisWeek": 40
      }

About

Repo used to demonstrate the use of copilot to tackle common java challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages