Create an RESTful API for colors (name, hex, rgb).
Make sure to use lean when appropriate.
- Color fields
- name is a required string
- hex is a required string
- red is a required number
- min is 0
- max is 255
- green is a required number
- min is 0
- max is 255
- blue is a required number
- min is 0
- max is 255
- POST /api/v1/colors
- create a new color
- respond with the created color
- GET /api/v1/colors
- respond with a list of colors
- only send the color
_id
andname
- only send the color
- respond with a list of colors
- GET /api/v1/colors/:id
- respond with the color by id
- don't send the
__v
- don't send the
- respond with the color by id
- PATCH /api/v1/colors/:id
- update only a colors name
- respond with the updated color
- only send the color
_id
andname
- only send the color
- DELETE /api/v1/colors/:id
- delete a color by id
- respond with the deleted color
- only send the color
_id
- only send the color