Git Product home page Git Product logo

glossaryproject's Introduction

Glossary Project

Time to complete: 90 minutes

Objective:

  1. Create a service that allows users to manage a glossary or dictionary (like UrbanDictionary).
  2. This microservice must use the Definition service.
  3. This microservice must have adequate unit tests.
  4. This microservice must include exception handling.

Infrastructure (Supplied)

You will be supplied the following services to help complete your project. Each service includes a README file with instructions for running the service and documentation of the API:

  • Eureka Service Registry
  • Definition Service

Glossary Service Requirements (You Implement)

You are required to implement two endpoints.

  1. Your service will allow an end user to get a list of definitions for a given term.
  2. Your service will allow an end user to add a new definition, applying the following business rule:
  • The definition must be family friendly. It cannot contain any of the following words (case insensitive), however these words may exist within other words
    • darn
    • heck (however, heckler and checkmate are allowed, for example)
    • drat (however, dehydrated is allowed, for example)
    • jerk
    • butt (however, buttress is allowed, for example)

API

Get List of Definitions by Term

  • URL: /glossary/term/{term}

  • HTTP Method: GET

  • RequestBody: None

  • ResponseBody: Definition list (JSON - see below)

    [
        {
            "id": 1007,
            "term": "I'm dead",
            "definition": "I thought that was very funny"
        },
        {
            "id": 1008,
            "term": "I'm dead",
            "definition": "I am no longer among the living; I am deceeased; (seldom truthfully said)"
        }
    ]

Add new definition

  • URL: /glossary
  • HTTP Method: POST
  • RequestBody: Definition object without id
    {
        "term": "literally",
        "definition": "figuratively"
    }
  • ResponseBody: Definition object with id
    {
        "id": 2,
        "term": "literally",
        "definition": "figuratively"
    }  

glossaryproject's People

Contributors

huhspaniel avatar terrenceturner avatar juhuyoon avatar

Watchers

James Cloos avatar  avatar

Forkers

carlvis

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.