Coder Social home page Coder Social logo

javacodingtest's Introduction

JavaCodingTest

UML Diagram

ApplicationOverview

Assumptions

Some Assumptions during the API development were made including:

  1. No database is needed - a query is sent from another service/microservice and the payslips will be returned to them as JSON
  2. Data validation not required - another microservice will already have an existing database and knowledge of the format to query this microservice with.

AWS URL

  1. The application is currently hosted on AWS' Fargate through an ECR docker image at http://awscd-myfar-1e3hl0voh2gst-1630703603.ap-southeast-2.elb.amazonaws.com/generate
  2. The application requires a body to return anything, this can be done through an API tool such as Postman - https://www.postman.com/
  3. Use a get request and hitting the above mentioned endpoint with a body formatted like below in the raw format

image

4 . The API should send a response body such as the one below

image

Docker Deployment.

  1. docker pull adamcoppens/coding-test-app
  2. docker run -p 8080:8080 adamcoppens/coding-test-app
  3. send json bodies as shown in other examples to http://localhost:8080/generate

Local IDE Deployment

  1. Run Program from CodingTestApplication.java Start Point (Backend currently runs on localhost:8080)
  2. Using an API testing tool such as Postman send JSON objects as a GET request formatted like below through the body to the endpoint: http://localhost:8080/generate

image

  1. Verify Results
    image

javacodingtest's People

Contributors

a-coppens avatar

Watchers

 avatar

javacodingtest's Issues

Fix: JSON Output

JSON Output should contain a nested object

e.g nested input data, un-nested output data as shown below

image

Current Output

image

Fix: Date input and output

Date input should be a number to represent the date (0-11) or (1-12) and the output range should be mapped to the 1st day of the month to the last day of the month

e.g when input

paymentMonth = 2;

output

paymentStartDate = 01 February;
paymentEndDate = 28 February;

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.