From 0958c0f3f194e400da6c29c31e8cd49d7858608f Mon Sep 17 00:00:00 2001 From: Daniil_Idrisov Date: Mon, 7 Aug 2023 11:41:19 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B2=D0=B5=D0=BB?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B0=D0=BA=D0=B0=D0=BD?= =?UTF-8?q?=D1=81=D0=B8=D0=B8=20=D0=B2=20OpenAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/employer_vacancies.md | 116 +------------------------------------ docs/errors.md | 2 +- docs/vacancies.md | 1 - 3 files changed, 2 insertions(+), 117 deletions(-) diff --git a/docs/employer_vacancies.md b/docs/employer_vacancies.md index 5a0416cf..7ddadbd8 100644 --- a/docs/employer_vacancies.md +++ b/docs/employer_vacancies.md @@ -38,121 +38,7 @@ ## Редактирование вакансий -`PUT /vacancies/{vacancy_id}` - -* `ignore_duplicates=true` - игнорировать - [появление дубликата](#edit-ignore-duplicates), после редактирования вакансии. - -Редактирование происходит по аналогии с созданием вакансии, но есть возможность -передачи отдельных полей в объекте для частичного редактирования вакансии. -Cоставные поля (например, `salary`, `contacts`, `professional_roles`) можно -редактировать только целиком, передавая полный объект. Например, для изменения -валюты в зарплате, необходимо передавать также и значения зарплаты, а -для изменения специализации необходимо передать полный список. - -### Поля, доступные для редактирования - -Имя | Описание ------|---------- -name | название -description | описание -key_skills | ключевые навыки -schedule | график работы -experience | требуемый опыт работы -employment | тип занятости -professional_roles | список профессиональных ролей -salary | зарплата -address | адрес -test | тестовое задание -department | департамент -code | внутренний код вакансии -response_letter_required | необходимость сопроводительного письма при отклике -accept_handicapped | указание, что вакансия доступна для соискателей с инвалидностью -accept_kids | указание, что вакансия доступна для соискателей от 14 лет -response_notifications | настройка уведомления о новых откликах -allow_messages | возможность переписки с кандидатами по данной вакансии -contacts | контактная информация -custom_employer_name | название компании для анонимных вакансий -response_url | URL отклика для прямых вакансий -accept_incomplete_resumes | разрешен ли отклик на вакансию неполным резюме -working_days | рабочие дни -working_time_intervals | временные интервалы работы -working_time_modes | режимы времени работы -accept_temporary | указание, что вакансия доступна для соискателей с временным трудоустройством -branded_template.id | брендированное оформление вакансии из [справочника](https://api.hh.ru/openapi/redoc#tag/Informaciya-o-rabotodatele/operation/get-vacancy-branded-templates-list) -languages | список языков -driver_license_types | категория водительских прав. Элемент справочника [driver_license_types](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries) -video_vacancy | данные по видеовакансии, включающие ссылку для скачивания видео - -Остальные поля доступны только для чтения, либо их можно задать только при создании вакансии. - -### Ответ - -При успешном обновлении вакансии вернется `204 No Content`. - -### Ошибки - -* `404 Not Found` – редактируемая вакансия не найдена. -* `403 Forbidden` – редактирование вакансий недоступно данному пользователю. -* `400 Bad Request` – ошибки в полях при редактировании вакансии. -* `403 Forbidden` – - изменение вакансии невозможно, так как после изменения, вакансия становится - похожа на другую вакансию у данного работодателя. Если вы уверены, что - появление дубликата необходимо, вы можете добавить к запросу параметр - `PUT /vacancies/{vacancy_id}?ignore_duplicates=true`. - -Дополнительно к HTTP коду сервер может вернуть описание -[причины ошибки](errors.md#vacancies-create-n-edit). - - -### Смена биллинг-типа, менеджера вакансии - -Возможно только улучшение типа вакансии. - -Изменение биллингового типа вакансии, а также передача вакансии другому -менеджеру компании происходит по аналогии с редактированием -`PUT /vacancies/{vacancy_id}`. Единственная особенность — эти поля -(`billing_type` и `manager`) необходимо отправлять отдельно от остальных полей -вакансии. - -``` -PUT /vacancies/{vacancy_id} -``` - -```json -{ - "billing_type": { - "id": "premium" - } -} -``` - -и - -``` -PUT /vacancies/{vacancy_id} -``` - -```json -{ - "manager": { - "id": "1337" - } -} -``` - -### Ответ - -При успешном обновлении биллинг-типа, менеджера вакансии вернется `204 No Content`. - -### Ошибки - -* `404 Not Found` – редактируемая вакансия не найдена. -* `403 Forbidden` – редактирование вакансий недоступно данному пользователю. -* `403 Forbidden` – поля `billing_type` и `manager` передаются вместе с другими. - -Дополнительно к HTTP коду сервер может вернуть описание [причины ошибки](errors.md#vacancies-create-n-edit). - +> !! Данный метод доступен в [OpenAPI](https://api.hh.ru/openapi/redoc#tag/Upravlenie-vakansiyami/operation/edit-vacancy) ### Прочие действия diff --git a/docs/errors.md b/docs/errors.md index 5f279838..637ef05b 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -292,7 +292,7 @@ HTTP code | type | value | reason | описание 403 | vacancies | duplicate | | аналогичная вакансия уже опубликована. В [ответе](#vacancies-duplicate-response) передается информация по дубликатам вакансии. Данную ошибку можно форсировано отключить (при [добавлении](employer_vacancies.md#creation) и [редактировании](employer_vacancies.md#edit-ignore-duplicates)) 403 | vacancies | creation_forbidden | | публикация вакансий недоступна текущему менеджеру 403 | vacancies | unavailable_for_archived | | редактирование недоступно для архивной вакансии -403 | vacancies | conflict_changes | | конфликтные изменения данных вакансии ([подробнее](employer_vacancies.md#edit_more)) +403 | vacancies | conflict_changes | | конфликтные изменения данных вакансии ([подробнее](https://api.hh.ru/openapi/redoc#tag/Upravlenie-vakansiyami/operation/edit-vacancy)) #### Причины возникновения ошибок diff --git a/docs/vacancies.md b/docs/vacancies.md index 723fffb4..0bdb8894 100644 --- a/docs/vacancies.md +++ b/docs/vacancies.md @@ -14,7 +14,6 @@ - From 4e9f88ce04f969b351fa0f352f5bf606013504f6 Mon Sep 17 00:00:00 2001 From: Daniil_Idrisov Date: Mon, 7 Aug 2023 11:44:46 +0300 Subject: [PATCH 2/2] Moved editing vacancy to OpenAPI --- docs_eng/employer_vacancies.md | 108 +-------------------------------- docs_eng/errors.md | 2 +- docs_eng/vacancies.md | 1 - 3 files changed, 2 insertions(+), 109 deletions(-) diff --git a/docs_eng/employer_vacancies.md b/docs_eng/employer_vacancies.md index 264eff18..e004e8b1 100644 --- a/docs_eng/employer_vacancies.md +++ b/docs_eng/employer_vacancies.md @@ -4,7 +4,6 @@ * [Publishing job vacancies](#creation) * [Conditions for filling out fields when publishing and adding vacancies](#conditions) * [Editing vacancies](#edit) -* [Editing billing type or vacancy manager](#edit_more) * [Extending vacancies](#prolongate) * [Information about possible vacancy extension](https://api.hh.ru/openapi/en/redoc#tag/Vacancy-management/operation/get-prolongation-vacancy-info) * [Published vacancy list](#active) @@ -38,112 +37,7 @@ See also: ## Editing vacancies -`PUT /vacancies/{vacancy_id}` - -* `ignore_duplicates=true` - ignore [duplicates](#edit-ignore-duplicates) after editing the vacancy. - -Editing is similar to publishing a vacancy but with an option to send individual fields in an object for partial editing. -Compound fields (such as `salary`, `contacts`, `professional_roles`) can be edited only as a whole; -the entire object will be sent. For example, to edit salary currency, you will also have to change the salary value; -to change the specialisation you will have to send a full list. - -### Editable fields - - field | description -----------------------------|---------------------------------------------------------------------- - name | title - description | description - key_skills | key skills - schedule | work schedule - experience | required work experience - employment | type of employment - professional_roles | list of professional roles - salary | salary - address | address - test | test task - department | department - code | internal vacancy code - response_letter_required | mandatory application cover letter - accept_handicapped | indication that the job is available for applicants with disabilities - accept_kids | indication that the job is available for applicants as young as 14 years old - response_notifications | notification about new applications - allow_messages | "message candidate" option for this vacancy - contacts | contact info - custom_employer_name | company name for anonymous vacancies - response_url | application URL for direct vacancies - accept_incomplete_resumes | whether it is possible to apply with an incomplete resume - branded_template.id | branded vacancy description from [directory](https://api.hh.ru/openapi/en/redoc#tag/Employer-info/operation/get-vacancy-branded-templates-list) | - languages | list of languages -driver_license_types | driver's license category. Item of the `driver_license_types` [dictionary](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-dictionaries) -video_vacancy | video vacancy data including video download link - -The remaining fields are read-only or can only be set during initial publication. - -### Response - -A successful response contains a code `204 No Content`. - -### Errors - -* `404 Not Found` – vacancy for editing not found. -* `403 Forbidden` – current user cannot edit vacancies. -* `400 Bad Request` – error found in a field when editing the vacancy. -* `403 Forbidden` – - the vacancy cannot be edited, because editing makes the vacancy - similar to another vacancy from the same employer. If you are sure that - a duplicate is necessary, you can add - `PUT /vacancies/{vacancy_id}?ignore_duplicates=true`. - -In addition to the HTTP code, the server can return a description of the [error reason](errors.md#vacancies-create-n-edit). - - - -### Editing billing type or vacancy manager - -You can only improve the vacancy type. - -Editing the billing type of a vacancy or passing the vacancy to another -manager in the company is similar to editing `PUT /vacancies/{vacancy_id}`. -The only peculiarity is that the following fields (`billing_type` and `manager`) -must be sent separately from the remaining fields of the vacancy. - -``` -PUT /vacancies/{vacancy_id} -``` - -```json -{ - "billing_type": { - "id": "premium" - } -} -``` - -and - -``` -PUT /vacancies/{vacancy_id} -``` - -```json -{ - "manager": { - "id": "1337" - } -} -``` - -### Response - -A successful response contains a code `204 No Content` and is body-less. - -### Errors - -* `404 Not Found` – vacancy for editing not found. -* `403 Forbidden` – current user cannot edit vacancies. -* `403 Forbidden` – `billing_type` and `manager` are passed along with others. - -In addition to the HTTP code, the server can return a description of the [error reason](errors.md#vacancies-create-n-edit). +>!! Method is defined in [OpenAPI](https://api.hh.ru/openapi/en/redoc#tag/Vacancy-management/operation/edit-vacancy) ### Other actions diff --git a/docs_eng/errors.md b/docs_eng/errors.md index 5a263b8b..8a5ddaba 100644 --- a/docs_eng/errors.md +++ b/docs_eng/errors.md @@ -304,7 +304,7 @@ HTTP code| type| value| description 403 | vacancies | duplicate | a similar job has already been published; the [response](#vacancies-duplicate-response) contains information about duplicate jobs; this error can be disabled by force (when [adding](employer_vacancies.md#creation) or [editing](employer_vacancies.md#edit-ignore-duplicates)) 403 | vacancies | creation_forbidden | jobs cannot be published by the current manager 403 | vacancies | unavailable_for_archived | you cannot edit an archived job -403 | vacancies | conflict_changes | a conflict was detected between changes to the job's data ([read more](employer_vacancies.md#edit_more)) +403 | vacancies | conflict_changes | a conflict was detected between changes to the job's data ([read more](https://api.hh.ru/openapi/en/redoc#tag/Vacancy-management/operation/edit-vacancy)) #### Reasons for errors diff --git a/docs_eng/vacancies.md b/docs_eng/vacancies.md index a995abd7..ef8ea616 100644 --- a/docs_eng/vacancies.md +++ b/docs_eng/vacancies.md @@ -17,7 +17,6 @@ See also: -