From 1e9e44945129ab1b3c1bd502d47fb9151fed2972 Mon Sep 17 00:00:00 2001 From: Daniil_Idrisov Date: Tue, 9 Apr 2024 16:43:29 +0300 Subject: [PATCH] Moved tests solutions to OpenAPI --- docs_eng/employer_negotiations.md | 2 +- docs_eng/employer_negotiations_tests.md | 74 ------------------------- 2 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 docs_eng/employer_negotiations_tests.md diff --git a/docs_eng/employer_negotiations.md b/docs_eng/employer_negotiations.md index 066d140d..c97acb0b 100644 --- a/docs_eng/employer_negotiations.md +++ b/docs_eng/employer_negotiations.md @@ -428,7 +428,7 @@ viewed_by_opponent | logical | Whether the response was viewed by the applicant counters | object | Counters counters.messages | number | Total number of messages counters.unread_messages | number | Number of messages that have not been read by the employer -test_result | object, null | [Test](employer_negotiations_tests.md)'s result +test_result | object, null | [Test](https://api.hh.ru/openapi/en/redoc#tag/Employer-responsesinvitations/operation/get-negotiation-test-results)'s result test_result.url | string | Full test's result link test_result.alternate_url | string | Full test's result site link test_result.score | number | Test's score diff --git a/docs_eng/employer_negotiations_tests.md b/docs_eng/employer_negotiations_tests.md deleted file mode 100644 index 5c2ac731..00000000 --- a/docs_eng/employer_negotiations_tests.md +++ /dev/null @@ -1,74 +0,0 @@ -# Tests solutions - -This method allowed only employer authorization - -### Request - -`GET /negotiations/{nid}/test/solution` - -where `nid` - id of negotiation topic. - -### Ответ - -Success response should be with status `200 OK` and contains: - -```json -{ - "test_result": { - "name": "name", - "score": 100, - "mark": "EXCELLENT", - "duration": 10, - "tasks": [ - { - "question": "How are you?", - "closed_answers": [ - { - "value": "fine", - "selected": true, - "correct": false - }, - { - "value": "good", - "selected": false, - "correct": true - } - ], - "opened_answer": { - "value": " «Материализм и эмпириокритицизм»", - "mark": "UNFAIR" - } - }, - { - "question": "What is your last think about?", - "closed_answers": [], - "opened_answer": { - "value": "api hh.ru", - "mark": "EXCELLENT" - } - } - ] - } -} -``` - - Имя | Тип | Описание - --- | ------ | ------------ -name | string | Test's name -score | number | Score earned by respondent (from 0 to 100) -mark | string | Test's mark (`UNFAIR` - from 0 to 14 points, `FAIR` - from 15 to 44 points, `GOOD` - from 45 to 79 points, `EXCELLENT` from 80 to 100 points) -duration | number | Test's duration in seconds -tasks | array | Test's tasks -tasks[].question | string | Task's question -tasks[].opened_answer | object, null | Answer with any text -tasks[].opened_answer.value | string | Answer's text -tasks[].opened_answer.mark | string | Opened question's mark (`UNFAIR` - 0 points, `FAIR` - 30 points, `GOOD` - 60 points, `EXCELLENT` 100 points) -tasks[].closed_answers | array | Answers with supposed text -tasks[].closed_answers[].value | string | Answer's text -tasks[].closed_answers[].selected | logical | Is current answer selected -tasks[].closed_answers[].correct | logical | Is current answer correct - -### Errors - -* `403 Forbidden` - Current user is not an employer. -* `404 Not Found` - Topic is not exists or current user has not access to this topic.