Coder Social home page Coder Social logo

address-book's Introduction

Project Name : Address Book Simulation

Author : RASHMI VISHNU

SWAGGER URL

  1. Start the application using bootRun, ./gradlew bootRun
  2. Swagger UI Link : http://localhost:8080/swagger-ui.html#/address-book-controller

ASSUMPTIONS and SCOPE for ENHANCEMENT

  1. Extensive test cases to cover more scenarios can be added
  2. Validations can be enhanced to include more on the inputs. Basic validations are provided for now.
  3. User Interface can be provided
  4. Default port will be tomcat's default port -8080
  5. Uses internal cache for storing the data. Can be enhanced to use H2
  6. Retrieved data will be sorted by first name always

HOW TO RUN THE SIMULATION

To run from Eclipse/IntelliJ

Run as application "AddressBookApplication.java"

To build the application

./gradlew clean build

To run the application from command prompt or using gradle

./gradlew bootRun

Scenarios covered

  1. add a new contact to a specified address book
  2. remove the specified contact from Address book
  3. To Retrieve all the contacts from the address book use http://localhost:8080/api/v1/contacts?condition=ALL
  4. retrieve UNIQUE FROM MULTIPLE BOOKS http://localhost:8080/api/v1/contacts?condition=UNIQUE
  5. retrieve COMMON FROM MULTIPLE BOOKS http://localhost:8080/api/v1/contacts?condition=COMMON

PRE configured Data

address-book-Earth To fetch data from this addressBook use this URL GET http://localhost:8080/api/v1/address-book/address-book-Earth/contacts

{
    "id": "788b58e4-5530-45ff-a3e0-d2e0a0449262",
    "firstName": "Ricky",
    "lastName": "Ponting",
    "phoneNumbers": [
        "03313411111",
        "03313411112"
    ]
},
{
    "id": "1d4b6b11-561e-4c90-a912-8b447ffbb8b0",
    "firstName": "Shane",
    "lastName": "Warne",
    "phoneNumbers": [
        "0331445543"
    ]
},
{
    "id": "3cc9d5f2-e905-4966-9d28-b1243b474092",
    "firstName": "Steve",
    "lastName": "Smith",
    "phoneNumbers": [
        "0331445545"
    ]
}

address-book-Mars To fetch data from this addressBook use this URL GET http://localhost:8080/api/v1/address-book/address-book-Mars/contacts

{
   "id": "350b34dd-30a0-4c43-bf7a-8a414779e30c",
   "firstName": "David",
   "lastName": "Warner",
   "phoneNumbers": [
       "0331345543",
       "0331345553"
   ]
},
{
   "id": "492545d4-872d-4801-a7f8-7da23e8437f5",
   "firstName": "Ricky",
   "lastName": "Ponting",
   "phoneNumbers": [
       "03313411111",
       "03313411112"
   ]
}

address-book's People

Contributors

bhatrv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.