Giter VIP home page Giter VIP logo

adattivorestserver's People

Contributors

steven-wagner avatar

Watchers

 avatar  avatar

adattivorestserver's Issues

POST new employee

endpoint should be {baseUrl}/new-employee/

request body should contain:

  • FirstName varchar(50) not null,
    
  • MiddleInitial char(1), (optional)
    
  • LastName varchar(50) not null,
    
  • DateOfBirth date, (optional) format for date is mm/dd/yyyy
    
  • DateOfEmployment date not null, format for date is mm/dd/yyyy
    
  • Status default is set to 'ACTIVE', options are 'ACTIVE' or 'INACTIVE' (optional)
    

Should return id of new employee if successful

DELETE employee

Endpoint should be {baseUrl}/api/employee/{employee_id}

The employee_id is the id of the employee to be deleted.

Must include a valid Authorization header. For the purpose of this project the test content for the auth header will be 'password'

If validated, employee's Status column should be updated to 'INACTIVE'

Validate POST new employee

  • required fields are:

  • firstName,

  • LastName,

  • DateOfEmployment

  • FirstName and LastName can not be longer than 50 characters.

  • DateOfEmployment and DateOfBirth must be in mm/dd/yyyy format.

  • MiddleInital can only be 1 character and must be a letter.

Validate PATCH existing employee

  • employee_id must exist
  • FirstName and LastName can not be longer than 50 characters.
  • DateOfEmployment and DateOfBirth must be in mm/dd/yyyy format.
  • MiddleInital can only be 1 character and must be a letter.

Validate GET employee by ID

employee_id param should correspond to an actual employee ID

employees who have their status set to 'INACTIVE' should not be gettable.

Employee should not have same last, first, and middle initial

When new employee is posted validate that someone with the same exact name is not already in the list.

Perhaps send a message indicating that a person with this exact name exists and that it may be a duplicate. Give the user an option to set checkDuplicate to false;

PATCH update existing employee

Endpoint should be {baseUrl}/api/employee/employee_id

employee_id is the id of the user to be updated.

Request body fields (i.e anyone may update these columns) may include:

  • FirstName
    
  • MiddleInitial
    
  • LastName
    
  • DateOfBirth
    
  • DateOfEmployment
    
  • Status - options are 'ACTIVE' or 'INACTIVE'
    

returns 200 if success.

GET all employees

endpoint should be {baseUrl}/all-employees/

Should return all columns of all employees in the employees table.

GET by ID

endpoint should be {baseUrl}/employee/{employee_id} where the user_id is the id of the employee to be queried.

Should return all columns where employees.id = employee_id

Validate DELETE employee

  • employee_id must exist
  • employee must not already have Status: 'INACTIVE'
  • Authorization header must be correct password

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.