Skip to content

affinipay/candidate-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Info

This repository contains the source needed to execute a container that hosts a simple api. Please follow the instructions to get the api running on your local system and then write automated test cases for the running api. Please make note of any bugs you find in the service in your response to us. Feel free to leverage whatever language/framework you are most comfortable with.

Installing dependencies

Please install the following dependencies:

  1. Docker
    1. https://docs.docker.com/engine/install/
  2. Git
    1. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Cloning Exercise Repo

git clone https://github.com/affinipay/candidate-exercise.git

IMPORTANT NOTE - Windows Users

If you are using a Windows system to complete this exercise, make sure that your IED is setup to use LF rather than CRLF for EndOfLine(EoL). If your system is using the wrong EoL designator, you will receive a 'No Such File' error when attempting to start the container See this post for more information:

CRLF to LF in VisualStudios

Building and Running Container

To Build:

docker build -t exercise:1.0 .

To Run:

docker run --name demo -it -p 5000:5000 exercise:1.0

You should now be able to access the api through this URL

http://127.0.0.1:5000/dogs

API SPEC

The api provides an endpoint to create, view and delete dogs from the system.

End users are allowed to create dogs by POSTing to http://127.0.0.1:5000/dogs, the request payload should contain the following fields

{
    "breed": <string>,
    "age":   <int>,
    "name":  <string>
}

The system assigns a unique ID to each dog created which will be visible in the POST response. This ID can be used to view and delete dogs from the system through the URL http://127.0.0.1:5000/dogs/<dog_id>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published