From 4f648a2ff99c2bb16838fa57fc2cafffb915baee Mon Sep 17 00:00:00 2001 From: Pavel Oreshkin <31508782+PavelOreshkin@users.noreply.github.com> Date: Sun, 24 Nov 2024 20:15:19 +0400 Subject: [PATCH] docs: add library to description and fix typo in api (#94) * docs: add library to description and fix typo in api * Update assignments/crud-api/assignment.md Co-authored-by: Maksim Shylau <34455330+AlreadyBored@users.noreply.github.com> --------- Co-authored-by: PavelOreshkin Co-authored-by: Maksim Shylau <34455330+AlreadyBored@users.noreply.github.com> --- assignments/crud-api/assignment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignments/crud-api/assignment.md b/assignments/crud-api/assignment.md index 729fbf3..377b003 100644 --- a/assignments/crud-api/assignment.md +++ b/assignments/crud-api/assignment.md @@ -7,7 +7,7 @@ Your task is to implement simple CRUD API using in-memory database underneath. ## Technical requirements - Task can be implemented on Javascript or Typescript -- Only `nodemon`, `dotenv`, `cross-env`, `typescript`, `ts-node`, `ts-node-dev`, `eslint` and its plugins, `webpack-cli`, `webpack` and its plugins, `prettier`, `uuid`, `@types/*` as well as libraries used for testing are allowed +- Only `nodemon`, `dotenv`, `cross-env`, `typescript`, `ts-node`, `ts-node-dev`, `eslint` and its plugins, `webpack-cli`, `webpack` and its plugins and loaders, `prettier`, `uuid`, `@types/*` as well as libraries used for testing are allowed - Use 22.x.x version (22.9.0 or upper) of Node.js - Prefer asynchronous API whenever possible @@ -45,7 +45,7 @@ Your task is to implement simple CRUD API using in-memory database underneath. 7. There could be some tests for API (not less than **3** scenarios). Example of test scenario: 1. Get all records with a `GET` `api/users` request (an empty array is expected) 2. A new object is created by a `POST` `api/users` request (a response containing newly created record is expected) - 3. With a `GET` `api/user/{userId}` request, we try to get the created record by its `id` (the created record is expected) + 3. With a `GET` `api/users/{userId}` request, we try to get the created record by its `id` (the created record is expected) 4. We try to update the created record with a `PUT` `api/users/{userId}`request (a response is expected containing an updated object with the same `id`) 5. With a `DELETE` `api/users/{userId}` request, we delete the created object by `id` (confirmation of successful deletion is expected) 6. With a `GET` `api/users/{userId}` request, we are trying to get a deleted object by `id` (expected answer is that there is no such object)