Skip to content

cvanrhee/roman-numeral-service

Repository files navigation

Roman Numeral Service

Api takes an integer or a range between 1-3999 and asynchronously converts it to it's corresponding Roman Numeral.

Getting Started

  1. Clone git clone https://github.com/cvanrhee/roman-numeral-service.git
  2. Import into your IDE of choice and [execute](#Executing program)

Endpoints:

Converting Roman Numeral

  • URL: /romannumeral

  • Method: GET

  • URL Params

    Required: ?query=[integer] or ?min=[integer]&max=[integer]

  • Success Response:

    • Code: 200
      Content: { "input": 1, "output": "I" }
  • Error Response:

    • Code: 400 Bad Request
      Content: { "timestamp": "2021-09-15T03:19:26.004+00:00", "status": 400, "error": "Bad Request", "message": "Invalid query range. Numbers must be between 1 and 3999", "path": "/romannumeral" }

Swagger Json

  • URL: /v2/api-docs

  • Method: GET

  • Success Response:

    • Code: 200

Health Check:

  • URL: /actuator/health/

  • Method: GET

  • Success Response:

    • Code: 200
    • Content: { "status": "UP" }

Dependencies

  • Java 11
  • Gradle

Project written using:

Executing program

Mac

  • Run the app using the gradle wrapper:
./gradlew bootRun

Windows

gradlew bootRun

You can also import the project into your IDE and run the com.interview.Application.java as an Application.

Tests

You can run the tests with gradle using

Mac

./gradlew test 

Windows

gradlew clean test --info

or run the tests using the IDE of your choice

Code layout

Code is formatted to the Google Java Style Guide. If you are using Intellij, you can format your code using the intellij-java-google-style.xml.

Authors

Caleb Van Rhee

Upcoming:

  • Dockerfile
  • Metrics
  • Logging to side-car
  • CI/CD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages