Skip to content

anazri/peoplecase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Person Registry API

This repository contains a simple Person Registry API built using Spring Boot. The API allows users to store and fetch information about persons and their family members, including spouses and children.

Features

  • Store a person's information, including their name and social security number.
  • Save a person's spouse name.
  • Save a person's children's names and ages.
  • Fetch a person's information using their social security number.
  • Retrieve the name of the oldest child for a person.

Prerequisites

  • Java 8 or higher
  • Maven

Getting Started

Clone the repository:

git clone https://github.com/anazri/peoplecase.git
cd peoplecase

Build the project:

mvn clean install

Run the application:

mvn spring-boot:run

The API will be available at http://localhost:8088.

API Endpoints The following API endpoints are available:

Save a person's information, including their spouse and children's information.

POST /api/v1/person

Example request body:

{
  "name": "John Doe",
  "spouseName": "Jane Doe",
  "ssn": "123-456-789",
  "children": [
    {
      "name": "Alice Doe",
      "age": 10
    },
    {
      "name": "Bob Doe",
      "age": 7
    }
  ]
}

Fetch a person's information using their SSN.

GET /api/v1/person/{ssn}

Retrieve the name of the oldest child for a person with the given SSN.

GET /api/v1/person/{ssn}/oldest-child

Thank you

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages