Git Product home page Git Product logo

flight-api-1.0.0's Introduction

Flight-APi

Please develop a Flight-Search API (only backend) that suites the following use cases:

Flight Number | Origin |Destination |Departure Time |Arrival Time |Price A101|AMS|DEL|11:00|17:00|850 EURO B101|AMS|BOM|12:00|19:30|750 EURO C101|AMS|BLR|13:00|18:30|800 EURO D101|AMS|MAA|09:00|15:00|600 EURO E101|MAA|BOM|16:00|17:30|100 EURO F101|BOM|DEL|20:30|21:30|80 EURO G101|BOM|DEL|18:00|19:30|100 EURO A201|LHR|DEL|11:30|17:00|600 EURO B201|LHR|BOM|12:35|19:30|750 EURO C201|LHR|BLR|13:45|18:30|800 EURO D201|LHR|MAA|09:00|15:00|600 EURO E201|DEL|BOM|18:45|20:15|100 EURO F201|BOM|DEL|21:15|22:30|80 EURO G01|BOM|DEL|20:20|22:30|100 EURO

Use case - 1: User can be able to find list of flights from Origin - Destination Use Case - 2: User can be able to short list flights based on departure time, arrival time , price , travel time etc

Tips:

  • Use at least Java 8 in combination with Spring framework
  • Pay attention to code construction and programming paradigm. We will look at minor detail

Docker setup script :

  • Added the Dockerfile in project
  • create an image (sudo docker build -t spring-boot:2.1.4 .)
  • Run the container (sudo docker run -d -p 8080:8080 -t spring-boot:2.1.4)

Swagger link :

Embedded H2 database

During application startup an embedded h2 database is started and loaded with location and translation data (schema and example data provided below).
You can view the database through the h2 webconsole.

Url: [http://localhost:8080/h2-console]
Database url: jdbc:h2:mem:travel-api
Username: sa (no password required)

End point for Flights routes :

http://localhost:8080/flight/routes?sortBy=price,desc&sortBy=departureTime,desc&origin=bom&destination=del

end point for Actuators :

http://localhost:8080/actuator/metricsInfo

  • Fetch below details :
  • { "totalRequest": 5, "totalOkRequest": 3, "total4xxRequest": 1, "total5xxRequest": 1, "avgResponseTime": 0.101045646, "totalResponseTime": 1.2125478 }

flight-api-1.0.0's People

Watchers

Diganta Mohapatra 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.